diff options
author | chriseth <chris@ethereum.org> | 2016-11-01 18:59:05 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-11-01 18:59:05 +0800 |
commit | 1a2c150e3b2f98ef44834aca281692734b74c0db (patch) | |
tree | 4cfc7d03d285133fe373b6f9df0b68a7412a9260 /liblll/CodeFragment.cpp | |
parent | 9cb1d30eab34e530f3c8bf67367c04787048bace (diff) | |
parent | ac3c8a553a0b943984742f6b12d9d0a3cabcb877 (diff) | |
download | dexon-solidity-1a2c150e3b2f98ef44834aca281692734b74c0db.tar dexon-solidity-1a2c150e3b2f98ef44834aca281692734b74c0db.tar.gz dexon-solidity-1a2c150e3b2f98ef44834aca281692734b74c0db.tar.bz2 dexon-solidity-1a2c150e3b2f98ef44834aca281692734b74c0db.tar.lz dexon-solidity-1a2c150e3b2f98ef44834aca281692734b74c0db.tar.xz dexon-solidity-1a2c150e3b2f98ef44834aca281692734b74c0db.tar.zst dexon-solidity-1a2c150e3b2f98ef44834aca281692734b74c0db.zip |
Merge pull request #1298 from ethereum/lll-error-reporting
LLL: further improve error reporting
Diffstat (limited to 'liblll/CodeFragment.cpp')
-rw-r--r-- | liblll/CodeFragment.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/liblll/CodeFragment.cpp b/liblll/CodeFragment.cpp index 0f8f2606..bc53d777 100644 --- a/liblll/CodeFragment.cpp +++ b/liblll/CodeFragment.cpp @@ -35,9 +35,6 @@ using namespace std; using namespace dev; using namespace dev::eth; -namespace qi = boost::spirit::qi; -namespace px = boost::phoenix; -namespace sp = boost::spirit; void CodeFragment::finalise(CompilerState const& _cs) { @@ -90,7 +87,7 @@ CodeFragment::CodeFragment(sp::utree const& _t, CompilerState& _s, bool _allowAS m_asm.append(_s.args.at(s).m_asm); else if (_s.outers.count(s)) m_asm.append(_s.outers.at(s).m_asm); - else if (us.find_first_of("1234567890") != 0 && us.find_first_not_of("QWERTYUIOPASDFGHJKLZXCVBNM1234567890_") == string::npos) + else if (us.find_first_of("1234567890") != 0 && us.find_first_not_of("QWERTYUIOPASDFGHJKLZXCVBNM1234567890_-") == string::npos) { auto it = _s.vars.find(s); if (it == _s.vars.end()) @@ -584,10 +581,10 @@ void CodeFragment::constructOperation(sp::utree const& _t, CompilerState& _s) { m_asm.appendJump(m_asm.errorTag()); } - else if (us.find_first_of("1234567890") != 0 && us.find_first_not_of("QWERTYUIOPASDFGHJKLZXCVBNM1234567890_") == string::npos) + else if (us.find_first_of("1234567890") != 0 && us.find_first_not_of("QWERTYUIOPASDFGHJKLZXCVBNM1234567890_-") == string::npos) m_asm.append((u256)varAddress(s)); else - error<InvalidOperation>(); + error<InvalidOperation>("Unsupported keyword: '" + us + "'"); } } |