From ee3db87e63a7c1d1dca9ee5eb1bb9525dea86f49 Mon Sep 17 00:00:00 2001 From: Arnaud Bailly Date: Tue, 24 Sep 2024 11:28:47 +0200 Subject: Parse binary application with parens --- rust/src/ast.rs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'rust/src/ast.rs') diff --git a/rust/src/ast.rs b/rust/src/ast.rs index b179704..0493f59 100644 --- a/rust/src/ast.rs +++ b/rust/src/ast.rs @@ -5,6 +5,7 @@ pub enum Value { Num(i32), Bool(bool), Sym(String), + App(Box, Box), } impl Display for Value { @@ -13,6 +14,7 @@ impl Display for Value { Value::Num(i) => write!(f, "{}", i), Value::Bool(b) => write!(f, "{}", b), Value::Sym(s) => write!(f, "{}", s), + Value::App(l, r) => write!(f, "({} {})", l, r), } } } -- cgit v1.2.3