Skip to content

Added tokenstream parser procedure #34829

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 1 commit into from
Jul 17, 2016
Merged

Added tokenstream parser procedure #34829

merged 1 commit into from
Jul 17, 2016

Conversation

cgswords
Copy link
Contributor

A tiny PR that simply adds a procedure for parsing TokenStreams to the parser in src/libsyntax. This is to ease using TokenStreams with the current (old) procedural macro system.

@rust-highfive
Copy link
Contributor

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @nrc (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

@@ -228,6 +228,12 @@ pub fn new_parser_from_tts<'a>(sess: &'a ParseSess,
tts_to_parser(sess, tts, cfg)
}

pub fn new_parser_from_ts<'a>(sess: &'a ParseSess,
cfg: ast::CrateConfig,
tts: tokenstream::TokenStream) -> Parser<'a> {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nits: argument alignment; return type should be on a new line

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

another nit: tts -> ts

@nrc
Copy link
Member

nrc commented Jul 15, 2016

r=me with the nits addressed

@jseyfried
Copy link
Contributor

@bors r=nrc

@bors
Copy link
Collaborator

bors commented Jul 16, 2016

📌 Commit fecf3b6 has been approved by nrc

@bors
Copy link
Collaborator

bors commented Jul 17, 2016

⌛ Testing commit fecf3b6 with merge 6aba7be...

bors added a commit that referenced this pull request Jul 17, 2016
Added tokenstream parser procedure

A tiny PR that simply adds a procedure for parsing `TokenStream`s to the parser in `src/libsyntax`. This is to ease using `TokenStream`s with the current (old) procedural macro system.
@bors bors merged commit fecf3b6 into rust-lang:master Jul 17, 2016
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