[refactoring] update ast structure of "While" node

This commit is contained in:
Vadym Slizov
2020-09-04 10:33:47 +03:00
parent 6976388a82
commit 3b85f5e82b
21 changed files with 1066 additions and 1162 deletions

View File

@@ -196,23 +196,6 @@ func (t *DFS) Traverse(n ast.Vertex) {
t.Traverse(nn.CaseList)
t.visitor.Leave("CaseList", true)
}
case *ast.StmtAltWhile:
if nn == nil {
return
}
if !t.visitor.EnterNode(nn) {
return
}
if nn.Cond != nil {
t.visitor.Enter("Cond", true)
t.Traverse(nn.Cond)
t.visitor.Leave("Cond", true)
}
if nn.Stmt != nil {
t.visitor.Enter("Stmt", true)
t.Traverse(nn.Stmt)
t.visitor.Leave("Stmt", true)
}
case *ast.StmtBreak:
if nn == nil {
return