-
-
Method Summary
Returns a deep copy of this AST node.
The condition controlling this "if" statement
Returns the "else" (aka "false") branch.
Returns the "true" branch statement--where control moves to if the
condition evaluates to true.
Methods inherited from interface dev.civl.abc.ast.node.IF.ASTNode
addAllTransformAnnotations, addTransformAnnotation, child, childIndex, children, diff, equiv, getAttribute, getOwner, getScope, getSource, id, keepOnly, nextDFS, nodeKind, numChildren, parent, prettyPrint, prettyRepresentation, prettyRepresentation, print, remove, removeChild, removeTransformAnnotation, setAttribute, setChild, setId, setOwner, setScope, toString, transformAnnotations
-
Method Details
-
getCondition
The condition controlling this "if" statement
- Returns:
- the branch condition expression
-
getTrueBranch
Returns the "true" branch statement--where control moves to if the
condition evaluates to true.
- Returns:
- the true branch statement
-
getFalseBranch
Returns the "else" (aka "false") branch. May be null (if this "if"
statement has no "else" clause).
- Returns:
- false branch, or null
-
copy
Description copied from interface: ASTNode
Returns a deep copy of this AST node. The node and all of its descendants
will be cloned. The cloning does not copy analysis or attribute information.
- Specified by:
copy in interface ASTNode
- Specified by:
copy in interface BlockItemNode
- Specified by:
copy in interface StatementNode
- Returns:
- deep copy of this node