Skip to content

Commit

Permalink
Still trying to fix switch
Browse files Browse the repository at this point in the history
  • Loading branch information
elliotchance committed Apr 25, 2017
1 parent 61f8c49 commit 7a3bb7d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ast/switch_stmt.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func (n *SwitchStmt) render(program *program.Program) (string, string) {

condition, _ := n.Children[len(n.Children)-2].render(program)

n.Children[3].(*CompoundStmt).belongsToSwitch = true
n.Children[len(n.Children)-1].(*CompoundStmt).belongsToSwitch = true
body, _ := n.Children[len(n.Children)-1].render(program)

out := fmt.Sprintf("switch %s {\n%s\n}\n", condition, body)
Expand Down

0 comments on commit 7a3bb7d

Please sign in to comment.