diff options
| author | Arnaud Bailly <arnaud.bailly@iohk.io> | 2024-09-25 12:38:55 +0200 |
|---|---|---|
| committer | Arnaud Bailly <arnaud.bailly@iohk.io> | 2024-09-25 12:52:36 +0200 |
| commit | 7263237a7e2a3dcfb19978e3ebae022a8f2cb0b8 (patch) | |
| tree | de6098a036c56804d8fe445d4e2b69546ac3c0ef /rust/src/ast.rs | |
| parent | a99986ec4c903f116a5ed264f5cbbcba954c9338 (diff) | |
| download | lambda-nantes-7263237a7e2a3dcfb19978e3ebae022a8f2cb0b8.tar.gz | |
Parse definitions of symbols
Diffstat (limited to 'rust/src/ast.rs')
| -rw-r--r-- | rust/src/ast.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/rust/src/ast.rs b/rust/src/ast.rs index 722e9e0..8729fa2 100644 --- a/rust/src/ast.rs +++ b/rust/src/ast.rs @@ -7,6 +7,7 @@ pub enum Value { Sym(String), App(Box<Value>, Box<Value>), Lam(String, Box<Value>), + Def(String, Box<Value>), } impl Display for Value { @@ -17,6 +18,7 @@ impl Display for Value { Value::Sym(s) => write!(f, "{}", s), Value::App(l, r) => write!(f, "({} {})", l, r), Value::Lam(var, body) => write!(f, "(lam {} {})", var, body), + Value::Def(var, value) => write!(f, "(def {} {})", var, value), } } } |
