1
0
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:
yuyi
2023-06-09 22:43:21 +08:00
committed by GitHub
parent 7a25c03aa7
commit dd1d5bca1b
4 changed files with 0 additions and 41 deletions

View File

@ -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
}

View File

@ -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)

View File

@ -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)