aboutsummaryrefslogtreecommitdiff
path: root/src/parser.c
diff options
context:
space:
mode:
authorGinger Bill <bill@gingerbill.org>2017-04-14 21:47:59 +0100
committerGinger Bill <bill@gingerbill.org>2017-04-14 21:47:59 +0100
commit23a0a6de4b78bc5447d70cebfd792319ea2b7059 (patch)
treef41b0832edbd64d2de80166e72c7c5df2f769774 /src/parser.c
parent0d2dbee84e937ccf411787f9dda72e541db3fd20 (diff)
Add parse_int; Fix union bugs with size, alignment, and recursive definition checking
Diffstat (limited to 'src/parser.c')
-rw-r--r--src/parser.c4
1 files changed, 4 insertions, 0 deletions
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;
}