diff options
Diffstat (limited to 'liblll/Compiler.cpp')
-rw-r--r-- | liblll/Compiler.cpp | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/liblll/Compiler.cpp b/liblll/Compiler.cpp index 0cec7bc8..73a82a35 100644 --- a/liblll/Compiler.cpp +++ b/liblll/Compiler.cpp @@ -99,15 +99,28 @@ std::string dev::eth::compileLLLToAsm(std::string const& _src, bool _opt, std::v string dev::eth::parseLLL(string const& _src) { + bool failed = false; + sp::utree o; + try { - sp::utree o; parseTreeLLL(_src, o); - ostringstream ret; - debugOutAST(ret, o); - killBigints(o); + } + catch (...) + { + failed = true; + } + + ostringstream ret; + debugOutAST(ret, o); + killBigints(o); + + if (failed) + { + return string(); + } + else + { return ret.str(); } - catch (...) {} - return string(); } |