Remove unnecessary if in parser.Dump

Signed-off-by: Anthony Sottile <asottile@umich.edu>
This commit is contained in:
Anthony Sottile 2017-01-28 23:05:48 -08:00
parent 8820d0aec0
commit 2283cd0203

View file

@ -21,13 +21,11 @@ func (node *Node) Dump() string {
str += "(" + n.Dump() + ")\n"
}
if node.Next != nil {
for n := node.Next; n != nil; n = n.Next {
if len(n.Children) > 0 {
str += " " + n.Dump()
} else {
str += " " + strconv.Quote(n.Value)
}
for n := node.Next; n != nil; n = n.Next {
if len(n.Children) > 0 {
str += " " + n.Dump()
} else {
str += " " + strconv.Quote(n.Value)
}
}