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