diff options
| author | Ginger Bill <bill@gingerbill.org> | 2017-06-21 17:49:05 +0100 |
|---|---|---|
| committer | Ginger Bill <bill@gingerbill.org> | 2017-06-21 17:49:05 +0100 |
| commit | 264ca00db72f56e2af8242a90e35a49b6ae13f86 (patch) | |
| tree | c7a1f170fea7c22b4d3734282716b0ee0e74ad7c /src/parser.cpp | |
| parent | 6b65ef6d8847ea7dcb23a556e12daae69738c5c2 (diff) | |
| parent | 5957d7f7bee7e5fac4035d47ecaaaad022adbfb8 (diff) | |
Merge branch 'master' of https://github.com/gingerBill/Odin
Diffstat (limited to 'src/parser.cpp')
| -rw-r--r-- | src/parser.cpp | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/src/parser.cpp b/src/parser.cpp index d09db81d2..1b1bfcdaf 100644 --- a/src/parser.cpp +++ b/src/parser.cpp @@ -91,11 +91,12 @@ enum ProcTag { }; enum ProcCallingConvention { - ProcCC_Invalid = 0, - ProcCC_Odin = 1, - ProcCC_C = 2, - ProcCC_Std = 3, - ProcCC_Fast = 4, + ProcCC_Invalid = 0, + ProcCC_Odin = 1, + ProcCC_Contextless = 2, + ProcCC_C = 3, + ProcCC_Std = 4, + ProcCC_Fast = 5, }; enum VarDeclFlag { @@ -2070,14 +2071,18 @@ void parse_proc_tags(AstFile *f, u64 *tags, String *link_name, ProcCallingConven ELSE_IF_ADD_TAG(no_bounds_check) ELSE_IF_ADD_TAG(inline) ELSE_IF_ADD_TAG(no_inline) - // ELSE_IF_ADD_TAG(dll_import) - // ELSE_IF_ADD_TAG(dll_export) else if (tag_name == "cc_odin") { if (cc == ProcCC_Invalid) { cc = ProcCC_Odin; } else { syntax_error(tag_expr, "Multiple calling conventions for procedure type"); } + } else if (tag_name == "cc_contextless") { + if (cc == ProcCC_Invalid) { + cc = ProcCC_Contextless; + } else { + syntax_error(tag_expr, "Multiple calling conventions for procedure type"); + } } else if (tag_name == "cc_c") { if (cc == ProcCC_Invalid) { cc = ProcCC_C; |