aboutsummaryrefslogtreecommitdiff
path: root/src/parse
diff options
context:
space:
mode:
Diffstat (limited to 'src/parse')
-rw-r--r--src/parse/parsetree.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/parse/parsetree.rs b/src/parse/parsetree.rs
index 28e5044..6dd4e01 100644
--- a/src/parse/parsetree.rs
+++ b/src/parse/parsetree.rs
@@ -10,6 +10,7 @@ use nom::{
};
use crate::sexp::{SExp, SExp::*, SLeaf::*, util::*};
+use crate::r#type::{Type::*};
#[derive(Debug,PartialEq,Clone)]
@@ -113,8 +114,11 @@ fn tokens_to_ast_inner(
Some(Sym(s)) if s == "false" => Ok(Atom(False)),
Some(Sym(s)) if s == "quote" => Ok(Atom(Quote)),
Some(Sym(s)) if s == "vector" => Ok(Atom(Vector)),
- Some(Sym(s)) if s == "print" => Ok(Atom(Print)),
+ Some(Sym(s)) if s == "print" => Ok(Atom(Print)),
Some(Sym(s)) if s == "let" => Ok(Atom(Let)),
+ 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))),
Some(Sym(s)) => Ok(Atom(Var(s))),
Some(ParClose) => break,
Some(ParOpen) => {