hare

[hare] The Hare programming language
git clone https://git.torresjrjr.com/hare.git
Log | Files | Refs | README | LICENSE

commit 651281084fbeca1400a33388e3a123eaf4fe3b7f
parent ccf63b910cd2d69944c7a40dc0e7b9ff39bba89a
Author: Ember Sawady <ecs@d2evs.net>
Date:   Tue,  9 May 2023 23:38:32 +0000

hare::parse::want: unlex token on failure

Makes more sense in the context of verifying where syntax errors occur
in +test

Signed-off-by: Ember Sawady <ecs@d2evs.net>

Diffstat:
Mhare/parse/parse.ha | 1+
1 file changed, 1 insertion(+), 0 deletions(-)

diff --git a/hare/parse/parse.ha b/hare/parse/parse.ha @@ -47,6 +47,7 @@ fn want(lexer: *lex::lexer, want: lex::ltok...) (lex::token | error) = { fmt::fprint(&buf, ", ")!; }; }; + lex::unlex(lexer, tok); return syntaxerr(lex::mkloc(lexer), "Unexpected '{}', was expecting {}", lex::tokstr(tok), strio::string(&buf)); };