From cb62de1eba07d4c522213bdd8331686684b3468c Mon Sep 17 00:00:00 2001 From: _ov4 Date: Thu, 22 Oct 2026 15:13:18 +0000 Subject: fix(parser): name the unexpected token in expression diagnostics Co-Authored-By: Claude Sonnet 5.5 --- include/cps/Lexer.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include') 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); }; } -- cgit v1.3.1-4-g156e