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

Parser backports for beta #32795

Merged
merged 5 commits into from
Apr 7, 2016

Conversation

pnkfelix
Copy link
Member

@pnkfelix pnkfelix commented Apr 7, 2016

Backports of various T-compiler tickets for the parser to be applied to the beta branch.

Remove label:beta-nominated from #32435, #32479, and #32494.

r? @nikomatsakis

eddyb and others added 5 commits April 7, 2016 15:01
backport of 221d0fb to beta
with hand-resolution of conflicts and reverting to `try!` syntax.
This works by adding a boolean flag, `continue_after_error`, to
`syntax::errors::Handler` that can be imperatively set to `true` or
`false` via a new `fn set_continue_after_error`.

The flag starts off true (since we generally try to recover from
compiler errors, and `Handler` is shared across all phases).

Then, during the `phase_1_parse_input`, we consult the setting of the
`-Z continue-parse-after-error` debug flag to determine whether we
should leave the flag set to `true` or should change it to `false`.

----

(We might consider adding a debugflag to do such aborts in other
places where we are currently attempting recovery, such as resolve,
but I think the parser is the really important case to handle in the
face of rust-lang#31994 and the parser bugs of varying degrees that were
injected by parse error recovery.)
parser recovery (so that expected errors match up)

I'm opting into parser recovery in all these cases out of expediency,
not because the error messages you get with recovery enabled are
actually all that usable in all cases listed.
@rust-highfive
Copy link
Collaborator

warning Warning warning

  • Pull requests are usually filed against the master branch for this repo, but this one is against beta. Please double check that you specified the right target!

@nikomatsakis nikomatsakis merged commit f837383 into rust-lang:beta Apr 7, 2016
@nikomatsakis
Copy link
Contributor

r+

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants