Print generated llvm
parent
37dcd45432
commit
c0e77d22cf
|
@ -1,4 +1,4 @@
|
||||||
module LLVMGen.Expression () where
|
module LLVMGen.Expression (getLLVM) where
|
||||||
|
|
||||||
import qualified Objects.Expression as Expr
|
import qualified Objects.Expression as Expr
|
||||||
|
|
||||||
|
@ -47,5 +47,5 @@ toLLVM modul = withContext $ \ctx -> do
|
||||||
llvm <- withModuleFromAST ctx modul moduleLLVMAssembly
|
llvm <- withModuleFromAST ctx modul moduleLLVMAssembly
|
||||||
BS.putStrLn llvm
|
BS.putStrLn llvm
|
||||||
|
|
||||||
main :: IO ()
|
getLLVM :: IO ()
|
||||||
main = toLLVM module_
|
getLLVM = toLLVM module_
|
|
@ -6,6 +6,7 @@ import Eval.Expression
|
||||||
import Objects.Expression
|
import Objects.Expression
|
||||||
import Parser.Expression
|
import Parser.Expression
|
||||||
import System.Environment
|
import System.Environment
|
||||||
|
import LLVMGen.Expression
|
||||||
import System.IO
|
import System.IO
|
||||||
import Text.Megaparsec
|
import Text.Megaparsec
|
||||||
|
|
||||||
|
@ -20,3 +21,4 @@ main = do
|
||||||
contents <- readFile fileName
|
contents <- readFile fileName
|
||||||
let result = getResult contents
|
let result = getResult contents
|
||||||
print result
|
print result
|
||||||
|
getLLVM
|
||||||
|
|
Reference in New Issue