aboutsummaryrefslogtreecommitdiffstats
path: root/liblll/Compiler.cpp
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2016-11-30 23:06:13 +0800
committerAlex Beregszaszi <alex@rtfs.hu>2016-11-30 23:06:13 +0800
commit53d4433484c33b32d4d1063330633a308c0e48dd (patch)
tree1f4deb27dccf1499527c99c5ab76694aaa159dd9 /liblll/Compiler.cpp
parentd82eac3fed6547ddcaac8ecccb15c7f7eaa74d16 (diff)
downloaddexon-solidity-53d4433484c33b32d4d1063330633a308c0e48dd.tar
dexon-solidity-53d4433484c33b32d4d1063330633a308c0e48dd.tar.gz
dexon-solidity-53d4433484c33b32d4d1063330633a308c0e48dd.tar.bz2
dexon-solidity-53d4433484c33b32d4d1063330633a308c0e48dd.tar.lz
dexon-solidity-53d4433484c33b32d4d1063330633a308c0e48dd.tar.xz
dexon-solidity-53d4433484c33b32d4d1063330633a308c0e48dd.tar.zst
dexon-solidity-53d4433484c33b32d4d1063330633a308c0e48dd.zip
LLL: simplify error handling in parseLLL
Diffstat (limited to 'liblll/Compiler.cpp')
-rw-r--r--liblll/Compiler.cpp14
1 files changed, 3 insertions, 11 deletions
diff --git a/liblll/Compiler.cpp b/liblll/Compiler.cpp
index 73a82a35..cd909f34 100644
--- a/liblll/Compiler.cpp
+++ b/liblll/Compiler.cpp
@@ -99,7 +99,6 @@ 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
@@ -108,19 +107,12 @@ string dev::eth::parseLLL(string const& _src)
}
catch (...)
{
- failed = true;
+ killBigints(o);
+ return string();
}
ostringstream ret;
debugOutAST(ret, o);
killBigints(o);
-
- if (failed)
- {
- return string();
- }
- else
- {
- return ret.str();
- }
+ return ret.str();
}