tricu/src/Main.hs

23 lines
521 B
Haskell
Raw Normal View History

module Main where
import Eval
import Lexer
import Library
import Parser
import REPL (repl)
import Research
2024-12-27 08:17:06 -06:00
import qualified Data.Map as Map
import Text.Megaparsec (runParser)
main :: IO ()
main = do
putStrLn "Welcome to the Sapling Interpreter"
putStrLn "You can exit at any time by typing and entering: "
putStrLn ":_exit"
repl library
runSapling :: String -> String
runSapling s = show $ result (evalSapling Map.empty $ parseSapling s)
2024-12-27 14:10:13 -06:00
runSaplingEnv env s = show $ result (evalSapling env $ parseSapling s)