Class BoxUnaryOperation
java.lang.Object
ortus.boxlang.compiler.ast.BoxNode
ortus.boxlang.compiler.ast.BoxExpression
ortus.boxlang.compiler.ast.expression.BoxUnaryOperation
- All Implemented Interfaces:
BoxVisitable
AST Node representing a unary operator
-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionBoxUnaryOperation
(BoxExpression expr, BoxUnaryOperator operator, Position position, String sourceText) -
Method Summary
Modifier and TypeMethodDescriptionAccept method for replacing visitor support.void
Accept method for visitor support.Returns a human-readable description of the node, which it manufactures from the class name.getExpr()
void
setExpr
(BoxExpression expr) void
setOperator
(BoxUnaryOperator operator) 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, getDocComment, getFirstAncestorOfType, getFirstAncestorOfType, getFirstNodeOfType, getFirstNodeOfType, getFirstNodeOfTypes, getParent, getPosition, getSourceText, isAfter, isBefore, isInside, replaceChildren, replaceChildren, setComments, setParent, setPosition, setSourceText, startsOnEndLineOf, toJSON, toString
-
Constructor Details
-
BoxUnaryOperation
public BoxUnaryOperation(BoxExpression expr, BoxUnaryOperator operator, Position position, String sourceText) - Parameters:
expr
- expressionoperator
- operator to applyposition
- position of the statement in the source codesourceText
- source code that originated the Node
-
-
Method Details
-
getExpr
-
getOperator
-
setExpr
-
setOperator
-
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
-
getDescription
Description copied from class:BoxNode
Returns 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:
getDescription
in classBoxNode
- Returns:
- human readable description of the expression, for use in error messages etc
-