CompileContext

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(

getScope

public Scope getScope ()

Method getScope.

getOperandStack

public Stack getOperandStack ()

Method getOperandStack.

getExecutionContext

public ExecutionContext getExecutionContext ()

Method getExecutionContext.

compile

public ValueType compile (@Nonnull final String expression, final Scope compileScope, final boolean fullResolve)

Method compile.

Parameters:
@Nonnull final String expression
final Scope compileScope
final boolean fullResolve

compile0

protected ValueType compile0 (@Nonnull final String expression, final Scope compileScope, final boolean fullResolve, final List instructions)

Method compile0.

Parameters:
@Nonnull final String expression
final Scope compileScope
final boolean fullResolve
final List instructions

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 List instructionList

getResultType

public ValueType getResultType ()

Method getResultType.

getAsOperand

public ExecutionContext.Operand getAsOperand ()

Method getAsOperand.

checkResultType

public void checkResultType (final ValueType type)

Method checkResultType.

Parameters:
final ValueType type

pushOperand

public void pushOperand (@Nonnull final Parser.ParsedToken parsedToken)

Method pushOperand.

Parameters:
@Nonnull final Parser.ParsedToken parsedToken

processOperator

public void processOperator (@Nonnull final Parser.ParsedToken operator)

Method processOperator.

Parameters:
@Nonnull final Parser.ParsedToken operator

processFunction

public void processFunction (final int argumentCount)

Method processFunction.

Parameters:
final int argumentCount

processTuple

public void processTuple (@Nonnull final Parser.ParsedToken openingToken, final int argumentCount)

Method processTuple.

Parameters:
@Nonnull final Parser.ParsedToken openingToken
final int argumentCount

done

public void done ()

Method done.