Rename "compiler" functionality to Evaluator

Allows for stdin input for evaluation when no input file is provided.
This commit is contained in:
James Eversole
2025-01-01 08:17:05 -06:00
parent 458d3c3b10
commit 7d38d99dcd
8 changed files with 43 additions and 32 deletions

View File

@ -1,7 +1,7 @@
module Main where
import Compiler
import Eval
import FileEval
import Lexer
import Library
import Parser
@ -31,7 +31,7 @@ tests = testGroup "Tricu Tests"
, evaluationTests
, lambdaEvalTests
, libraryTests
, compilerTests
, fileEvaluationTests
, propertyTests
]
@ -377,8 +377,8 @@ libraryTests = testGroup "Library Tests"
result env @?= Stem Leaf
]
compilerTests :: TestTree
compilerTests = testGroup "Compiler tests"
fileEvaluationTests :: TestTree
fileEvaluationTests = testGroup "Evaluation tests"
[ testCase "Forks" $ do
res <- liftIO $ evaluateFile "./test/fork.tri"
res @?= Fork Leaf Leaf
@ -388,7 +388,7 @@ compilerTests = testGroup "Compiler tests"
, testCase "Mapping and Equality" $ do
res <- liftIO $ evaluateFile "./test/map.tri"
res @?= Stem Leaf
, testCase "Map evaluation to String -> compilation -> string decoding" $ do
, testCase "Eval and decoding string" $ do
res <- liftIO $ evaluateFile "./test/string.tri"
decodeResult res @?= "String test!"
]

1
test/assignment.tri Normal file
View File

@ -0,0 +1 @@
x = t (t t) t