Initialize Repo
Working (but likely buggy!) lexing, parsing, and evaluation of Tree Calculus terms
This commit is contained in:
10
src/Eval.hs
Normal file
10
src/Eval.hs
Normal file
@ -0,0 +1,10 @@
|
||||
module Eval where
|
||||
|
||||
import Parser
|
||||
import Research
|
||||
|
||||
evalSapling :: SaplingAST -> T
|
||||
evalSapling TLeaf = Leaf
|
||||
evalSapling (TStem t) = Stem (evalSapling t)
|
||||
evalSapling (TFork t1 t2) = Fork (evalSapling t1) (evalSapling t2)
|
||||
evalSapling _ = error "Evaluation currently only supported for Tree Calculus terms."
|
Reference in New Issue
Block a user