Commit 9c8f549a authored by Josh Bleecher Snyder's avatar Josh Bleecher Snyder

cmd/compile: continue is the new goto loop

Passes toolstash -cmp.

Change-Id: I014613985005780d1a622c1981b35a94cda798bb
Reviewed-on: https://go-review.googlesource.com/20530
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
Reviewed-by: default avatarMatthew Dempsky <mdempsky@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
parent ed4a27a8
......@@ -2073,7 +2073,6 @@ func (p *parser) xdcl_list() (l []*Node) {
defer p.trace("xdcl_list")()
}
loop:
for p.tok != EOF {
switch p.tok {
case LVAR, LCONST, LTYPE:
......@@ -2090,7 +2089,7 @@ loop:
p.syntax_error("non-declaration statement outside function body")
}
p.advance(LVAR, LCONST, LTYPE, LFUNC)
goto loop
continue
}
if nsyntaxerrors == 0 {
......@@ -2104,7 +2103,6 @@ loop:
if p.tok != EOF && !p.got(';') {
p.syntax_error("after top level declaration")
p.advance(LVAR, LCONST, LTYPE, LFUNC)
goto loop
}
}
return
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment