mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-03 15:15:24 +00:00
expand boilerplate
This commit is contained in:
parent
2d88207853
commit
09a8d75351
3 changed files with 10 additions and 1 deletions
|
@ -13,3 +13,4 @@ macro_rules! impl_froms {
|
||||||
pub mod tt;
|
pub mod tt;
|
||||||
pub mod mbe;
|
pub mod mbe;
|
||||||
mod mbe_parser;
|
mod mbe_parser;
|
||||||
|
mod mbe_expander;
|
||||||
|
|
|
@ -2,7 +2,10 @@ use smol_str::SmolStr;
|
||||||
|
|
||||||
use crate::tt::{self, Delimiter};
|
use crate::tt::{self, Delimiter};
|
||||||
|
|
||||||
pub use crate::mbe_parser::parse;
|
pub use crate::{
|
||||||
|
mbe_parser::parse,
|
||||||
|
mbe_expander::exapnd,
|
||||||
|
};
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub struct MacroRules {
|
pub struct MacroRules {
|
||||||
|
|
5
crates/ra_macros/src/mbe_expander.rs
Normal file
5
crates/ra_macros/src/mbe_expander.rs
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
use crate::{mbe, tt};
|
||||||
|
|
||||||
|
pub fn exapnd(rules: &mbe::MacroRules, input: tt::Subtree) -> Option<tt::Subtree> {
|
||||||
|
Some(input)
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue