1
Fork 0

Remove NtBlock, Nonterminal, and TokenKind::Interpolated.

`NtBlock` is the last remaining variant of `Nonterminal`, so once it is
gone then `Nonterminal` can be removed as well.
This commit is contained in:
Nicholas Nethercote 2024-04-18 20:18:13 +10:00
parent 70dab5a27c
commit bb495d6d3e
18 changed files with 108 additions and 388 deletions

View file

@ -92,11 +92,11 @@ impl CfgEval<'_> {
// the location of `#[cfg]` and `#[cfg_attr]` in the token stream. The tokenization
// process is lossless, so this process is invisible to proc-macros.
// 'Flatten' all nonterminals (i.e. `TokenKind::Interpolated`)
// 'Flatten' all nonterminals (i.e. `TokenKind::Nt{Ident,Lifetime}`)
// to `None`-delimited groups containing the corresponding tokens. This
// is normally delayed until the proc-macro server actually needs to
// provide a `TokenKind::Interpolated` to a proc-macro. We do this earlier,
// so that we can handle cases like:
// provide tokens to a proc-macro. We do this earlier, so that we can
// handle cases like:
//
// ```rust
// #[cfg_eval] #[cfg] $item