Split the compiler into it's own module and added a file for the LLVM standard library.

This commit is contained in:
Samuel Hammersberg 2023-01-23 16:57:32 +01:00
parent 5524e1ec3e
commit 213e47097e
3 changed files with 13 additions and 6 deletions

View file

@ -30,7 +30,8 @@ executable language
Grammar.Par
Grammar.Print
Grammar.Skel
Compiler
Compiler.Compiler
Compiler.StandardLLVMLibrary
Interpreter
hs-source-dirs: src

View file

@ -1,4 +1,4 @@
module Compiler where
module Compiler.Compiler where
import Control.Applicative (Applicative)
import Control.Monad.Except (Except, MonadError (throwError),
@ -23,10 +23,10 @@ compileFile file = do
putStrLn $ printTree cor
compile cor
data Compiler = Compiler
{ data :: [LLVMIr] }
data LLVMIr =
-- data Compiler = Compiler
-- { data :: [LLVMIr] }
--
-- data LLVMIr = LLVMIr

View file

@ -0,0 +1,6 @@
module Compiler.StandardLLVMLibrary where
standardLLVMLibrary :: String
standardLLVMLibrary = "
"