mirror of
https://github.com/odin-lang/Odin.git
synced 2026-06-13 13:53:43 +00:00
Change compound literal grammar to match the formal grammar
This commit is contained in:
@@ -3174,9 +3174,6 @@ is_literal_type :: proc(expr: ^ast.Expr) -> bool {
|
||||
}
|
||||
|
||||
parse_value :: proc(p: ^Parser) -> ^ast.Expr {
|
||||
if p.curr_tok.kind == .Open_Brace {
|
||||
return parse_literal_value(p, nil)
|
||||
}
|
||||
prev_allow_range := p.allow_range
|
||||
defer p.allow_range = prev_allow_range
|
||||
p.allow_range = true
|
||||
|
||||
@@ -2039,9 +2039,6 @@ gb_internal Ast *parse_literal_value(AstFile *f, Ast *type) {
|
||||
}
|
||||
|
||||
gb_internal Ast *parse_value(AstFile *f) {
|
||||
if (f->curr_token.kind == Token_OpenBrace) {
|
||||
return parse_literal_value(f, nullptr);
|
||||
}
|
||||
Ast *value;
|
||||
bool prev_allow_range = f->allow_range;
|
||||
f->allow_range = true;
|
||||
|
||||
Reference in New Issue
Block a user