Class BoxFunctionInvocation
java.lang.Object
ortus.boxlang.compiler.ast.BoxNode
ortus.boxlang.compiler.ast.BoxExpression
ortus.boxlang.compiler.ast.expression.BoxFunctionInvocation
- All Implemented Interfaces:
BoxVisitable
AST Node representing a fully qualified name
-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionBoxFunctionInvocation(String name, List<BoxArgument> arguments, Position position, String sourceText) Function invocation i.e. -
Method Summary
Modifier and TypeMethodDescriptionAccept method for replacing visitor support.voidAccept method for visitor support.Returns a human-readable description of the node, which it manufactures from the class name.getName()booleanChecks if the function invocation is using named arguments.voidsetArguments(List<BoxArgument> arguments) voidtoMap()Methods inherited from class ortus.boxlang.compiler.ast.BoxExpression
getAsLiteralValue, getAsSimpleValue, getAsSimpleValue, isLiteralMethods inherited from class ortus.boxlang.compiler.ast.BoxNode
addComment, associateComments, endsOnSameLineAs, enumToMap, getAncestors, getChildren, getComments, getDescendants, getDescendantsOfType, getDescendantsOfType, getDocComment, getFirstAncestorOfType, getFirstAncestorOfType, getFirstNodeOfType, getFirstNodeOfType, getFirstNodeOfTypes, getParent, getPosition, getSourceText, isAfter, isBefore, isInside, replaceChildren, replaceChildren, setComments, setParent, setPosition, setSourceText, startsOnEndLineOf, toJSON, toString
-
Constructor Details
-
BoxFunctionInvocation
public BoxFunctionInvocation(String name, List<BoxArgument> arguments, Position position, String sourceText) Function invocation i.e. create(x)- Parameters:
name- name of the function to invokearguments- list of argumentsposition- position of the statement in the source codesourceText- source code that originated the Node
-
-
Method Details
-
getName
-
getArguments
-
setArguments
-
setName
-
isNamedArgs
public boolean isNamedArgs()Checks if the function invocation is using named arguments. If there are no args defined, we return false. In that case, it doesn't neccessarily mean the args are positional, but they certainly aren't named either, so it's not wrong.- Returns:
- true if the function invocation is using named arguments, false otherwise
-
toMap
-
accept
Description copied from interface:BoxVisitableAccept method for visitor support.- Parameters:
v- the visitor implementation
-
accept
Description copied from interface:BoxVisitableAccept method for replacing visitor support. Each accept returns the node, or a replacement node.- Parameters:
v- the visitor implementation
-
getDescription
Description copied from class:BoxNodeReturns a human-readable description of the node, which it manufactures from the class name.While that is quite often good enough, override this method in subclasses to provide a better description when this default does not work quite right.
- Overrides:
getDescriptionin classBoxNode- Returns:
- human readable description of the expression, for use in error messages etc
-