Uh oh!
There was an error while loading. Please reload this page.
Remove trivia tokens - #76170
Conversation
matklad
commented
Aug 31, 2020
Builds on the #76166 This doesn't actually remove associated enum variants just yet, but, surprisingly, just never constructiong those variants works without any additional tweaks anywhere. |
matklad
commented
Aug 31, 2020
I think the end result here would be something like cratefntokenize_into_token_trees(sess:&'aParseSess,source_file:Lrc<rustc_span::SourceFile>,override_span:Option<Span>,) -> (PResult<'a,TokenStream>,Vec<UnmatchedBrace>)Ie, |
Uh oh!
There was an error while loading. Please reload this page.
matklad
commented
Sep 1, 2020
Ready for review @petrochenkov! I've decided to leave overall code shape changes (fully privatising StringReader) to a follow up PR, to separate pure refactoring from changes to core data structures. |
matklad
commented
Sep 1, 2020
Wait, tests fail locally... |
This `joint_to_prev` bit of state is no longer needed.
| if !self.token.is_op() { | ||
| is_joint = NonJoint; | ||
| } |
There was a problem hiding this comment.
I originally forgot this condition, and that failed some proc-macro tests. This is a bit weird -- I would expect this jointness censoring to happen at the proc_macro_srv layer, and not here.
There was a problem hiding this comment.
Yes, this check should be moved to proc macro server.
Also lexer should produce the jointness flag for the "delimited group" token trees as well (the match branches above). (Two of such flags, actually, for both the opening and the closing delimiter.)
There was a problem hiding this comment.
Should I do this in this PR, or a separate one?
I've also rebased #75528 on top of this PR, seems to work
There was a problem hiding this comment.
Should I do this in this PR, or a separate one?
Whichever is more convenient.
matklad
commented
Sep 1, 2020
Ok, should be good to go now! |
petrochenkov
commented
Sep 1, 2020
@bors r+ |
bors
commented
Sep 1, 2020
📌 Commit fabd8a6 has been approved by |
bors
commented
Sep 2, 2020
bors
commented
Sep 2, 2020
☀️ Test successful - checks-actions, checks-azure |
r? @ghost