summaryrefslogtreecommitdiff
path: root/parse.c
diff options
context:
space:
mode:
Diffstat (limited to 'parse.c')
-rw-r--r--parse.c5
1 files changed, 3 insertions, 2 deletions
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;