mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-02 22:54:58 +00:00
mbe: Add support matching for matching idents
This commit is contained in:
parent
1997797adc
commit
0000f00787
2 changed files with 29 additions and 0 deletions
|
@ -126,6 +126,11 @@ fn match_lhs(pattern: &crate::Subtree, input: &mut TtCursor) -> Option<Bindings>
|
|||
return None;
|
||||
}
|
||||
}
|
||||
crate::Leaf::Ident(ident) => {
|
||||
if input.eat_ident()?.text != ident.text {
|
||||
return None;
|
||||
}
|
||||
}
|
||||
_ => return None,
|
||||
},
|
||||
crate::TokenTree::Repeat(crate::Repeat {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue