module Main where import Example import Typecheck import Parser.Lexer (alexScanTokens) import Parser.JavaParser import ByteCode.ClassFile.Generator import ByteCode.ClassFile import Data.ByteString (pack, writeFile) main = do let untypedAST = parse $ alexScanTokens "class Testklasse {void something(){return;}}" let typedAST = head (typeCheckCompilationUnit untypedAST) let abstractClassFile = classBuilder typedAST emptyClassFile let assembledClassFile = pack (serialize abstractClassFile) Data.ByteString.writeFile "Testklasse.class" assembledClassFile