diff options
Diffstat (limited to 'crates/ra_mbe/src/lib.rs')
-rw-r--r-- | crates/ra_mbe/src/lib.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/crates/ra_mbe/src/lib.rs b/crates/ra_mbe/src/lib.rs index 15f000175..70a289f09 100644 --- a/crates/ra_mbe/src/lib.rs +++ b/crates/ra_mbe/src/lib.rs | |||
@@ -32,7 +32,7 @@ pub enum ExpandError { | |||
32 | 32 | ||
33 | pub use crate::syntax_bridge::{ | 33 | pub use crate::syntax_bridge::{ |
34 | ast_to_token_tree, syntax_node_to_token_tree, token_tree_to_expr, token_tree_to_items, | 34 | ast_to_token_tree, syntax_node_to_token_tree, token_tree_to_expr, token_tree_to_items, |
35 | token_tree_to_macro_stmts, token_tree_to_pat, token_tree_to_ty, | 35 | token_tree_to_macro_stmts, token_tree_to_pat, token_tree_to_ty, RevTokenMap, TokenMap, |
36 | }; | 36 | }; |
37 | 37 | ||
38 | /// This struct contains AST for a single `macro_rules` definition. What might | 38 | /// This struct contains AST for a single `macro_rules` definition. What might |
@@ -118,6 +118,10 @@ impl MacroRules { | |||
118 | shift_subtree(&mut tt, self.shift); | 118 | shift_subtree(&mut tt, self.shift); |
119 | mbe_expander::expand(self, &tt) | 119 | mbe_expander::expand(self, &tt) |
120 | } | 120 | } |
121 | |||
122 | pub fn shift(&self) -> u32 { | ||
123 | self.shift | ||
124 | } | ||
121 | } | 125 | } |
122 | 126 | ||
123 | impl Rule { | 127 | impl Rule { |