1
Fork 0

Rename RefTokenTreeCursor.

Because `TokenStreamIter` is a much better name for a `TokenStream`
iterator. Also rename the `TokenStream::trees` method as
`TokenStream::iter`, and some local variables.
This commit is contained in:
Nicholas Nethercote 2024-12-11 14:38:09 +11:00
parent 3575e7943b
commit 809975c94a
17 changed files with 117 additions and 119 deletions

View file

@ -1829,7 +1829,7 @@ impl KeywordIdents {
fn check_tokens(&mut self, cx: &EarlyContext<'_>, tokens: &TokenStream) {
// Check if the preceding token is `$`, because we want to allow `$async`, etc.
let mut prev_dollar = false;
for tt in tokens.trees() {
for tt in tokens.iter() {
match tt {
// Only report non-raw idents.
TokenTree::Token(token, _) => {

View file

@ -84,7 +84,7 @@ impl Expr2024 {
let mut prev_colon = false;
let mut prev_identifier = false;
let mut prev_dollar = false;
for tt in tokens.trees() {
for tt in tokens.iter() {
debug!(
"check_tokens: {:?} - colon {prev_dollar} - ident {prev_identifier} - colon {prev_colon}",
tt