Move token tree related lexer state to a separate struct#60763
Merged
bors merged 3 commits intorust-lang:masterfrom May 16, 2019
Merged
Move token tree related lexer state to a separate struct#60763bors merged 3 commits intorust-lang:masterfrom
bors merged 3 commits intorust-lang:masterfrom
Conversation
Contributor
Author
Contributor
|
r? @pnkfelix (rust_highfive has picked a reviewer for you, use r? to override) |
248b837 to
64d1066
Compare
Contributor
Author
|
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
Contributor
|
@bors r+ |
Collaborator
|
📌 Commit e249f2e has been approved by |
Centril
added a commit
to Centril/rust
that referenced
this pull request
May 15, 2019
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
Centril
added a commit
to Centril/rust
that referenced
this pull request
May 15, 2019
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
Centril
added a commit
to Centril/rust
that referenced
this pull request
May 15, 2019
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
bors
added a commit
that referenced
this pull request
May 15, 2019
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
Centril
added a commit
to Centril/rust
that referenced
this pull request
May 15, 2019
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
Collaborator
bors
added a commit
that referenced
this pull request
May 16, 2019
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
Collaborator
|
☀️ Test successful - checks-travis, status-appveyor |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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