diff --git a/src/go/parser/parser.go b/src/go/parser/parser.go index 1207b5f24b98e3..6061c10a31cfd4 100644 --- a/src/go/parser/parser.go +++ b/src/go/parser/parser.go @@ -2050,7 +2050,7 @@ func (p *parser) parseBranchStmt(tok token.Token) *ast.BranchStmt { pos := p.expect(tok) var label *ast.Ident - if (tok != token.FALLTHROUGH && p.tok == token.IDENT) || tok == token.GOTO { + if tok == token.GOTO || ((tok == token.CONTINUE || tok == token.BREAK) && p.tok == token.IDENT) { label = p.parseIdent() } p.expectSemi()