mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
LLL: parseLLL to be less greedy catching exceptions
This commit is contained in:
parent
25c5dd48de
commit
d82eac3fed
@ -99,15 +99,28 @@ std::string dev::eth::compileLLLToAsm(std::string const& _src, bool _opt, std::v
|
|||||||
|
|
||||||
string dev::eth::parseLLL(string const& _src)
|
string dev::eth::parseLLL(string const& _src)
|
||||||
{
|
{
|
||||||
|
bool failed = false;
|
||||||
|
sp::utree o;
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
sp::utree o;
|
|
||||||
parseTreeLLL(_src, o);
|
parseTreeLLL(_src, o);
|
||||||
|
}
|
||||||
|
catch (...)
|
||||||
|
{
|
||||||
|
failed = true;
|
||||||
|
}
|
||||||
|
|
||||||
ostringstream ret;
|
ostringstream ret;
|
||||||
debugOutAST(ret, o);
|
debugOutAST(ret, o);
|
||||||
killBigints(o);
|
killBigints(o);
|
||||||
return ret.str();
|
|
||||||
}
|
if (failed)
|
||||||
catch (...) {}
|
{
|
||||||
return string();
|
return string();
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return ret.str();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user