hyc

Hydrogen Compiler written in C
git clone git://git.kocotian.pl/hyc.git
Log | Files | Refs | README | LICENSE

commit d9d5f227b96aece38639d0bb3e3afcc685db4aa4
parent 118a30f0ac7886b93273583c70dee7899bb0936a
Author: kocotian <kocotian@kocotian.pl>
Date:   Sun,  8 Aug 2021 22:36:37 +0000

errors part 2

Diffstat:
Mast.c | 8++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/ast.c b/ast.c @@ -70,8 +70,8 @@ nextTokenType(Tokenizer *t, TokenType type) Token *tok; if ((tok = nextToken(t)) != NULL) { if (tok->type != type) - error(tok, "token type mismatch (expected %s, got %s)", - strTokenType(type), strTokenType(tok->type)); + error(tok, "unexpected '%s' (expected '%s')", + strTokenType(tok->type), strTokenType(type)); } return tok; } @@ -91,8 +91,8 @@ enextTokenType(Tokenizer *t, TokenType type) Token *tok; tok = enextToken(t); if (tok->type != type) - error(tok, "token type mismatch (expected %s, got %s)", - strTokenType(type), strTokenType(tok->type)); + error(tok, "unexpected '%s' (expected '%s')", + strTokenType(tok->type), strTokenType(type)); return tok; }