summaryrefslogtreecommitdiff
path: root/src/syntax/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/syntax/mod.rs')
-rw-r--r--src/syntax/mod.rs18
1 files changed, 5 insertions, 13 deletions
diff --git a/src/syntax/mod.rs b/src/syntax/mod.rs
index cfa4c2e5..8596a618 100644
--- a/src/syntax/mod.rs
+++ b/src/syntax/mod.rs
@@ -5,7 +5,8 @@ use std::fmt::Debug;
use async_trait::async_trait;
use serde::Serialize;
-use crate::layout::{LayoutContext, Layouted, Commands, Command};
+use crate::{Pass, Feedback};
+use crate::layout::{LayoutContext, Commands, Command};
use self::span::{Spanned, SpanVec};
pub mod expr;
@@ -25,10 +26,7 @@ mod test;
pub trait Model: Debug + ModelBounds {
/// Layout the model into a sequence of commands processed by a
/// [`ModelLayouter`](crate::layout::ModelLayouter).
- async fn layout<'a>(
- &'a self,
- ctx: LayoutContext<'_>,
- ) -> Layouted<Commands<'a>>;
+ async fn layout<'a>(&'a self, ctx: LayoutContext<'_>) -> Pass<Commands<'a>>;
}
/// A tree representation of source code.
@@ -52,14 +50,8 @@ impl SyntaxModel {
#[async_trait(?Send)]
impl Model for SyntaxModel {
- async fn layout<'a>(
- &'a self,
- _: LayoutContext<'_>,
- ) -> Layouted<Commands<'a>> {
- Layouted {
- output: vec![Command::LayoutSyntaxModel(self)],
- errors: vec![],
- }
+ async fn layout<'a>(&'a self, _: LayoutContext<'_>) -> Pass<Commands<'a>> {
+ Pass::new(vec![Command::LayoutSyntaxModel(self)], Feedback::new())
}
}