diff options
author | Edwin Cheng <[email protected]> | 2020-03-26 16:41:44 +0000 |
---|---|---|
committer | Edwin Cheng <[email protected]> | 2020-03-26 16:46:40 +0000 |
commit | db162df264a222021dbc7f1f93af94029f3948d9 (patch) | |
tree | 86f91e30f85c2c4f5faa5054b84265ddb64636d5 /crates/ra_tt/src | |
parent | 72e68d0caf6e813a19a8d434fb650574b73dbc0a (diff) |
Remove deps on tt_mbe
Diffstat (limited to 'crates/ra_tt/src')
-rw-r--r-- | crates/ra_tt/src/lib.rs | 15 |
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 | ||
17 | use std::fmt; | 17 | use std::{ |
18 | fmt::{self, Debug}, | ||
19 | panic::RefUnwindSafe, | ||
20 | }; | ||
18 | 21 | ||
19 | use smol_str::SmolStr; | 22 | pub 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 | ||
186 | pub mod buffer; | 189 | pub mod buffer; |
190 | |||
191 | #[derive(Debug, PartialEq, Eq)] | ||
192 | pub enum ExpansionError {} | ||
193 | |||
194 | pub trait TokenExpander: Debug + Send + Sync + RefUnwindSafe { | ||
195 | fn expand(&self, subtree: &Subtree, attrs: Option<&Subtree>) | ||
196 | -> Result<Subtree, ExpansionError>; | ||
197 | } | ||