diff options
| author | gingerBill <gingerBill@users.noreply.github.com> | 2025-12-31 15:01:08 +0000 |
|---|---|---|
| committer | gingerBill <gingerBill@users.noreply.github.com> | 2025-12-31 15:01:08 +0000 |
| commit | 3c8b1ab414f251b12fc59ce17cab074185584bc6 (patch) | |
| tree | 0d32eba065bd777f3cb449f022591331f2b5f3da /src/parser.cpp | |
| parent | 6f396ac49b159e5741579d3b5bb50318e8e75851 (diff) | |
| parent | 3acb62210fcdc48d7a280a1c160ac7ff9063902f (diff) | |
Merge branch 'master' of https://github.com/odin-lang/Odin
Diffstat (limited to 'src/parser.cpp')
| -rw-r--r-- | src/parser.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/parser.cpp b/src/parser.cpp index b2ff55396..823021e04 100644 --- a/src/parser.cpp +++ b/src/parser.cpp @@ -2183,7 +2183,7 @@ gb_internal Ast *parse_force_inlining_operand(AstFile *f, Token token) { 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])); + syntax_error(expr, "%.*s must be followed by a procedure literal or call, got %.*s", LIT(token.string), LIT(ast_strings[e->kind])); return ast_bad_expr(f, token, f->curr_token); } ProcInlining pi = ProcInlining_none; @@ -2197,17 +2197,17 @@ gb_internal Ast *parse_force_inlining_operand(AstFile *f, Token token) { if (pi != ProcInlining_none) { if (e->kind == Ast_ProcLit) { - if (expr->ProcLit.inlining != ProcInlining_none && - expr->ProcLit.inlining != pi) { + if (e->ProcLit.inlining != ProcInlining_none && + e->ProcLit.inlining != pi) { syntax_error(expr, "Cannot apply both '#force_inline' and '#force_no_inline' to a procedure literal"); } - expr->ProcLit.inlining = pi; + e->ProcLit.inlining = pi; } else if (e->kind == Ast_CallExpr) { - if (expr->CallExpr.inlining != ProcInlining_none && - expr->CallExpr.inlining != pi) { + if (e->CallExpr.inlining != ProcInlining_none && + e->CallExpr.inlining != pi) { syntax_error(expr, "Cannot apply both '#force_inline' and '#force_no_inline' to a procedure call"); } - expr->CallExpr.inlining = pi; + e->CallExpr.inlining = pi; } } |