aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_mbe
diff options
context:
space:
mode:
authorEdwin Cheng <[email protected]>2019-11-04 16:16:03 +0000
committerEdwin Cheng <[email protected]>2019-11-04 16:16:03 +0000
commit63e42bb5bdd57b8b0155d9e38ebe78e0e864c4d5 (patch)
treed3a51e71bc20a773a06ec30c22a6200997f6a7e1 /crates/ra_mbe
parent04af290d4e08e282dda0c0273f20a46f381224f4 (diff)
Change to better naming
Diffstat (limited to 'crates/ra_mbe')
-rw-r--r--crates/ra_mbe/src/lib.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/ra_mbe/src/lib.rs b/crates/ra_mbe/src/lib.rs
index 7d4a5f307..f51149258 100644
--- a/crates/ra_mbe/src/lib.rs
+++ b/crates/ra_mbe/src/lib.rs
@@ -72,7 +72,7 @@ fn find_subtree_shift(tt: &tt::Subtree, mut cur: Option<u32>) -> Option<u32> {
72} 72}
73 73
74/// Shift given TokenTree token id 74/// Shift given TokenTree token id
75fn shift_token_tree(tt: &mut tt::Subtree, shift: u32) { 75fn shift_subtree(tt: &mut tt::Subtree, shift: u32) {
76 for t in tt.token_trees.iter_mut() { 76 for t in tt.token_trees.iter_mut() {
77 match t { 77 match t {
78 tt::TokenTree::Leaf(leaf) => match leaf { 78 tt::TokenTree::Leaf(leaf) => match leaf {
@@ -83,7 +83,7 @@ fn shift_token_tree(tt: &mut tt::Subtree, shift: u32) {
83 } 83 }
84 _ => (), 84 _ => (),
85 }, 85 },
86 tt::TokenTree::Subtree(tt) => shift_token_tree(tt, shift), 86 tt::TokenTree::Subtree(tt) => shift_subtree(tt, shift),
87 } 87 }
88 } 88 }
89} 89}
@@ -117,7 +117,7 @@ impl MacroRules {
117 // apply shift 117 // apply shift
118 let mut tt = tt.clone(); 118 let mut tt = tt.clone();
119 if let Some(shift) = self.shift { 119 if let Some(shift) = self.shift {
120 shift_token_tree(&mut tt, shift) 120 shift_subtree(&mut tt, shift)
121 } 121 }
122 122
123 mbe_expander::expand(self, &tt) 123 mbe_expander::expand(self, &tt)