aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_tt/src
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_tt/src')
-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}