renamed Generator -> Builder
This commit is contained in:
parent
b47da4633d
commit
2c928ad69b
@ -24,7 +24,7 @@ executable compiler
|
|||||||
ByteCode.ByteUtil,
|
ByteCode.ByteUtil,
|
||||||
ByteCode.ClassFile,
|
ByteCode.ClassFile,
|
||||||
ByteCode.Assembler,
|
ByteCode.Assembler,
|
||||||
ByteCode.Generator,
|
ByteCode.Builder,
|
||||||
ByteCode.Constants
|
ByteCode.Constants
|
||||||
|
|
||||||
test-suite tests
|
test-suite tests
|
||||||
@ -47,5 +47,5 @@ test-suite tests
|
|||||||
ByteCode.ByteUtil,
|
ByteCode.ByteUtil,
|
||||||
ByteCode.ClassFile,
|
ByteCode.ClassFile,
|
||||||
ByteCode.Assembler,
|
ByteCode.Assembler,
|
||||||
ByteCode.Generator,
|
ByteCode.Builder,
|
||||||
ByteCode.Constants
|
ByteCode.Constants
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
module ByteCode.Generator where
|
module ByteCode.Builder where
|
||||||
|
|
||||||
import ByteCode.Constants
|
import ByteCode.Constants
|
||||||
import ByteCode.ClassFile (ClassFile (..), ConstantInfo (..), MemberInfo(..), Operation(..), Attribute(..), opcodeEncodingLength)
|
import ByteCode.ClassFile (ClassFile (..), ConstantInfo (..), MemberInfo(..), Operation(..), Attribute(..), opcodeEncodingLength)
|
@ -4,7 +4,7 @@ import Example
|
|||||||
import Typecheck
|
import Typecheck
|
||||||
import Parser.Lexer (alexScanTokens)
|
import Parser.Lexer (alexScanTokens)
|
||||||
import Parser.JavaParser
|
import Parser.JavaParser
|
||||||
import ByteCode.Generator
|
import ByteCode.Builder
|
||||||
import ByteCode.ClassFile
|
import ByteCode.ClassFile
|
||||||
import Data.ByteString (pack, writeFile)
|
import Data.ByteString (pack, writeFile)
|
||||||
import System.Environment
|
import System.Environment
|
||||||
@ -12,9 +12,9 @@ import System.FilePath.Posix (takeDirectory)
|
|||||||
|
|
||||||
main = do
|
main = do
|
||||||
args <- getArgs
|
args <- getArgs
|
||||||
let filename = if (length args) > 0
|
let filename = if null args
|
||||||
then args!!0
|
then error "Missing filename, I need to know what to compile"
|
||||||
else error "Missing filename, I need to know what to compile"
|
else args!!0
|
||||||
let outputDirectory = takeDirectory filename
|
let outputDirectory = takeDirectory filename
|
||||||
print ("Compiling " ++ filename)
|
print ("Compiling " ++ filename)
|
||||||
file <- readFile filename
|
file <- readFile filename
|
||||||
|
Loading…
Reference in New Issue
Block a user