]> Cypherpunks repositories - gostls13.git/commit
cmd/compile/internal/syntax: consider function nesting for error recovery
authorgriesemer <gri@golang.org>
Tue, 10 Oct 2017 23:56:56 +0000 (16:56 -0700)
committerRobert Griesemer <gri@golang.org>
Wed, 11 Oct 2017 00:29:58 +0000 (00:29 +0000)
commit68e390304e94ef6c86f875c6a5e4514f7d5ba50f
tree76a6e3a267cef7533ef86c2b72533a289481ba11
parent39edffb6b1632e6d22d8e1b399e57cbba7456b9d
cmd/compile/internal/syntax: consider function nesting for error recovery

This re-enables functionality that inadvertently was disabled in the
(long) past.

Also, don't perform branch checks if we had errors in a function
to avoid spurious errors or (worst-case) crashes.

Slightly modified test/fixedbugs/issue14006.go to make sure the
test still reports invalid label errors (the surrounding function
must be syntactically correct).

Change-Id: Id5642930877d7cf3400649094ec75c753b5084b7
Reviewed-on: https://go-review.googlesource.com/69770
Run-TryBot: Robert Griesemer <gri@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/cmd/compile/internal/syntax/parser.go
test/fixedbugs/issue14006.go