Skip to content

libsyntax Parser does not allow parsing view items individually #19024

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

Closed
murarth opened this issue Nov 17, 2014 · 0 comments · Fixed by #19044
Closed

libsyntax Parser does not allow parsing view items individually #19024

murarth opened this issue Nov 17, 2014 · 0 comments · Fixed by #19044

Comments

@murarth
Copy link
Contributor

murarth commented Nov 17, 2014

Parser method parse_item will unconditionally fail if it encounters a view item (use or extern crate).
This is desired behavior if parsing the body of a function. However, there are no public methods that allow parsing either of these items individually. This makes it impossible to parse the full range of possible input to a REPL.
If it's acceptable, I could make a pull request for public methods parse_use (which already exists, privately) and parse_extern_crate.

bors added a commit that referenced this issue Nov 18, 2014
Allows parsing view items (`use` and `extern crate`) individually. Does not change behavior of any existing functions.

Closes #19024
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 a pull request may close this issue.

1 participant