From c72455c9f4203ab7b9c617f26ffa7e5fdabf2d5f Mon Sep 17 00:00:00 2001 From: "Juan J. Martinez" Date: Sat, 10 Sep 2022 19:36:45 +0100 Subject: Revisited parser interface --- app/Main.hs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'app/Main.hs') diff --git a/app/Main.hs b/app/Main.hs index 9cf5d75..fb3c132 100644 --- a/app/Main.hs +++ b/app/Main.hs @@ -6,8 +6,7 @@ import qualified Data.Map as Map import Data.Maybe (fromMaybe) import Micro.Compiler import Micro.Error (showErrorList, showParserError) -import Micro.Lexer (scan) -import Micro.Parser (parse, parseFromFile) +import Micro.Parser import System.Console.GetOpt import System.Environment (getProgName) import System.Environment.Blank (getArgs) @@ -64,7 +63,7 @@ usage progName errs compileFile :: String -> Bool -> IO () compileFile filename onlyParse = do - res <- parseFromFile (scan parse) filename + res <- parseFromFile filename case res of Left err -> hPutStrLn stderr (showParserError err) >> exitFailure Right ast -> do -- cgit v1.2.3