mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
ast: clean up ast.StructInit (#18387)
This commit is contained in:
@ -437,18 +437,6 @@ pub mut:
|
||||
parent_type Type
|
||||
}
|
||||
|
||||
pub struct StructInitEmbed {
|
||||
pub:
|
||||
pos token.Pos
|
||||
comments []Comment
|
||||
next_comments []Comment
|
||||
pub mut:
|
||||
expr Expr
|
||||
name string
|
||||
typ Type
|
||||
expected_type Type
|
||||
}
|
||||
|
||||
// `s := Foo{
|
||||
// ...a
|
||||
// field1: 'hello'
|
||||
@ -473,7 +461,6 @@ pub mut:
|
||||
is_update_embed bool
|
||||
has_update_expr bool // has `...a`
|
||||
fields []StructInitField
|
||||
embeds []StructInitEmbed
|
||||
generic_types []Type
|
||||
}
|
||||
|
||||
|
@ -418,9 +418,6 @@ fn (mut w Walker) expr(node_ ast.Expr) {
|
||||
for sif in node.fields {
|
||||
w.expr(sif.expr)
|
||||
}
|
||||
for sie in node.embeds {
|
||||
w.expr(sie.expr)
|
||||
}
|
||||
}
|
||||
ast.TypeOf {
|
||||
w.expr(node.expr)
|
||||
|
@ -662,9 +662,6 @@ pub fn (mut t Transformer) expr(mut node ast.Expr) ast.Expr {
|
||||
for mut field in node.fields {
|
||||
field.expr = t.expr(mut field.expr)
|
||||
}
|
||||
for mut embed in node.embeds {
|
||||
embed.expr = t.expr(mut embed.expr)
|
||||
}
|
||||
}
|
||||
ast.UnsafeExpr {
|
||||
node.expr = t.expr(mut node.expr)
|
||||
|
Reference in New Issue
Block a user