aboutsummaryrefslogtreecommitdiff
path: root/crates
diff options
context:
space:
mode:
Diffstat (limited to 'crates')
-rw-r--r--crates/ra_macros/src/lib.rs1
-rw-r--r--crates/ra_macros/src/mbe.rs5
-rw-r--r--crates/ra_macros/src/mbe_expander.rs5
3 files changed, 10 insertions, 1 deletions
diff --git a/crates/ra_macros/src/lib.rs b/crates/ra_macros/src/lib.rs
index 8c284fa71..9485b1c3d 100644
--- a/crates/ra_macros/src/lib.rs
+++ b/crates/ra_macros/src/lib.rs
@@ -13,3 +13,4 @@ macro_rules! impl_froms {
13pub mod tt; 13pub mod tt;
14pub mod mbe; 14pub mod mbe;
15mod mbe_parser; 15mod mbe_parser;
16mod mbe_expander;
diff --git a/crates/ra_macros/src/mbe.rs b/crates/ra_macros/src/mbe.rs
index 72d6707aa..ec811c5f0 100644
--- a/crates/ra_macros/src/mbe.rs
+++ b/crates/ra_macros/src/mbe.rs
@@ -2,7 +2,10 @@ use smol_str::SmolStr;
2 2
3use crate::tt::{self, Delimiter}; 3use crate::tt::{self, Delimiter};
4 4
5pub use crate::mbe_parser::parse; 5pub use crate::{
6 mbe_parser::parse,
7 mbe_expander::exapnd,
8};
6 9
7#[derive(Debug)] 10#[derive(Debug)]
8pub struct MacroRules { 11pub struct MacroRules {
diff --git a/crates/ra_macros/src/mbe_expander.rs b/crates/ra_macros/src/mbe_expander.rs
new file mode 100644
index 000000000..426229659
--- /dev/null
+++ b/crates/ra_macros/src/mbe_expander.rs
@@ -0,0 +1,5 @@
1use crate::{mbe, tt};
2
3pub fn exapnd(rules: &mbe::MacroRules, input: tt::Subtree) -> Option<tt::Subtree> {
4 Some(input)
5}