diff options
| author | gingerBill <gingerBill@users.noreply.github.com> | 2026-01-15 17:28:28 +0000 |
|---|---|---|
| committer | gingerBill <gingerBill@users.noreply.github.com> | 2026-01-15 17:28:28 +0000 |
| commit | 5f07055ac1548e6254651f40a23e74093a9bebfe (patch) | |
| tree | 62d3123463beb55f8be5c1a32f177be08888ee4f /src/parser.cpp | |
| parent | 0366cd3304b3910a397c4989e46bee4c575adeec (diff) | |
Add `#must_tail` and `"preserve/none"` calling convention
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 d8a9df473..8782b3a2b 100644 --- a/src/parser.cpp +++ b/src/parser.cpp @@ -2216,6 +2216,7 @@ gb_internal Ast *parse_inlining_or_tailing_operand(AstFile *f, Token token) { if (pt != ProcTailing_none) { if (e->kind == Ast_ProcLit) { + syntax_error(expr, "'#must_call' can only be applied to a procedure call, not the procedure literal"); e->ProcLit.tailing = pt; } else if (e->kind == Ast_CallExpr) { e->CallExpr.tailing = pt; @@ -4020,6 +4021,8 @@ gb_internal ProcCallingConvention string_to_calling_convention(String const &s) if (s == "win64") return ProcCC_Win64; if (s == "sysv") return ProcCC_SysV; + if (s == "preserve/none") return ProcCC_PreserveNone; + if (s == "system") { if (build_context.metrics.os == TargetOs_windows) { return ProcCC_StdCall; |