summaryrefslogtreecommitdiff
path: root/src/parser/parser_type.c
diff options
context:
space:
mode:
authorZuhaitz Méndez Fernández de Aránguiz <zuhaitz@debian>2026-01-24 01:39:38 +0000
committerZuhaitz Méndez Fernández de Aránguiz <zuhaitz@debian>2026-01-24 01:39:52 +0000
commit3df7cada4c3d050a01980afffdbfc0fc60be0fb5 (patch)
treeaa1dd603039d284f58b62c89bb662fd74c19deda /src/parser/parser_type.c
parent769d8ff1a1fd898e1a8c8b299f7e7fa444f32528 (diff)
Fix for #106
Diffstat (limited to 'src/parser/parser_type.c')
-rw-r--r--src/parser/parser_type.c3
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);