From 23a0a6de4b78bc5447d70cebfd792319ea2b7059 Mon Sep 17 00:00:00 2001 From: Ginger Bill Date: Fri, 14 Apr 2017 21:47:59 +0100 Subject: Add parse_int; Fix union bugs with size, alignment, and recursive definition checking --- src/parser.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/parser.c') diff --git a/src/parser.c b/src/parser.c index e9c1a9a44..c3005ddb7 100644 --- a/src/parser.c +++ b/src/parser.c @@ -1197,7 +1197,11 @@ Token expect_token(AstFile *f, TokenKind kind) { syntax_error(f->curr_token, "Expected `%.*s`, got `%.*s`", LIT(token_strings[kind]), LIT(token_strings[prev.kind])); + if (prev.kind == Token_EOF) { + gb_exit(1); + } } + next_token(f); return prev; } -- cgit v1.2.3