diff options
| author | Laurenz <laurmaedje@gmail.com> | 2021-07-20 20:21:56 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2021-07-21 11:28:29 +0200 |
| commit | 9488b1b850152eb564dbfefc898c962bdac73eb4 (patch) | |
| tree | 0a99487cddfee1a46b5802dc6b64c81b70e549da /src/exec/mod.rs | |
| parent | 8000783f95ee007d9dda6f1dcc1c42c8e607b122 (diff) | |
Main context struct
Diffstat (limited to 'src/exec/mod.rs')
| -rw-r--r-- | src/exec/mod.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/exec/mod.rs b/src/exec/mod.rs index 752bdba5..d61e0793 100644 --- a/src/exec/mod.rs +++ b/src/exec/mod.rs @@ -16,10 +16,11 @@ use crate::geom::{Dir, Gen}; use crate::layout::{LayoutTree, StackChild, StackNode}; use crate::pretty::pretty; use crate::syntax::*; +use crate::Context; /// Execute a template to produce a layout tree. -pub fn exec(template: &Template, state: State) -> Pass<LayoutTree> { - let mut ctx = ExecContext::new(state); +pub fn exec(ctx: &mut Context, template: &Template) -> Pass<LayoutTree> { + let mut ctx = ExecContext::new(ctx); template.exec(&mut ctx); ctx.finish() } |
