diff options
| author | Kimplul <kimi.h.kuparinen@gmail.com> | 2025-01-15 19:14:58 +0200 |
|---|---|---|
| committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2025-01-15 19:25:59 +0200 |
| commit | 7eaa051d4dcc3048c46f302997fd2175a983ac0e (patch) | |
| tree | 7734373551b8d0ac87a2857965fbc63067df1006 /src/parser.y | |
| parent | 164625327bd057141edf84339d4b43b2a8e2de24 (diff) | |
| download | ek-7eaa051d4dcc3048c46f302997fd2175a983ac0e.tar.gz ek-7eaa051d4dcc3048c46f302997fd2175a983ac0e.zip | |
improve generics expansion
Diffstat (limited to 'src/parser.y')
| -rw-r--r-- | src/parser.y | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/parser.y b/src/parser.y index 3808807..18de0e1 100644 --- a/src/parser.y +++ b/src/parser.y @@ -643,13 +643,15 @@ opt_sign_decls type : ID { $$ = tgen_id($1, src_loc(@$)); } - | "^" "(" opt_sign_decls "=>" opt_type ")" { + | "*" "(" opt_sign_decls "=>" opt_type ")" { /* still not entirely sold on this signature, but it's not terrible I * guess */ $$ = tgen_callable($[opt_sign_decls], $[opt_type], src_loc(@$)); + $$ = tgen_ptr($$, src_loc(@$)); } - | "^" "(" opt_sign_decls ")" { + | "*" "(" opt_sign_decls ")" { $$ = tgen_callable($[opt_sign_decls], NULL, src_loc(@$)); + $$ = tgen_ptr($$, src_loc(@$)); } | "*" type { $$ = tgen_ptr($2, src_loc(@$)); |
