ast: fmt ast.v

pull/7038/head^2
joe-conigliaro 2020-12-01 21:20:27 +11:00
parent 88835a0456
commit f1965c0510
No known key found for this signature in database
GPG Key ID: C12F7136C08206F1
1 changed files with 18 additions and 18 deletions

View File

@ -811,25 +811,25 @@ pub:
pub struct ArrayInit { pub struct ArrayInit {
pub: pub:
pos token.Position // `[]` in []Type{} position pos token.Position // `[]` in []Type{} position
elem_type_pos token.Position // `Type` in []Type{} position elem_type_pos token.Position // `Type` in []Type{} position
exprs []Expr // `[expr, expr]` or `[expr]Type{}` for fixed array exprs []Expr // `[expr, expr]` or `[expr]Type{}` for fixed array
ecmnts [][]Comment // optional iembed comments after each expr ecmnts [][]Comment // optional iembed comments after each expr
is_fixed bool is_fixed bool
has_val bool // fixed size literal `[expr, expr]!!` has_val bool // fixed size literal `[expr, expr]!!`
mod string mod string
len_expr Expr // len: expr len_expr Expr // len: expr
cap_expr Expr // cap: expr cap_expr Expr // cap: expr
default_expr Expr // init: expr default_expr Expr // init: expr
has_len bool has_len bool
has_cap bool has_cap bool
has_default bool has_default bool
pub mut: pub mut:
expr_types []table.Type // [Dog, Cat] // also used for interface_types expr_types []table.Type // [Dog, Cat] // also used for interface_types
is_interface bool // array of interfaces e.g. `[]Animal` `[Dog{}, Cat{}]` is_interface bool // array of interfaces e.g. `[]Animal` `[Dog{}, Cat{}]`
interface_type table.Type // Animal interface_type table.Type // Animal
elem_type table.Type // element type elem_type table.Type // element type
typ table.Type // array type typ table.Type // array type
} }
pub struct ChanInit { pub struct ChanInit {