Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/compile/internal/syntax: always return a "sensible" node in case of errors #19663

Closed
griesemer opened this issue Mar 22, 2017 · 3 comments
Closed
Milestone

Comments

@griesemer
Copy link
Contributor

Reminder issue.

Currently, the syntax parser may return nil for some productions that had errors. Should always return a sensible node; maybe an error node (similar to what go/ast does).

@gopherbot
Copy link

CL https://golang.org/cl/38604 mentions this issue.

gopherbot pushed a commit that referenced this issue Mar 24, 2017
Avoid construction of incorrect syntax trees in presence of errors.

For #19663.

Change-Id: I43025a3cf0fe02cae9a57e8bb9489b5f628c3fd7
Reviewed-on: https://go-review.googlesource.com/38604
Run-TryBot: Robert Griesemer <gri@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
@gopherbot
Copy link

CL https://golang.org/cl/38653 mentions this issue.

@gopherbot
Copy link

CL https://golang.org/cl/38656 mentions this issue.

gopherbot pushed a commit that referenced this issue Mar 25, 2017
… TODO)

Now that we have consistent use of xOrNil parse methods, we don't
need a special missing_statement singleton to distinguish between
missing actually statements and other errors (which have returned
nil before).

For #19663.

Change-Id: I8364f1441bdf8dd966bcd6d8219b2a42d6b88abd
Reviewed-on: https://go-review.googlesource.com/38656
Run-TryBot: Robert Griesemer <gri@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
@golang golang locked and limited conversation to collaborators Mar 25, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants