Class BoxArgument
java.lang.Object
ortus.boxlang.compiler.ast.BoxNode
ortus.boxlang.compiler.ast.BoxExpression
ortus.boxlang.compiler.ast.expression.BoxArgument
- All Implemented Interfaces:
BoxVisitable
AST Node representing an argument.
Argument can have a name like:
a=10
-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionBoxArgument
(BoxExpression name, BoxExpression value, Position position, String sourceText) Creates the AST node for a named argumentBoxArgument
(BoxExpression value, Position position, String sourceText) Creates the AST node for an anonymous argument -
Method Summary
Modifier and TypeMethodDescriptionAccept method for replacing visitor support.void
Accept method for visitor support.getName()
getValue()
void
setName
(BoxExpression name) void
setValue
(BoxExpression value) toMap()
Methods inherited from class ortus.boxlang.compiler.ast.BoxExpression
isLiteral
Methods inherited from class ortus.boxlang.compiler.ast.BoxNode
addComment, associateComments, endsOnSameLineAs, enumToMap, getAncestors, getChildren, getComments, getDescendants, getDescendantsOfType, getDescendantsOfType, getDescription, getDocComment, getFirstAncestorOfType, getFirstAncestorOfType, getFirstNodeOfType, getFirstNodeOfType, getFirstNodeOfTypes, getParent, getPosition, getSourceText, isAfter, isBefore, isInside, replaceChildren, replaceChildren, setComments, setParent, setPosition, setSourceText, startsOnEndLineOf, toJSON, toString
-
Constructor Details
-
BoxArgument
Creates the AST node for an anonymous argument- Parameters:
value
- expression representing the value of the argumentposition
- position of the statement in the source codesourceText
- source code that originated the Node
-
BoxArgument
Creates the AST node for a named argument- Parameters:
name
- expression representing the name of the argumentvalue
- expression representing the value of the argumentposition
- position of the statement in the source codesourceText
- source code that originated the Node
-
-
Method Details
-
setName
-
setValue
-
getName
-
getValue
-
toMap
-
accept
Description copied from interface:BoxVisitable
Accept method for visitor support.- Parameters:
v
- the visitor implementation
-
accept
Description copied from interface:BoxVisitable
Accept method for replacing visitor support. Each accept returns the node, or a replacement node.- Parameters:
v
- the visitor implementation
-