diff options
| author | Laurenz <laurmaedje@gmail.com> | 2022-02-02 20:33:19 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2022-02-02 20:33:19 +0100 |
| commit | 20a1fd8bc7749f859aaef268d0add9c4bc11c4bd (patch) | |
| tree | 1faeb8c22c45a446310326c90f4b1c912595219d /src/lib.rs | |
| parent | c5e05ac0eacefcb621f8cae7a0ddfa8bd526bf21 (diff) | |
Remove root node
Diffstat (limited to 'src/lib.rs')
| -rw-r--r-- | src/lib.rs | 17 |
1 files changed, 7 insertions, 10 deletions
@@ -2,14 +2,13 @@ //! //! # Steps //! - **Parsing:** The parsing step first transforms a plain string into an -//! [iterator of tokens][tokens]. This token stream is [parsed] into a -//! [green tree]. The green tree itself is untyped, but a typed layer over it -//! is provided in the [AST] module. +//! [iterator of tokens][tokens]. This token stream is [parsed] into a [green +//! tree]. The green tree itself is untyped, but a typed layer over it is +//! provided in the [AST] module. //! - **Evaluation:** The next step is to [evaluate] the markup. This produces a //! [module], consisting of a scope of values that were exported by the code -//! and a [template] with the contents of the module. This node can be -//! converted into a [layout tree], a hierarchical, styled representation of -//! the document. The nodes of this tree are well structured and +//! and a [template], a hierarchical, styled representation with the contents +//! of the module. The nodes of this tree are well structured and //! order-independent and thus much better suited for layouting than the raw //! markup. //! - **Layouting:** Next, the tree is [layouted] into a portable version of the @@ -26,8 +25,7 @@ //! [evaluate]: Context::evaluate //! [module]: eval::Module //! [template]: eval::Template -//! [layout tree]: layout::RootNode -//! [layouted]: layout::RootNode::layout +//! [layouted]: eval::Template::layout //! [cache]: layout::LayoutCache //! [PDF]: export::pdf @@ -127,8 +125,7 @@ impl Context { /// information. pub fn typeset(&mut self, id: SourceId) -> TypResult<Vec<Arc<Frame>>> { let module = self.evaluate(id)?; - let tree = module.into_root(); - let frames = tree.layout(self); + let frames = module.template.layout(self); Ok(frames) } |
