diff options
| author | Laurenz <laurmaedje@gmail.com> | 2021-02-09 19:46:57 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2021-02-09 19:46:57 +0100 |
| commit | 06ca740d01b428f12f6bd327257cd05dce737b03 (patch) | |
| tree | 995bf8ff3a606aedecf296c9e805e11e9cd0ae8e /src/syntax/node.rs | |
| parent | e35bbfffcb1f84b2fb0679759152ca0a5eabfad4 (diff) | |
Split evaluation and execution 🔪
Diffstat (limited to 'src/syntax/node.rs')
| -rw-r--r-- | src/syntax/node.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/syntax/node.rs b/src/syntax/node.rs index b4866068..fe9767a1 100644 --- a/src/syntax/node.rs +++ b/src/syntax/node.rs @@ -37,7 +37,7 @@ impl Pretty for Node { Self::Expr(expr) => { if let Expr::Call(call) = expr { // Format function templates appropriately. - pretty_func_template(call, p, false) + call.pretty_bracketed(p, false) } else { expr.pretty(p); } @@ -49,15 +49,15 @@ impl Pretty for Node { /// A section heading: `= Introduction`. #[derive(Debug, Clone, PartialEq)] pub struct NodeHeading { - /// The section depth (numer of equals signs minus 1, capped at 5). - pub level: Spanned<u8>, + /// The section depth (numer of equals signs minus 1). + pub level: usize, /// The contents of the heading. pub contents: Tree, } impl Pretty for NodeHeading { fn pretty(&self, p: &mut Printer) { - for _ in 0 ..= self.level.v { + for _ in 0 ..= self.level { p.push('='); } self.contents.pretty(p); |
