eval lexer: allow a few more corner cases of various compiler/linker-inserted identifiers, so that eval works in all cases

This commit is contained in:
Ryan Fleury
2024-02-05 11:26:37 -08:00
parent 38b8bfd6fb
commit 0b6b0947ed
+2 -2
View File
@@ -338,7 +338,7 @@ eval_token_array_from_text(Arena *arena, String8 text)
//- rjf: no active token -> seek token starter
default:
{
if(char_is_alpha(byte) || byte == '_' || byte == '`')
if(char_is_alpha(byte) || byte == '_' || byte == '`' || byte == '$')
{
active_token_kind = EVAL_TokenKind_Identifier;
active_token_start_idx = idx;
@@ -414,7 +414,7 @@ eval_token_array_from_text(Arena *arena, String8 text)
}
}
}
else if(!char_is_alpha(byte) && !char_is_digit(byte, 10) && byte != '_' && !active_token_kind_started_with_tick)
else if(!char_is_alpha(byte) && !char_is_digit(byte, 10) && byte != '_' && !active_token_kind_started_with_tick && byte != '@')
{
advance = 0;
token_formed = 1;