Split the compiler into it's own module and added a file for the LLVM standard library.
This commit is contained in:
parent
5524e1ec3e
commit
213e47097e
3 changed files with 13 additions and 6 deletions
|
|
@ -30,7 +30,8 @@ executable language
|
|||
Grammar.Par
|
||||
Grammar.Print
|
||||
Grammar.Skel
|
||||
Compiler
|
||||
Compiler.Compiler
|
||||
Compiler.StandardLLVMLibrary
|
||||
Interpreter
|
||||
|
||||
hs-source-dirs: src
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
||||
|
||||
6
src/Compiler/StandardLLVMLibrary.hs
Normal file
6
src/Compiler/StandardLLVMLibrary.hs
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
module Compiler.StandardLLVMLibrary where
|
||||
|
||||
standardLLVMLibrary :: String
|
||||
standardLLVMLibrary = "
|
||||
|
||||
"
|
||||
Loading…
Add table
Add a link
Reference in a new issue