aboutsummaryrefslogtreecommitdiff
path: root/src/parser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/parser.cpp')
-rw-r--r--src/parser.cpp2
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");