diff options
| author | Feoramund <161657516+Feoramund@users.noreply.github.com> | 2024-04-28 06:59:55 -0400 |
|---|---|---|
| committer | Feoramund <161657516+Feoramund@users.noreply.github.com> | 2024-04-28 07:02:21 -0400 |
| commit | 29987c20c058fe269ea0961205d12f51fc3e8326 (patch) | |
| tree | 58cd7c575a4f463df30fd207c6090f497192a9ec /src/tokenizer.cpp | |
| parent | e71cf96bbc809c1c1fb7172cd9e3c7c259520625 (diff) | |
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.
Diffstat (limited to 'src/tokenizer.cpp')
| -rw-r--r-- | src/tokenizer.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/tokenizer.cpp b/src/tokenizer.cpp index fdff9224a..f7751d840 100644 --- a/src/tokenizer.cpp +++ b/src/tokenizer.cpp @@ -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; |