diff options
| author | Jon Lipstate <Jon@Lipstate.com> | 2023-04-03 23:57:28 -0700 |
|---|---|---|
| committer | Jon Lipstate <Jon@Lipstate.com> | 2023-04-03 23:57:28 -0700 |
| commit | 2550918f27e9c6fc06ee25fb0b2f5d8a7663bdd7 (patch) | |
| tree | 7e754eb8d18b5edb8c20538c66e897ce22e5e3b3 /src/parser.cpp | |
| parent | 24493e89ad581e6e095179bf89b0c01fdd3e415c (diff) | |
| parent | adcaace03cc03cc4ba9c2a9e3ffa585369f6a20e (diff) | |
Merge remote-tracking branch 'origin' into wsapoll
Diffstat (limited to 'src/parser.cpp')
| -rw-r--r-- | src/parser.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/parser.cpp b/src/parser.cpp index 86f955254..50a9ba766 100644 --- a/src/parser.cpp +++ b/src/parser.cpp @@ -3693,9 +3693,11 @@ gb_internal bool allow_field_separator(AstFile *f) { if (allow_token(f, Token_Comma)) { return true; } - if (ALLOW_NEWLINE && token.kind == Token_Semicolon && !token_is_newline(token)) { - String p = token_to_string(token); - syntax_error(token_end_of_line(f, f->prev_token), "Expected a comma, got a %.*s", LIT(p)); + if (ALLOW_NEWLINE && token.kind == Token_Semicolon) { + if (!token_is_newline(token)) { + String p = token_to_string(token); + syntax_error(token_end_of_line(f, f->prev_token), "Expected a comma, got a %.*s", LIT(p)); + } advance_token(f); return true; } |