diff options
| author | Kimplul <kimi.h.kuparinen@gmail.com> | 2023-11-13 18:05:33 +0200 |
|---|---|---|
| committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2023-11-13 18:05:33 +0200 |
| commit | b00da3db7c1d7f1e16b2e0446234dc42d54b8708 (patch) | |
| tree | 3292fa94dfe02aad7036b7627e17f6980d2bcbc0 /src/parser.y | |
| parent | 5b5f6321c743e9a521e45865312a76ae0bffe450 (diff) | |
| download | ek-b00da3db7c1d7f1e16b2e0446234dc42d54b8708.tar.gz ek-b00da3db7c1d7f1e16b2e0446234dc42d54b8708.zip | |
further simplification of scope concept
Diffstat (limited to 'src/parser.y')
| -rw-r--r-- | src/parser.y | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/src/parser.y b/src/parser.y index 236a106..6975041 100644 --- a/src/parser.y +++ b/src/parser.y @@ -570,23 +570,17 @@ type | "^" func_sign { /* still not entirely sold on this signature, but it's not terrible I * guess */ - $$ = gen_type(AST_TYPE_POINTER, NULL, NULL, NULL); - $$->_type.next = $2; + $$ = gen_type(AST_TYPE_POINTER, $2, NULL, NULL); } | "*" type { - $$ = gen_type(AST_TYPE_POINTER, NULL, NULL, NULL); - $$->_type.next = $2; + $$ = gen_type(AST_TYPE_POINTER, $2, NULL, NULL); } | "[" const_expr "]" type { - $$ = gen_type(AST_TYPE_ARR, NULL, $2, NULL); - $$->_type.next = $4; + $$ = gen_type(AST_TYPE_ARR, $2, $4, NULL); } | "typeof" expr { $$ = gen_type(AST_TYPE_TYPEOF, NULL, $2, NULL); } - | id "::" type { - $$ = gen_type(AST_TYPE_MEMBER, $1, $3, NULL); - } | "const" type { $$ = $2; } |
