use CursorRef
more, to not to clone Tree
s
This commit is contained in:
parent
10b3a0d209
commit
cc5f3e21ac
10 changed files with 35 additions and 24 deletions
|
@ -108,7 +108,7 @@ impl<'a> FlattenNonterminals<'a> {
|
|||
fn can_skip(stream: &TokenStream) -> bool {
|
||||
stream.trees().all(|tree| match tree {
|
||||
TokenTree::Token(token) => !matches!(token.kind, token::Interpolated(_)),
|
||||
TokenTree::Delimited(_, _, inner) => can_skip(&inner),
|
||||
TokenTree::Delimited(_, _, inner) => can_skip(inner),
|
||||
})
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue