mirror of
https://github.com/odin-lang/Odin.git
synced 2026-06-03 17:24:39 +00:00
Correct the Array_Type.len comment and assign tok when making Ellipsis node
This commit is contained in:
@@ -757,7 +757,7 @@ Array_Type :: struct {
|
||||
using node: Expr,
|
||||
open: tokenizer.Pos,
|
||||
tag: ^Expr,
|
||||
len: ^Expr, // Ellipsis node for [?]T array types, nil for slice types
|
||||
len: ^Expr, // Unary_Expr node for [?]T array types, nil for slice types
|
||||
close: tokenizer.Pos,
|
||||
elem: ^Expr,
|
||||
}
|
||||
|
||||
@@ -1778,6 +1778,7 @@ parse_var_type :: proc(p: ^Parser, flags: ast.Field_Flags) -> ^ast.Expr {
|
||||
type = ast.new(ast.Bad_Expr, tok.pos, end_pos(tok))
|
||||
}
|
||||
e := ast.new(ast.Ellipsis, type.pos, type)
|
||||
e.tok = tok.kind
|
||||
e.expr = type
|
||||
return e
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user