diff options
| author | Kimplul <kimi.h.kuparinen@gmail.com> | 2025-01-25 21:07:37 +0200 |
|---|---|---|
| committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2025-01-25 21:07:37 +0200 |
| commit | 26b79b88ed724d89211e8c3afdebc3c747ef3f67 (patch) | |
| tree | 07f4d8ffa540b3f215d349c8a424221754b35a2c | |
| parent | e8f78907830c525dccf1f4a5e6f97a15780c54ef (diff) | |
| download | ek-26b79b88ed724d89211e8c3afdebc3c747ef3f67.tar.gz ek-26b79b88ed724d89211e8c3afdebc3c747ef3f67.zip | |
allow extern with body to disable name mangling
| -rw-r--r-- | src/parser.y | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/parser.y b/src/parser.y index 45cac92..352a770 100644 --- a/src/parser.y +++ b/src/parser.y @@ -735,6 +735,14 @@ proc $$ = gen_proc($[ID], $[opt_decls], NULL, NULL, src_loc(@$)); ast_set_flags($$, AST_FLAG_EXTERN | AST_FLAG_NOMANGLE); } + | "extern" ID "(" opt_decls ")" body { + $$ = gen_proc($[ID], $[opt_decls], NULL, $[body], src_loc(@$)); + ast_set_flags($$, AST_FLAG_NOMANGLE); + } + | "extern" ID "(" opt_decls "=>" opt_type ")" body { + $$ = gen_proc($[ID], $[opt_decls], $[opt_type], $[body], src_loc(@$)); + ast_set_flags($$, AST_FLAG_NOMANGLE); + } behaviour : type_expand ";" |
