aboutsummaryrefslogtreecommitdiff
path: root/src/parser.y
diff options
context:
space:
mode:
Diffstat (limited to 'src/parser.y')
-rw-r--r--src/parser.y8
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 ";"