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