public final class CompileContext extends Object implements ParsingContext
ParsingContext.Location| Constructor and Description |
|---|
CompileContext(MemoryBuilder staticMemBuilder) |
| Modifier and Type | Method and Description |
|---|---|
CompileContext |
createSubContext()
clone this context
|
void |
generateCode(ParsingContext.Location[] locs,
Instruction... args)
generate instruction code with argument
|
void |
generateCode(ParsingContext.Location loc,
Instruction instr) |
void |
generateCodeAll(ParsingContext parsingContext)
Add code to this context
|
int |
getAddress()
return the current code address
|
Instruction |
getLast() |
ProgramBuilder |
getProgramBuilder()
get the code generated in this context
|
void |
staticSymbol(String name,
Object object) |
String |
toString() |
public CompileContext(MemoryBuilder staticMemBuilder)
public void generateCode(ParsingContext.Location[] locs, Instruction... args)
ParsingContextgenerateCode in interface ParsingContextpublic void generateCodeAll(ParsingContext parsingContext)
ParsingContextgenerateCodeAll in interface ParsingContextpublic int getAddress()
ParsingContextgetAddress in interface ParsingContextpublic ProgramBuilder getProgramBuilder()
ParsingContextgetProgramBuilder in interface ParsingContextpublic CompileContext createSubContext()
ParsingContextcreateSubContext in interface ParsingContextpublic void staticSymbol(String name, Object object)
staticSymbol in interface ParsingContextpublic Instruction getLast()
getLast in interface ParsingContextpublic void generateCode(ParsingContext.Location loc, Instruction instr)
generateCode in interface ParsingContextCopyright © 2018 SPF4J. All rights reserved.