From 72a9631b038d1a60e4e4a78e92cd69e6f8ce4316 Mon Sep 17 00:00:00 2001 From: Laurenz Date: Thu, 5 Dec 2019 19:48:37 +0100 Subject: =?UTF-8?q?Move=20arg=20parser=20into=20`FuncArgs`=20and=20create?= =?UTF-8?q?=20(incomplete)=20consistent=20map=20=F0=9F=A7=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/layout/tree.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/layout/tree.rs') diff --git a/src/layout/tree.rs b/src/layout/tree.rs index c9d40e93..4370ceab 100644 --- a/src/layout/tree.rs +++ b/src/layout/tree.rs @@ -1,5 +1,5 @@ -use super::*; use smallvec::smallvec; +use super::*; pub fn layout_tree(tree: &SyntaxTree, ctx: LayoutContext) -> LayoutResult { let mut layouter = TreeLayouter::new(ctx); @@ -31,7 +31,7 @@ impl<'a, 'p> TreeLayouter<'a, 'p> { fn layout(&mut self, tree: &SyntaxTree) -> LayoutResult<()> { for node in &tree.nodes { - match &node.val { + match &node.v { Node::Text(text) => self.layout_text(text)?, Node::Space => self.layout_space(), @@ -75,7 +75,7 @@ impl<'a, 'p> TreeLayouter<'a, 'p> { fn layout_func(&mut self, func: &FuncCall) -> LayoutResult<()> { let spaces = self.flex.remaining(); - let commands = func.body.val.layout(LayoutContext { + let commands = func.call.layout(LayoutContext { loader: self.ctx.loader, style: &self.style, top_level: false, -- cgit v1.2.3