Re-order switch cases for consistency

This commit is contained in:
Nigel Tao committed 2018-11-10 11:25:51 +11:00
1 parent 48c7d1c030
commit 808d5c1e6c
1 file changed
+5 -5
+5 -5
View File
@@ -234,6 +234,11 @@ func (g *gen) visitVars(b *buffer, block []*a.Node, depth uint32, f func(*gen, *
for _, o := range block {
switch o.Kind() {
case a.KIOBind:
if err := g.visitVars(b, o.AsIOBind().Body(), depth, f); err != nil {
return err
}
case a.KIf:
for o := o.AsIf(); o != nil; o = o.ElseIf() {
if err := g.visitVars(b, o.BodyIfTrue(), depth, f); err != nil {
@@ -244,11 +249,6 @@ func (g *gen) visitVars(b *buffer, block []*a.Node, depth uint32, f func(*gen, *
}
}
case a.KIOBind:
if err := g.visitVars(b, o.AsIOBind().Body(), depth, f); err != nil {
return err
}
case a.KIterate:
if err := g.visitVars(b, o.AsIterate().Variables(), depth, f); err != nil {
return err