Remove Nonterminal::NtTT
.
It's only needed for macro expansion, not as a general element in the AST. This commit removes it, adds `NtOrTt` for the parser and macro expansion cases, and renames the variants in `NamedMatch` to better match the new type.
This commit is contained in:
parent
8a0c55046c
commit
364b908d57
10 changed files with 52 additions and 55 deletions
|
@ -19,7 +19,7 @@ pub use pat::{CommaRecoveryMode, RecoverColon, RecoverComma};
|
|||
pub use path::PathStyle;
|
||||
|
||||
use rustc_ast::ptr::P;
|
||||
use rustc_ast::token::{self, DelimToken, Token, TokenKind};
|
||||
use rustc_ast::token::{self, DelimToken, Nonterminal, Token, TokenKind};
|
||||
use rustc_ast::tokenstream::AttributesData;
|
||||
use rustc_ast::tokenstream::{self, DelimSpan, Spacing};
|
||||
use rustc_ast::tokenstream::{TokenStream, TokenTree};
|
||||
|
@ -1507,3 +1507,9 @@ pub enum FlatToken {
|
|||
/// handling of replace ranges.
|
||||
Empty,
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub enum NtOrTt {
|
||||
Nt(Nonterminal),
|
||||
Tt(TokenTree),
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue