diff options
| author | _ov4 <ov4@ov4.org> | 2026-10-22 15:13:18 +0000 |
|---|---|---|
| committer | _ov4 <ov4@ov4.org> | 2026-10-22 15:33:15 +0000 |
| commit | cb62de1eba07d4c522213bdd8331686684b3468c (patch) | |
| tree | e897aebab2105bc709794b7ed64df6193943b0d6 /include | |
| parent | ee615b2b3b2b7b336fdd4334dba68801681c9c7b (diff) | |
fix(parser): name the unexpected token in expression diagnostics
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Diffstat (limited to 'include')
| -rw-r--r-- | include/cps/Lexer.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/cps/Lexer.h b/include/cps/Lexer.h index 247c8d0..bec1233 100644 --- a/include/cps/Lexer.h +++ b/include/cps/Lexer.h @@ -154,6 +154,8 @@ public: int getLine() const { return TokenLine; } bool isLibrary() const { return Library; } bool hadError() const { return HadError; } + // Human-readable spelling of Tok for diagnostics; Lex supplies identifier text. + static std::string tokenSpelling(int Tok, const Lexer &Lex); }; } |
