Fix invalid rune literal reported twice

The tokenizer and the parser were reporting it in different positions.
This way, they'll report in the same spot.
This commit is contained in:
Feoramund
2024-04-28 06:59:55 -04:00
parent e71cf96bbc
commit 29987c20c0

View File

@@ -767,9 +767,8 @@ gb_internal void tokenizer_get_token(Tokenizer *t, Token *token, int repeat=0) {
}
}
// TODO(bill): Better Error Handling
if (valid && n != 1) {
tokenizer_err(t, "Invalid rune literal");
tokenizer_err(t, token->pos, "Invalid rune literal");
}
token->string.len = t->curr - token->string.text;
goto semicolon_check;