From 5f07055ac1548e6254651f40a23e74093a9bebfe Mon Sep 17 00:00:00 2001 From: gingerBill Date: Thu, 15 Jan 2026 17:28:28 +0000 Subject: Add `#must_tail` and `"preserve/none"` calling convention --- src/parser.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/parser.cpp') 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; -- cgit v1.2.3