Refactor the parser to consume token trees by jseyfried · Pull Request #39118 · rust-lang/rust (original) (raw)

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 andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation5 Commits8 Checks0 Files changed

Conversation

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters

[ Show hidden characters]({{ revealButtonHref }})

jseyfried

This is groundwork for efficiently parsing attribute proc macro invocations, bang macro invocations, and TokenStream-based attributes and fragment matchers.

This improves parsing performance by 8-15% and expansion performance by 0-5% on a sampling of the compiler's crates.

r? @nrc

@jseyfried

@jseyfried

@jseyfried

@nrc

This looks great. I'm a little concerned about the commit removing the lookahead buffer - is that because we never use lookahead now?

@nrc

Oh, right, you can look ahead in the Tok stream without it, I guess?

@nrc

@bors

📌 Commit 0b9e26f has been approved by nrc

@jseyfried

Yeah, we look ahead in parser.tts directly.

alexcrichton added a commit to alexcrichton/rust that referenced this pull request

Jan 20, 2017

@alexcrichton

…r=nrc

Refactor the parser to consume token trees

This is groundwork for efficiently parsing attribute proc macro invocations, bang macro invocations, and TokenStream-based attributes and fragment matchers.

This improves parsing performance by 8-15% and expansion performance by 0-5% on a sampling of the compiler's crates.

r? @nrc

bors added a commit that referenced this pull request

Jan 20, 2017

@bors

Rollup of 28 pull requests

bors added a commit that referenced this pull request

Jan 21, 2017

@bors

Rollup of 28 pull requests