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/mod.rs | |
| parent | e35bbfffcb1f84b2fb0679759152ca0a5eabfad4 (diff) | |
Split evaluation and execution 🔪
Diffstat (limited to 'src/syntax/mod.rs')
| -rw-r--r-- | src/syntax/mod.rs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/syntax/mod.rs b/src/syntax/mod.rs index 8bb6931a..a8ed2457 100644 --- a/src/syntax/mod.rs +++ b/src/syntax/mod.rs @@ -16,12 +16,12 @@ pub use token::*; use crate::pretty::{Pretty, Printer}; /// The abstract syntax tree. -pub type Tree = SpanVec<Node>; +pub type Tree = Vec<Node>; impl Pretty for Tree { fn pretty(&self, p: &mut Printer) { for node in self { - node.v.pretty(p); + node.pretty(p); } } } @@ -133,9 +133,8 @@ mod tests { roundtrip("#[v 1]"); roundtrip("#[v 1, 2][*Ok*]"); roundtrip("#[v 1 | f 2]"); - roundtrip("{#[v]}"); + test("{#[v]}", "{v()}"); test("#[v 1, #[f 2]]", "#[v 1 | f 2]"); - test("#[v 1, 2][#[f 3]]", "#[v 1, 2 | f 3]"); // Keywords. roundtrip("#let x = 1 + 2"); |
