refactoring: remove StmtTraitAdaptationList node

This commit is contained in:
Vadym Slizov
2020-12-20 23:04:23 +02:00
parent 74b0949255
commit 03c7979ccd
17 changed files with 1900 additions and 2072 deletions

View File

@@ -812,20 +812,6 @@ func (t *DFS) Traverse(n ast.Vertex) {
}
t.visitor.Leave("Stmts", false)
}
case *ast.StmtTraitAdaptationList:
if nn == nil {
return
}
if !t.visitor.EnterNode(nn) {
return
}
if nn.Adaptations != nil {
t.visitor.Enter("Adaptations", false)
for _, c := range nn.Adaptations {
t.Traverse(c)
}
t.visitor.Leave("Adaptations", false)
}
case *ast.StmtTraitMethodRef:
if nn == nil {
return
@@ -858,9 +844,11 @@ func (t *DFS) Traverse(n ast.Vertex) {
t.visitor.Leave("Traits", false)
}
if nn.Adaptations != nil {
t.visitor.Enter("Adaptations", true)
t.Traverse(nn.Adaptations)
t.visitor.Leave("Adaptations", true)
t.visitor.Enter("Adaptations", false)
for _, c := range nn.Adaptations {
t.Traverse(c)
}
t.visitor.Leave("Adaptations", false)
}
case *ast.StmtTraitUseAlias:
if nn == nil {