diff options
| author | gingerBill <bill@gingerbill.org> | 2024-06-10 18:50:53 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2024-06-10 18:50:53 +0100 |
| commit | f1779c85dedb8bb309a9afa8cfa7e35ad727d237 (patch) | |
| tree | b0485278d097b9b841200590f3076fda1f5e21cf /src/parser.cpp | |
| parent | 903e254e36b0f59aff4b2eb95345d1faea601ac3 (diff) | |
Fix #3727
Diffstat (limited to 'src/parser.cpp')
| -rw-r--r-- | src/parser.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/parser.cpp b/src/parser.cpp index 2cdcea417..0cd96f5b5 100644 --- a/src/parser.cpp +++ b/src/parser.cpp @@ -2091,6 +2091,9 @@ gb_internal bool ast_on_same_line(Token const &x, Ast *yp) { gb_internal Ast *parse_force_inlining_operand(AstFile *f, Token token) { Ast *expr = parse_unary_expr(f, false); Ast *e = strip_or_return_expr(expr); + if (e == nullptr) { + return expr; + } if (e->kind != Ast_ProcLit && e->kind != Ast_CallExpr) { syntax_error(expr, "%.*s must be followed by a procedure literal or call, got %.*s", LIT(token.string), LIT(ast_strings[expr->kind])); return ast_bad_expr(f, token, f->curr_token); |