public class CompileContext implements Parser.ParsedTokenConsumer
Class CompileContext. Provides compilecontext functionality for the Hytale server.
java.lang.Object > CompileContext
Field Summary
scope
private
Scope
scope
Field scope.
instructions
private
List
instructions
Field instructions.
resultType
private
ValueType
resultType
Field resultType.
valueType
final
ValueType
valueType
Field valueType.
saveScope
final
Scope
saveScope
Field saveScope.
oldScope
final
Scope
oldScope
Field oldScope.
ast
final
AST
ast
Field ast.
Method Detail
CompileContext
public
public
CompileContext
()
Method CompileContext.
Parser
public
new
Parser
(Expression.getLexerInstance()
Method Parser.
- Parameters:
Expression.getLexerInstance(Expression.getLexerInstance(
getOperandStack
public
Stack
getOperandStack
()
Method getOperandStack.
compile
public
ValueType
compile
(@Nonnull final String expression, final Scope compileScope, final boolean fullResolve)
Method compile.
- Parameters:
@Nonnull final Stringexpressionfinal ScopecompileScopefinal booleanfullResolve
compile0
protected
ValueType
compile0
(@Nonnull final String expression, final Scope compileScope, final boolean fullResolve, final List instructions)
Method compile0.
- Parameters:
@Nonnull final Stringexpressionfinal ScopecompileScopefinal booleanfullResolvefinal Listinstructions
IllegalStateException
public
new
IllegalStateException
("Error compiling expression '" + expression + "': " + t.getMessage()
Method IllegalStateException.
- Parameters:
"Error compiling expression '" + expression + "': " +t.getMessage(
getInstructions
public
List
getInstructions
()
Method getInstructions.
setInstructions
public
void
setInstructions
(final List instructionList)
Method setInstructions.
- Parameters:
final ListinstructionList
getAsOperand
public
ExecutionContext.Operand
getAsOperand
()
Method getAsOperand.
pushOperand
public
void
pushOperand
(@Nonnull final Parser.ParsedToken parsedToken)
Method pushOperand.
- Parameters:
@Nonnull final Parser.ParsedTokenparsedToken
processOperator
public
void
processOperator
(@Nonnull final Parser.ParsedToken operator)
Method processOperator.
- Parameters:
@Nonnull final Parser.ParsedTokenoperator
processFunction
public
void
processFunction
(final int argumentCount)
Method processFunction.
- Parameters:
final intargumentCount
processTuple
public
void
processTuple
(@Nonnull final Parser.ParsedToken openingToken, final int argumentCount)
Method processTuple.
- Parameters:
@Nonnull final Parser.ParsedTokenopeningTokenfinal intargumentCount
done
public
void
done
()
Method done.