mirror of
https://github.com/odin-lang/Odin.git
synced 2026-10-06 04:42:15 -04:00
Modify implicit semicolon rules
This commit is contained in:
1 parent
386f5f596d
commit
b03ce0e9b4
2 files changed
+6
-3
No files matched your search
+6
-2
@@ -1371,8 +1371,12 @@ void expect_semicolon(AstFile *f, AstNode *s) {
|
||||
if (is_semicolon_optional_for_node(f, s)) {
|
||||
return;
|
||||
}
|
||||
} else if (f->curr_token.kind == Token_CloseBrace) {
|
||||
return;
|
||||
} else {
|
||||
switch (f->curr_token.kind) {
|
||||
case Token_CloseBrace:
|
||||
case Token_CloseParen:
|
||||
return;
|
||||
}
|
||||
}
|
||||
String node_string = ast_node_strings[s->kind];
|
||||
syntax_error(prev_token, "Expected ';' after %.*s, got %.*s",
|
||||
|
||||
Reference in new issue
Block a user