mirror of
https://github.com/golang/go.git
synced 2025-05-29 03:11:26 +00:00
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: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
parent
ed4a27a8dd
commit
9c8f549abb
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user