diff options
| author | gingerBill <gingerBill@users.noreply.github.com> | 2026-01-30 10:49:55 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-01-30 10:49:55 +0000 |
| commit | 19b545e7cb0b09a7c8b3424ca8276b9e37f8de80 (patch) | |
| tree | 974b844bf082c526f6a12396c4a80adfc73b9a60 /src/parser.hpp | |
| parent | 8b745c3909a3482aebe27998d8b870286e448e35 (diff) | |
| parent | 5a21213fa5e2c74d5021adb2a87f0cc441a38eab (diff) | |
Merge branch 'master' into bill/feature-using-stmt
Diffstat (limited to 'src/parser.hpp')
| -rw-r--r-- | src/parser.hpp | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/src/parser.hpp b/src/parser.hpp index 71b61d95f..39f56ffae 100644 --- a/src/parser.hpp +++ b/src/parser.hpp @@ -263,12 +263,17 @@ struct ForeignFileWorkerData { -enum ProcInlining { - ProcInlining_none = 0, - ProcInlining_inline = 1, +enum ProcInlining : u8 { + ProcInlining_none = 0, + ProcInlining_inline = 1, ProcInlining_no_inline = 2, }; +enum ProcTailing : u8 { + ProcTailing_none = 0, + ProcTailing_must_tail = 1, +}; + enum ProcTag { ProcTag_bounds_check = 1<<0, ProcTag_no_bounds_check = 1<<1, @@ -296,6 +301,9 @@ enum ProcCallingConvention : i32 { ProcCC_Win64 = 9, ProcCC_SysV = 10, + ProcCC_PreserveNone = 11, + ProcCC_PreserveMost = 12, + ProcCC_PreserveAll = 13, ProcCC_MAX, @@ -315,6 +323,9 @@ gb_global char const *proc_calling_convention_strings[ProcCC_MAX] = { "inlineasm", "win64", "sysv", + "preserve/none", + "preserve/most", + "preserve/all", }; gb_internal ProcCallingConvention default_calling_convention(void) { @@ -441,6 +452,7 @@ struct AstSplitArgs { Ast *body; \ u64 tags; \ ProcInlining inlining; \ + ProcTailing tailing; \ Token where_token; \ Slice<Ast *> where_clauses; \ DeclInfo *decl; \ @@ -486,6 +498,7 @@ AST_KIND(_ExprBegin, "", bool) \ Token close; \ Token ellipsis; \ ProcInlining inlining; \ + ProcTailing tailing; \ bool optional_ok_one; \ bool was_selector; \ AstSplitArgs *split_args; \ @@ -767,6 +780,7 @@ AST_KIND(_TypeBegin, "", bool) \ bool is_raw_union; \ bool is_no_copy; \ bool is_all_or_none; \ + bool is_simple; \ }) \ AST_KIND(UnionType, "union type", struct { \ Scope *scope; \ |