diff options
| author | Laurenz <laurmaedje@gmail.com> | 2020-10-04 19:06:20 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2020-10-04 19:06:20 +0200 |
| commit | 0f7c70fd93db23ec866ae13aa2f146b7787afabf (patch) | |
| tree | 7a67019fa77931e1722789cfd27997dd82a9b521 /src/lib.rs | |
| parent | 6672f8f7dfcb38bbda3ec92bdf95341c05e9a782 (diff) | |
Separate state and constraints 🧶
Diffstat (limited to 'src/lib.rs')
| -rw-r--r-- | src/lib.rs | 9 |
1 files changed, 3 insertions, 6 deletions
@@ -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<MultiLayout> { 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) } |
