From db162df264a222021dbc7f1f93af94029f3948d9 Mon Sep 17 00:00:00 2001 From: Edwin Cheng Date: Fri, 27 Mar 2020 00:41:44 +0800 Subject: Remove deps on tt_mbe --- crates/ra_tt/src/lib.rs | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'crates/ra_tt/src') 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 { } } -use std::fmt; +use std::{ + fmt::{self, Debug}, + panic::RefUnwindSafe, +}; -use smol_str::SmolStr; +pub use smol_str::SmolStr; /// Represents identity of the token. /// @@ -184,3 +187,11 @@ impl Subtree { } pub mod buffer; + +#[derive(Debug, PartialEq, Eq)] +pub enum ExpansionError {} + +pub trait TokenExpander: Debug + Send + Sync + RefUnwindSafe { + fn expand(&self, subtree: &Subtree, attrs: Option<&Subtree>) + -> Result; +} -- cgit v1.2.3