summaryrefslogtreecommitdiff
path: root/src/Main.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Main.hs')
-rw-r--r--src/Main.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Main.hs b/src/Main.hs
index 92e9a1d..9330df5 100644
--- a/src/Main.hs
+++ b/src/Main.hs
@@ -9,6 +9,7 @@ import GHC.IO.Exception (ExitCode (ExitFailure))
import Language.Fiddle.Ast
import Language.Fiddle.Compiler (coloredFormat, compile_, printDiagnostic)
import Language.Fiddle.Compiler.Stage0
+import Language.Fiddle.Compiler.Stage1
import Language.Fiddle.GenericTree (ToGenericSyntaxTree (toGenericSyntaxTree))
import qualified Language.Fiddle.Parser
import qualified Language.Fiddle.Tokenizer
@@ -22,11 +23,10 @@ main = do
case argv of
[filePath] -> do
text <- Data.Text.IO.readFile filePath
- let (diags, ma) = compile_ $ toStage1 =<< toStage0 filePath text
+ let (diags, ma) = compile_ $ toStage2 =<< toStage1 =<< toStage0 filePath text
forM_ diags printDiagnostic
case ma of
Just ast -> do
- putStrLn "\x1b[1;32mCompilation Succeeded:\x1b[0m"
putStrLn $ BL.unpack $ encode $ toGenericSyntaxTree ast
Nothing -> do
putStrLn "\x1b[1;31mCompilation Failed\x1b[0m"