Class ProgramCompiler
java.lang.Object
com.mackenziehigh.autumn.lang.compiler.compilers.ProgramCompiler
An instance of this class controls the compilation of an entire program.
- Author:
- Mackenzie High
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal com.mackenziehigh.autumn.lang.compiler.compilers.StaticChecker
final IErrorReporter
final com.mackenziehigh.autumn.lang.compiler.compilers.SymbolTable
final TypeSystem
-
Method Summary
Modifier and TypeMethodDescriptionstatic CompiledProgram
compile
(List<Module> input, IErrorReporter reporter, ClassLoader loader, List<Class> imported) This method compiles a program to its bytecode representation.void
void
void
void
-
Field Details
-
typesystem
-
symbols
public final com.mackenziehigh.autumn.lang.compiler.compilers.SymbolTable symbols -
checker
public final com.mackenziehigh.autumn.lang.compiler.compilers.StaticChecker checker -
reporter
-
imported
-
-
Method Details
-
performTypeDeclaration
public void performTypeDeclaration() -
performTypeInitialization
public void performTypeInitialization() -
performTypeStructureChecking
public void performTypeStructureChecking() -
performTypeUsageChecking
public void performTypeUsageChecking() -
compile
public static CompiledProgram compile(List<Module> input, IErrorReporter reporter, ClassLoader loader, List<Class> imported) This method compiles a program to its bytecode representation.- Parameters:
input
- are the modules in the program that will be compiled.reporter
- is used to report errors.loader
- is the class-loader used to find previously loaded types.imported
- are types to automatically import into every module.- Returns:
- the bytecode representation of the compiled program; or null, if compilation fails.
-