diff options
Diffstat (limited to 'src/parser/parser_type.c')
| -rw-r--r-- | src/parser/parser_type.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/parser/parser_type.c b/src/parser/parser_type.c index 39a4dc7..5774571 100644 --- a/src/parser/parser_type.c +++ b/src/parser/parser_type.c @@ -483,7 +483,8 @@ Type *parse_type_base(ParserContext *ctx, Lexer *l) ty->is_explicit_struct = explicit_struct; // Handle Generics <T> or <K, V> - if (lexer_peek(l).type == TOK_LANGLE) + if (lexer_peek(l).type == TOK_LANGLE || + (lexer_peek(l).type == TOK_OP && strncmp(lexer_peek(l).start, "<", 1) == 0)) { lexer_next(l); // eat < Type *first_arg = parse_type_formal(ctx, l); |
