From 06ca740d01b428f12f6bd327257cd05dce737b03 Mon Sep 17 00:00:00 2001 From: Laurenz Date: Tue, 9 Feb 2021 19:46:57 +0100 Subject: =?UTF-8?q?Split=20evaluation=20and=20execution=20=F0=9F=94=AA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/syntax/mod.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/syntax/mod.rs') 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; +pub type Tree = Vec; 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"); -- cgit v1.2.3