This repository has been archived on 2024-04-05. You can view files and clone it, but cannot push or open issues/pull-requests.
really-bad-compiler-in-haskell/app/Main.hs

21 lines
362 B
Haskell

module Main (main) where
import Data.Either
import Eval.Expression
import Objects.Expression
import Parser.Expression
import System.Environment
import Text.Megaparsec
parseResult :: ParseResult
parseResult = parseExpr "2+3*4"
getRight :: ParseResult -> Expr
getRight (Right r) = r
expr = getRight parseResult
result = evalExpr expr
main = do
print result