ast_lowering: Stop wrapping ident
matchers into groups
The lowered forms goes to metadata, for example during encoding of macro definitions
This commit is contained in:
parent
297a8018b5
commit
a150fc2990
3 changed files with 10 additions and 18 deletions
|
@ -132,6 +132,9 @@ impl<'a> FlattenNonterminals<'a> {
|
|||
|
||||
pub fn process_token(&mut self, token: Token) -> TokenStream {
|
||||
match token.kind {
|
||||
token::Interpolated(nt) if let token::NtIdent(ident, is_raw) = *nt => {
|
||||
TokenTree::Token(Token::new(token::Ident(ident.name, is_raw), ident.span)).into()
|
||||
}
|
||||
token::Interpolated(nt) => {
|
||||
let tts = (self.nt_to_tokenstream)(&nt, self.parse_sess, self.synthesize_tokens);
|
||||
TokenTree::Delimited(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue