Rollup merge of #134161 - nnethercote:overhaul-token-cursors, r=spastorino
Overhaul token cursors Some nice cleanups here. r? `````@davidtwco`````
This commit is contained in:
commit
477f222b02
20 changed files with 199 additions and 210 deletions
|
@ -1828,7 +1828,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, _) => {
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue