diff options
Diffstat (limited to 'src/syntax/mod.rs')
| -rw-r--r-- | src/syntax/mod.rs | 21 |
1 files changed, 3 insertions, 18 deletions
diff --git a/src/syntax/mod.rs b/src/syntax/mod.rs index 75407f82..a77c764e 100644 --- a/src/syntax/mod.rs +++ b/src/syntax/mod.rs @@ -23,22 +23,6 @@ pub mod prelude { } -pub struct Parsed<T> { - pub output: T, - pub errors: SpanVec<Error>, - pub decorations: SpanVec<Decoration>, -} - -impl<T> Parsed<T> { - pub fn map<F, U>(self, f: F) -> Parsed<U> where F: FnOnce(T) -> U { - Parsed { - output: f(self.output), - errors: self.errors, - decorations: self.decorations, - } - } -} - #[async_trait::async_trait(?Send)] pub trait Model: Debug + ModelBounds { async fn layout<'a>( @@ -110,7 +94,7 @@ impl SyntaxModel { #[async_trait::async_trait(?Send)] impl Model for SyntaxModel { - async fn layout<'a>(&'a self, ctx: LayoutContext<'_, '_>) -> Layouted<Commands<'a>> { + async fn layout<'a>(&'a self, _: LayoutContext<'_, '_>) -> Layouted<Commands<'a>> { Layouted { output: vec![Command::LayoutSyntaxModel(self)], errors: vec![], @@ -153,7 +137,8 @@ impl PartialEq for Node { } } -#[derive(Debug, Copy, Clone, Eq, PartialEq)] +#[derive(Debug, Copy, Clone, Eq, PartialEq, Serialize)] +#[serde(rename_all = "camelCase")] pub enum Decoration { ValidFuncName, InvalidFuncName, |
