blynn / nex

Lexer for Go
http://cs.stanford.edu/~blynn/nex/
GNU General Public License v3.0
416 stars 47 forks source link

slightly change generated code to pass "go vet" #20

Closed mschoch closed 9 years ago

mschoch commented 9 years ago

previously rules which explicitly called return would result in generated code which did not pass "go vet" because there was an unreachable continue this change, should be equivalent, the continue in each block has been pushed the first statement after the switch. the break, previously after the switch, has been put inside a new default block at the end of the switch. the break now needs a label to refer to the correct for loop to break out of.