mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
LLL: properly support dashes (-) as part of variable names
This commit is contained in:
parent
dc5e05681d
commit
ac3c8a553a
@ -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 + "'");
|
||||
|
Loading…
Reference in New Issue
Block a user