Package team.unnamed.mocha.parser.ast
Class CallExpression
java.lang.Object
team.unnamed.mocha.parser.ast.CallExpression
- All Implemented Interfaces:
Expression
Call expression implementation, executes functions
with certain arguments.
Example call expressions: print('hello'),
math.sqrt(9), math.pow(3, 2)
- Since:
- 3.0.0
-
Constructor Summary
ConstructorsConstructorDescriptionCallExpression(@NotNull Expression function, @NotNull List<Expression> arguments) -
Method Summary
Modifier and TypeMethodDescription@NotNull List<Expression>Gets the list of arguments to pass to the function.boolean@NotNull Expressionfunction()Gets the function expression.voidfunction(@NotNull Expression function) Sets the function expression.inthashCode()toString()<R> Rvisit(@NotNull ExpressionVisitor<R> visitor) Visits this expression with the given visitor.
-
Constructor Details
-
CallExpression
public CallExpression(@NotNull @NotNull Expression function, @NotNull @NotNull List<Expression> arguments)
-
-
Method Details
-
function
Gets the function expression.- Since:
- 3.0.0
-
function
Sets the function expression.- Since:
- 3.0.0
-
arguments
Gets the list of arguments to pass to the function.- Since:
- 3.0.0
-
visit
Description copied from interface:ExpressionVisits this expression with the given visitor.- Specified by:
visitin interfaceExpression- Type Parameters:
R- The visit result return type- Parameters:
visitor- The expression visitor- Returns:
- The visit result
-
toString
-
equals
-
hashCode
public int hashCode()
-