Print generated llvm

pull/21/head
Ethan Reece 2023-09-22 16:38:17 -05:00
parent 37dcd45432
commit c0e77d22cf
Signed by: me
GPG Key ID: D3993665FF92E1C3
2 changed files with 5 additions and 3 deletions

View File

@ -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_

View File

@ -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