Skip to content

libsyntax: Add parse_view_item method to Parser #19044

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

Merged
merged 2 commits into from
Nov 19, 2014
Merged

libsyntax: Add parse_view_item method to Parser #19044

merged 2 commits into from
Nov 19, 2014

Conversation

murarth
Copy link
Contributor

@murarth murarth commented Nov 17, 2014

Allows parsing view items (use and extern crate) individually. Does not change behavior of any existing functions.

Closes #19024

@alexcrichton
Copy link
Member

I would expect this to not be duplicated with the rest of the parser, could you update the relevant bits of the parser to call this method instead?

@murarth
Copy link
Contributor Author

murarth commented Nov 18, 2014

Changed parse_view_item so it calls existing internal method parse_item_or_view_item. I don't know why I didn't do that before. I think I wanted better error display (pointing to the token that first generates an error), but if you're calling parse_view_item I think it stands to reason you know there's a ViewItem next in the stream.

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

Closes #19024
@bors bors closed this Nov 19, 2014
@bors bors merged commit 2293a04 into rust-lang:master Nov 19, 2014
@murarth murarth deleted the libsyntax-view-item branch November 19, 2014 01:52
lnicola pushed a commit to lnicola/rust that referenced this pull request Feb 10, 2025
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.

libsyntax Parser does not allow parsing view items individually
3 participants