From 0f7c70fd93db23ec866ae13aa2f146b7787afabf Mon Sep 17 00:00:00 2001 From: Laurenz Date: Sun, 4 Oct 2020 19:06:20 +0200 Subject: =?UTF-8?q?Separate=20state=20and=20constraints=20=F0=9F=A7=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/lib.rs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'src/lib.rs') diff --git a/src/lib.rs b/src/lib.rs index c4a14c2e..21fabbd2 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -36,7 +36,6 @@ pub mod paper; pub mod parse; pub mod prelude; pub mod shaping; -pub mod style; pub mod syntax; use std::fmt::Debug; @@ -44,21 +43,19 @@ use std::future::Future; use std::pin::Pin; use crate::diagnostic::Diagnostic; -use crate::eval::{Scope, Value}; +use crate::eval::{State, Value}; use crate::font::SharedFontLoader; use crate::layout::{Commands, MultiLayout}; -use crate::style::LayoutStyle; use crate::syntax::{Decoration, Offset, Pos, SpanVec}; /// Process source code directly into a collection of layouts. pub async fn typeset( src: &str, - style: &LayoutStyle, - scope: &Scope, + state: State, loader: SharedFontLoader, ) -> Pass { let parsed = parse::parse(src); - let layouted = layout::layout(&parsed.output, style, scope, loader).await; + let layouted = layout::layout(&parsed.output, state, loader).await; let feedback = Feedback::merge(parsed.feedback, layouted.feedback); Pass::new(layouted.output, feedback) } -- cgit v1.2.3