module Main where import Example import Typecheck import Parser.Lexer (alexScanTokens) import Parser.JavaParser import ByteCode.Generation.Generator import ByteCode.Generation.Builder.Class import ByteCode.ClassFile import Data.ByteString (pack, writeFile) main = do file <- readFile "Testklasse.java" let untypedAST = parse $ alexScanTokens file let typedAST = head (typeCheckCompilationUnit untypedAST) let abstractClassFile = classBuilder typedAST emptyClassFile let assembledClassFile = pack (serialize abstractClassFile) Data.ByteString.writeFile "Testklasse.class" assembledClassFile