Package org.spf4j.zel.vm
Interface ParsingContext
-
- All Known Implementing Classes:
CompileContext,NullParsingContext
@ParametersAreNonnullByDefault public interface ParsingContext
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classParsingContext.Location
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ParsingContextcreateSubContext()clone this contextvoidgenerateCode(ParsingContext.Location[] loc, Instruction... args)generate instruction code with argumentvoidgenerateCode(ParsingContext.Location loc, Instruction instr)voidgenerateCodeAll(ParsingContext parsingContext)Add code to this contextintgetAddress()return the current code addressInstructiongetLast()org.spf4j.zel.vm.ProgramBuildergetProgramBuilder()get the code generated in this contextvoidstaticSymbol(String name)voidstaticSymbol(String name, Object object)
-
-
-
Method Detail
-
generateCode
void generateCode(ParsingContext.Location[] loc, Instruction... args)
generate instruction code with argument- Parameters:
instr- Instructionarg- Object
-
generateCode
void generateCode(ParsingContext.Location loc, Instruction instr)
-
staticSymbol
void staticSymbol(String name)
-
generateCodeAll
void generateCodeAll(ParsingContext parsingContext)
Add code to this context- Parameters:
code- Object[]
-
getAddress
int getAddress()
return the current code address- Returns:
-
getLast
Instruction getLast()
-
getProgramBuilder
@Nullable org.spf4j.zel.vm.ProgramBuilder getProgramBuilder()
get the code generated in this context- Returns:
- Object[]
-
createSubContext
ParsingContext createSubContext()
clone this context- Returns:
-
-