diff options
Diffstat (limited to 'src/parser.cpp')
| -rw-r--r-- | src/parser.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/parser.cpp b/src/parser.cpp index 600c35608..39f67b4c4 100644 --- a/src/parser.cpp +++ b/src/parser.cpp @@ -4292,7 +4292,7 @@ bool parse_file(Parser *p, AstFile *f) { CommentGroup *docs = f->lead_comment; f->package_token = expect_token(f, Token_package); - if (f->error_count > 0) { + if (f->package_token.kind != Token_package) { return false; } Token package_name = expect_token_after(f, Token_Ident, "package"); |