mbe: Add support matching for matching idents

This commit is contained in:
Jeff Muizelaar 2019-02-03 15:16:55 -05:00
parent 1997797adc
commit 0000f00787
2 changed files with 29 additions and 0 deletions

View file

@ -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 {