public final class UnaryNode extends Expression implements Assignment<Expression>
| Constructor and Description |
|---|
UnaryNode(long token,
Expression rhs)
Constructor
|
UnaryNode(long token,
int start,
int finish,
Expression expression)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
Node |
accept(NodeVisitor<? extends LexicalContext> visitor)
Assist in IR navigation.
|
<R> R |
accept(TranslatorNodeVisitor<? extends LexicalContext,R> visitor)
Provides a means to navigate the IR.
|
Expression |
getAssignmentDest()
Get assignment destination.
|
Expression |
getAssignmentSource()
Get the assignment source.
|
Expression |
getExpression()
Get the right hand side of this if it is inherited by a binary expression, or just the
expression itself if still Unary
|
boolean |
isAssignment()
Is this an assignment - i.e.
|
boolean |
isSelfModifying()
Is this a self modifying assignment?
|
UnaryNode |
setExpression(Expression expression)
Reset the right hand side of this if it is inherited by a binary expression, or just the
expression itself if still Unary
|
void |
toString(StringBuilder sb,
boolean printType)
Print logic that decides whether to show the optimistic type or not - for example it should
not be printed after just parse, when it hasn't been computed, or has been set to a trivially
provable value
|
getFinish, getFinishWithoutParens, getStart, getStartWithoutParens, isAlwaysFalse, isAlwaysTrue, isParenthesized, makeParenthesizedpublic UnaryNode(long token,
Expression rhs)
token - tokenrhs - expressionpublic UnaryNode(long token,
int start,
int finish,
Expression expression)
token - tokenstart - startfinish - finishexpression - expressionpublic boolean isAssignment()
isAssignment in class Nodepublic boolean isSelfModifying()
ExpressionisSelfModifying in class Expressionpublic Expression getAssignmentDest()
AssignmentgetAssignmentDest in interface Assignment<Expression>public Expression getAssignmentSource()
AssignmentgetAssignmentSource in interface Assignment<Expression>public Node accept(NodeVisitor<? extends LexicalContext> visitor)
public <R> R accept(TranslatorNodeVisitor<? extends LexicalContext,R> visitor)
Nodepublic void toString(StringBuilder sb, boolean printType)
Nodepublic Expression getExpression()
BinaryNodepublic UnaryNode setExpression(Expression expression)
expression - right hand side or expression nodeBinaryNode