- All Known Implementing Classes:
Expr.Assign,Expr.Binary,Expr.Call,Expr.CallOptional,Expr.Get,Expr.GetOptional,Expr.Grouping,Expr.Literal,Expr.Logical,Expr.NullishCoalescence,Expr.Set,Expr.Ternary,Expr.Unary,Expr.Variable
public interface Expr
Expr represents code that evaluates to a value.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final recordExpression that assigns a value to a variable.static final recordExpression for binary operators that operate on two expression (such as "+" to sum numbers).static final recordExpression that calls aSolaScriptCallablewith desired arguments.static final recordExpression that calls aSolaScriptCallablewith desired arguments.static final recordExpression that gets a property from aSolaScriptMapand returns its.static final recordExpression that gets a property from aSolaScriptMapand returns its.static final recordGrouping expressions warps an expression to change when it is evaluated.static final recordLiteral expressions hold a value such as string, number, boolean, map or null.static final recordExpression for logical operators that operate on two expression (such as "||" to evaluate a logical or).static final recordExpression for nullish coalescence operator that evaluates to the right side expression if the left side expression evaluates to null.static final recordExpression that sets a property on aSolaScriptMap.static final recordExpression for a ternary operation.static final recordExpression for unary operators that operate on one expression (such as "!" to invert a boolean).static final recordVariable expressions hold a name of a variable to evaluate the value of.static interfaceDefines operations for the variousExprimplementations. -
Method Summary
Modifier and TypeMethodDescription<R> @Nullable Raccept(Expr.Visitor<R> visitor) Evaluate this expression via the desiredExpr.Visitor
-
Method Details
-
accept
Evaluate this expression via the desiredExpr.Visitor- Type Parameters:
R- the return type- Parameters:
visitor- theExpr.Visitorto evaluate this expression- Returns:
- the evaluated value
-