Class ExpressionHelper
java.lang.Object
com.sk89q.worldedit.internal.expression.ExpressionHelper
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic String
The argument should be wrapped in aLocalSlot.Constant
before being passed. -
Method Summary
Modifier and TypeMethodDescriptionstatic void
static void
checkIterations(int iterations, org.antlr.v4.runtime.ParserRuleContext ctx)
static EvaluationException
evalException(org.antlr.v4.runtime.ParserRuleContext ctx, String message)
static EvaluationException
evalException(org.antlr.v4.runtime.Token token, String message)
static String
getArgumentHandleName(String fnName, MethodType type, int i, org.antlr.v4.runtime.ParserRuleContext arg)
If this argument needs a handle, returns the name of the handle needed.static int
getErrorPosition(org.antlr.v4.runtime.Token token)
static MethodHandle
resolveFunction(Functions functions, ExpressionParser.FunctionCallContext ctx)
-
Field Details
-
WRAPPED_CONSTANT
The argument should be wrapped in aLocalSlot.Constant
before being passed.- See Also:
- Constant Field Values
-
-
Method Details
-
check
public static void check(boolean condition, org.antlr.v4.runtime.ParserRuleContext ctx, String message) -
getErrorPosition
public static int getErrorPosition(org.antlr.v4.runtime.Token token) -
evalException
public static EvaluationException evalException(org.antlr.v4.runtime.ParserRuleContext ctx, String message) -
evalException
-
checkIterations
public static void checkIterations(int iterations, org.antlr.v4.runtime.ParserRuleContext ctx) -
resolveFunction
public static MethodHandle resolveFunction(Functions functions, ExpressionParser.FunctionCallContext ctx) -
getArgumentHandleName
public static String getArgumentHandleName(String fnName, MethodType type, int i, org.antlr.v4.runtime.ParserRuleContext arg)If this argument needs a handle, returns the name of the handle needed. Otherwise, returnsnull
. Ifarg
isn't a valid handle reference, throws.
-