Compile program to LLVM #21

Merged
me merged 10 commits from feature-llvm into main 2023-09-29 10:41:05 +00:00
2 changed files with 5 additions and 3 deletions
Showing only changes of commit c0e77d22cf - Show all commits

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