aboutsummaryrefslogtreecommitdiff
path: root/src/parse
diff options
context:
space:
mode:
authorJoel Kronqvist <joel.kronqvist@iki.fi>2025-08-10 19:16:51 +0300
committerJoel Kronqvist <joel.kronqvist@iki.fi>2025-08-10 19:16:51 +0300
commitd6d1ec80ffcc0b13234b170a91b920371078a027 (patch)
treea8347b04ad354e3f2cb265b5d506a4891853cf7f /src/parse
parent06798d622327707ca3f3b42d65fc3d1a25ae3c57 (diff)
downloadmyslip-d6d1ec80ffcc0b13234b170a91b920371078a027.tar.gz
myslip-d6d1ec80ffcc0b13234b170a91b920371078a027.zip
Added tests for functions
Diffstat (limited to 'src/parse')
-rw-r--r--src/parse/parsetree.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/parse/parsetree.rs b/src/parse/parsetree.rs
index 6dd4e01..46e636c 100644
--- a/src/parse/parsetree.rs
+++ b/src/parse/parsetree.rs
@@ -116,6 +116,7 @@ fn tokens_to_ast_inner(
Some(Sym(s)) if s == "vector" => Ok(Atom(Vector)),
Some(Sym(s)) if s == "print" => Ok(Atom(Print)),
Some(Sym(s)) if s == "let" => Ok(Atom(Let)),
+ Some(Sym(s)) if s == "fn" => Ok(Atom(Fun)),
Some(Sym(s)) if s == "->" => Ok(Atom(Arr)),
Some(Sym(s)) if s == "int" => Ok(Atom(Ty(Integer))),
Some(Sym(s)) if s == "bool" => Ok(Atom(Ty(Boolean))),