-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Move token tree related lexer state to a separate struct #60763
Conversation
r? @pnkfelix (rust_highfive has picked a reviewer for you, use r? to override) |
248b837
to
64d1066
Compare
Turns out it is possible to move a whole bunch of stuff to tt-specifc code. Previously, StringReader played a dual role of both producer and consumer of tokens. Now consumption and peeking logic is fully within If the logic for joint-ness checking looks strange it is because it was, in fact, pretty non-obvious. See https://github.com/rust-lang/rust/pull/50838/files#r283296243 |
We only used a bunch of fields when tokenizing into a token tree, so let's move them out of the base lexer
See https://github.com/rust-lang/rust/pull/50838/files#r283296243 for explanation how jointness checking works with *next* pair
@bors r+ |
📌 Commit e249f2e has been approved by |
Move token tree related lexer state to a separate struct Just a types-based refactoring. We only used a bunch of fields when tokenizing into a token tree, so let's move them out of the base lexer
Move token tree related lexer state to a separate struct Just a types-based refactoring. We only used a bunch of fields when tokenizing into a token tree, so let's move them out of the base lexer
Move token tree related lexer state to a separate struct Just a types-based refactoring. We only used a bunch of fields when tokenizing into a token tree, so let's move them out of the base lexer
Rollup of 9 pull requests Successful merges: - #59825 (string: implement From<&String> for String) - #59923 (Fix convert module's documentation links) - #60691 (Include expression to wait for to the span of Await) - #60763 (Move token tree related lexer state to a separate struct) - #60769 (Update rustc book CLI docs.) - #60811 (Bump measureme dependency to 0.3) - #60816 (README.md: Mention MSVC 2017+, not 2013(!)) - #60827 (Use `Symbol` more in lint APIs) - #60851 (Move `box` from the stable keyword to unstable keywords list) Failed merges: r? @ghost
Move token tree related lexer state to a separate struct Just a types-based refactoring. We only used a bunch of fields when tokenizing into a token tree, so let's move them out of the base lexer
Move token tree related lexer state to a separate struct Just a types-based refactoring. We only used a bunch of fields when tokenizing into a token tree, so let's move them out of the base lexer
☀️ Test successful - checks-travis, status-appveyor |
Just a types-based refactoring.
We only used a bunch of fields when tokenizing into a token tree, so let's move them out of the base lexer