aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAryadev Chavali <aryadev@aryadevchavali.com>2024-04-15 16:30:30 +0630
committerAryadev Chavali <aryadev@aryadevchavali.com>2024-04-15 16:30:30 +0630
commit0f430e399c2a626f9fff72ac0e4ba56f2f4df34d (patch)
treec6d96ed7dfdfebe5709f727920819bf09d9d8fec
parent175138f570120c60702562eb17a9772927836e10 (diff)
downloadovm-0f430e399c2a626f9fff72ac0e4ba56f2f4df34d.tar.gz
ovm-0f430e399c2a626f9fff72ac0e4ba56f2f4df34d.tar.bz2
ovm-0f430e399c2a626f9fff72ac0e4ba56f2f4df34d.zip
Changed hex format from x<digits> -> 0x<digits>
-rw-r--r--asm/lexer.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/asm/lexer.cpp b/asm/lexer.cpp
index 361d9ef..e463b7c 100644
--- a/asm/lexer.cpp
+++ b/asm/lexer.cpp
@@ -386,8 +386,8 @@ lerr_t tokenise_buffer(string_view source, std::vector<token_t *> &tokens)
return lerr_t(lerr_type_t::INVALID_NUMBER_LITERAL, column, line);
t = tokenise_literal_number(source, column);
}
- else if (first == 'x' && source.size() > 1 &&
- is_char_in_s(source[1], VALID_HEX))
+ else if (first == '0' && source.size() > 2 && source[1] == 'x' &&
+ is_char_in_s(source[2], VALID_HEX))
{
auto end = source.find_first_not_of(VALID_HEX);
if (end == string::npos)