java.lang.Object
java.lang.Record
com.darkcollective.relix.ast.FunctionCall
- Record Components:
functionName- the name of the functionarguments- the function argumentslocation- the source location of this operand; never null
- All Implemented Interfaces:
Operand
public record FunctionCall(String functionName, List<Operand> arguments, SourceLocation location)
extends Record
implements Operand
Represents a function call in an expression.
A function call has a name and a list of arguments.
-
Constructor Summary
ConstructorsConstructorDescriptionFunctionCall(String functionName, List<Operand> arguments) Convenience constructor for tests; usesSourceLocation.UNKNOWN.FunctionCall(String functionName, List<Operand> arguments, SourceLocation location) Creates an instance of aFunctionCallrecord class. -
Method Summary
Modifier and TypeMethodDescription<R> Raccept(OperandVisitor<R> visitor) Returns the value of theargumentsrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of thefunctionNamerecord component.final inthashCode()Returns a hash code value for this object.location()Returns the value of thelocationrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
FunctionCall
Creates an instance of aFunctionCallrecord class.- Parameters:
functionName- the value for thefunctionNamerecord componentarguments- the value for theargumentsrecord componentlocation- the value for thelocationrecord component
-
FunctionCall
Convenience constructor for tests; usesSourceLocation.UNKNOWN.
-
-
Method Details
-
accept
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
functionName
Returns the value of thefunctionNamerecord component.- Returns:
- the value of the
functionNamerecord component
-
arguments
Returns the value of theargumentsrecord component.- Returns:
- the value of the
argumentsrecord component
-
location
Returns the value of thelocationrecord component.
-