mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
ast: fmt ast.v
This commit is contained in:
parent
88835a0456
commit
f1965c0510
@ -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 {
|
||||||
|
Loading…
Reference in New Issue
Block a user