aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_tt
diff options
context:
space:
mode:
authorEdwin Cheng <[email protected]>2020-03-26 16:41:44 +0000
committerEdwin Cheng <[email protected]>2020-03-26 16:46:40 +0000
commitdb162df264a222021dbc7f1f93af94029f3948d9 (patch)
tree86f91e30f85c2c4f5faa5054b84265ddb64636d5 /crates/ra_tt
parent72e68d0caf6e813a19a8d434fb650574b73dbc0a (diff)
Remove deps on tt_mbe
Diffstat (limited to 'crates/ra_tt')
-rw-r--r--crates/ra_tt/src/lib.rs15
1 files changed, 13 insertions, 2 deletions
diff --git a/crates/ra_tt/src/lib.rs b/crates/ra_tt/src/lib.rs
index 1e2fb8b91..1015ce0a6 100644
--- a/crates/ra_tt/src/lib.rs
+++ b/crates/ra_tt/src/lib.rs
@@ -14,9 +14,12 @@ macro_rules! impl_froms {
14 } 14 }
15} 15}
16 16
17use std::fmt; 17use std::{
18 fmt::{self, Debug},
19 panic::RefUnwindSafe,
20};
18 21
19use smol_str::SmolStr; 22pub use smol_str::SmolStr;
20 23
21/// Represents identity of the token. 24/// Represents identity of the token.
22/// 25///
@@ -184,3 +187,11 @@ impl Subtree {
184} 187}
185 188
186pub mod buffer; 189pub mod buffer;
190
191#[derive(Debug, PartialEq, Eq)]
192pub enum ExpansionError {}
193
194pub trait TokenExpander: Debug + Send + Sync + RefUnwindSafe {
195 fn expand(&self, subtree: &Subtree, attrs: Option<&Subtree>)
196 -> Result<Subtree, ExpansionError>;
197}