LLL: parseLLL to be less greedy catching exceptions

This commit is contained in:
Alex Beregszaszi 2016-11-29 22:04:51 +00:00
parent 25c5dd48de
commit d82eac3fed

View File

@ -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();
}