From 272d8bfd9c7b04b32f32b327833057469e8de05a Mon Sep 17 00:00:00 2001 From: Leo Tenenbaum Date: Thu, 10 Oct 2019 23:47:46 -0400 Subject: cgen more types, unary, etc. --- parse.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'parse.c') diff --git a/parse.c b/parse.c index f0fe705..f949794 100644 --- a/parse.c +++ b/parse.c @@ -327,11 +327,12 @@ static bool parse_type(Parser *p, Type *type) { } t->token++; /* move past ) */ Type *ret_type = type->fn.types; - /* if there's a symbol that isn't [ or (, that can't be the start of a type */ + /* if there's a symbol that isn't [, (, or &, that can't be the start of a type */ if ((t->token->kind == TOKEN_KW && t->token->kw <= KW_LAST_SYMBOL && t->token->kw != KW_LSQUARE - && t->token->kw != KW_LPAREN) + && t->token->kw != KW_LPAREN + && t->token->kw != KW_AMPERSAND) || t->token->kw == KW_AS) { ret_type->kind = TYPE_VOID; ret_type->flags = 0; -- cgit v1.2.3