From 09a8d753512ac878224455a148ad66d0f14a20da Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Thu, 31 Jan 2019 13:49:57 +0300 Subject: expand boilerplate --- crates/ra_macros/src/lib.rs | 1 + crates/ra_macros/src/mbe.rs | 5 ++++- crates/ra_macros/src/mbe_expander.rs | 5 +++++ 3 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 crates/ra_macros/src/mbe_expander.rs (limited to 'crates/ra_macros') 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 { pub mod tt; pub mod mbe; mod mbe_parser; +mod 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; use crate::tt::{self, Delimiter}; -pub use crate::mbe_parser::parse; +pub use crate::{ + mbe_parser::parse, + mbe_expander::exapnd, +}; #[derive(Debug)] pub 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 @@ +use crate::{mbe, tt}; + +pub fn exapnd(rules: &mbe::MacroRules, input: tt::Subtree) -> Option { + Some(input) +} -- cgit v1.2.3