aboutsummaryrefslogtreecommitdiffstats
path: root/liblll/CodeFragment.cpp
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2016-11-01 10:06:40 +0800
committerAlex Beregszaszi <alex@rtfs.hu>2016-11-01 18:45:13 +0800
commitac3c8a553a0b943984742f6b12d9d0a3cabcb877 (patch)
tree46a3549006fa5bff7db0b227de6137e035588133 /liblll/CodeFragment.cpp
parentdc5e05681dfbacfcdbd875ce48c8839fcab20271 (diff)
downloaddexon-solidity-ac3c8a553a0b943984742f6b12d9d0a3cabcb877.tar.gz
dexon-solidity-ac3c8a553a0b943984742f6b12d9d0a3cabcb877.tar.zst
dexon-solidity-ac3c8a553a0b943984742f6b12d9d0a3cabcb877.zip
LLL: properly support dashes (-) as part of variable names
Diffstat (limited to 'liblll/CodeFragment.cpp')
-rw-r--r--liblll/CodeFragment.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/liblll/CodeFragment.cpp b/liblll/CodeFragment.cpp
index ac9eac37..bc53d777 100644
--- a/liblll/CodeFragment.cpp
+++ b/liblll/CodeFragment.cpp
@@ -87,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())
@@ -581,7 +581,7 @@ 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>("Unsupported keyword: '" + us + "'");