mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 15:48:51 +00:00
Fix minor parsing issue for polymorphic identifiers
This commit is contained in:
+1
-1
@@ -1370,7 +1370,7 @@ Ast *parse_ident(AstFile *f, bool allow_poly_names=false) {
|
|||||||
if (token.kind == Token_Ident) {
|
if (token.kind == Token_Ident) {
|
||||||
advance_token(f);
|
advance_token(f);
|
||||||
} else if (allow_poly_names && token.kind == Token_Dollar) {
|
} else if (allow_poly_names && token.kind == Token_Dollar) {
|
||||||
Token dollar = token;
|
Token dollar = expect_token(f, Token_Dollar);
|
||||||
Ast *name = ast_ident(f, expect_token(f, Token_Ident));
|
Ast *name = ast_ident(f, expect_token(f, Token_Ident));
|
||||||
return ast_poly_type(f, dollar, name, nullptr);
|
return ast_poly_type(f, dollar, name, nullptr);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user