Fix spelling of an identifier.
This commit is contained in:
parent
637a93cb5d
commit
bbef9756ea
1 changed files with 4 additions and 4 deletions
|
@ -217,10 +217,10 @@ pub(super) fn transcribe<'a>(
|
||||||
}
|
}
|
||||||
|
|
||||||
// Replace the meta-var with the matched token tree from the invocation.
|
// Replace the meta-var with the matched token tree from the invocation.
|
||||||
mbe::TokenTree::MetaVar(mut sp, mut orignal_ident) => {
|
mbe::TokenTree::MetaVar(mut sp, mut original_ident) => {
|
||||||
// Find the matched nonterminal from the macro invocation, and use it to replace
|
// Find the matched nonterminal from the macro invocation, and use it to replace
|
||||||
// the meta-var.
|
// the meta-var.
|
||||||
let ident = MacroRulesNormalizedIdent::new(orignal_ident);
|
let ident = MacroRulesNormalizedIdent::new(original_ident);
|
||||||
if let Some(cur_matched) = lookup_cur_matched(ident, interp, &repeats) {
|
if let Some(cur_matched) = lookup_cur_matched(ident, interp, &repeats) {
|
||||||
match cur_matched {
|
match cur_matched {
|
||||||
MatchedTokenTree(ref tt) => {
|
MatchedTokenTree(ref tt) => {
|
||||||
|
@ -249,9 +249,9 @@ pub(super) fn transcribe<'a>(
|
||||||
// If we aren't able to match the meta-var, we push it back into the result but
|
// If we aren't able to match the meta-var, we push it back into the result but
|
||||||
// with modified syntax context. (I believe this supports nested macros).
|
// with modified syntax context. (I believe this supports nested macros).
|
||||||
marker.visit_span(&mut sp);
|
marker.visit_span(&mut sp);
|
||||||
marker.visit_ident(&mut orignal_ident);
|
marker.visit_ident(&mut original_ident);
|
||||||
result.push(TokenTree::token(token::Dollar, sp).into());
|
result.push(TokenTree::token(token::Dollar, sp).into());
|
||||||
result.push(TokenTree::Token(Token::from_ast_ident(orignal_ident)).into());
|
result.push(TokenTree::Token(Token::from_ast_ident(original_ident)).into());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue