From d6d1ec80ffcc0b13234b170a91b920371078a027 Mon Sep 17 00:00:00 2001 From: Joel Kronqvist Date: Sun, 10 Aug 2025 19:16:51 +0300 Subject: Added tests for functions --- src/parse/parsetree.rs | 1 + 1 file changed, 1 insertion(+) (limited to 'src/parse') 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))), -- cgit v1.2.3