mirror of
https://github.com/autc04/Retro68.git
synced 2024-11-22 08:34:35 +00:00
Rez: fix $ABCD hex literals
This commit is contained in:
parent
a3d330fa3b
commit
2e2a734403
@ -217,6 +217,9 @@ RezSymbol RezLexer::nextToken()
|
||||
};
|
||||
|
||||
std::string s = tok.get_value().c_str();
|
||||
if(s.size() >= 2 && s[0] == '$' && std::all_of(s.begin()+1, s.end(), [](char c) { return isxdigit(c); }))
|
||||
return RezParser::make_INTLIT(readInt(s.c_str()+1, nullptr, 16), loc);
|
||||
|
||||
std::string lower = s;
|
||||
std::transform(lower.begin(), lower.end(), lower.begin(), ::tolower);
|
||||
auto p = keywords.find(lower);
|
||||
|
Loading…
Reference in New Issue
Block a user