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:
@@ -289,7 +289,6 @@ pub fn nt_to_tokenstream(
|
||||
Nonterminal::NtMeta(ref attr) => convert_tokens(attr.tokens.as_ref()),
|
||||
Nonterminal::NtPath(ref path) => convert_tokens(path.tokens.as_ref()),
|
||||
Nonterminal::NtVis(ref vis) => convert_tokens(vis.tokens.as_ref()),
|
||||
Nonterminal::NtTT(ref tt) => Some(tt.clone().into()),
|
||||
Nonterminal::NtExpr(ref expr) | Nonterminal::NtLiteral(ref expr) => {
|
||||
prepend_attrs(&expr.attrs, expr.tokens.as_ref())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user