Initialize Repo

Working (but likely buggy!) lexing, parsing, and evaluation of Tree Calculus terms
This commit is contained in:
2024-12-18 18:55:51 -06:00
committed by James Eversole
commit 2a650dac56
11 changed files with 688 additions and 0 deletions

10
src/Eval.hs Normal file
View 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."