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)
ParsingContext
generateCode
in interface ParsingContext
public void generateCodeAll(ParsingContext parsingContext)
ParsingContext
generateCodeAll
in interface ParsingContext
public int getAddress()
ParsingContext
getAddress
in interface ParsingContext
public ProgramBuilder getProgramBuilder()
ParsingContext
getProgramBuilder
in interface ParsingContext
public CompileContext createSubContext()
ParsingContext
createSubContext
in interface ParsingContext
public void staticSymbol(String name, Object object)
staticSymbol
in interface ParsingContext
public Instruction getLast()
getLast
in interface ParsingContext
public void generateCode(ParsingContext.Location loc, Instruction instr)
generateCode
in interface ParsingContext
Copyright © 2018 SPF4J. All rights reserved.