- All Superinterfaces:
ASTNode
- All Known Subinterfaces:
OrdinaryLabelNode,SwitchLabelNode
Represents a label in a program. This can be either an ordinary label, which
is an identifier followed by a colon followed by a statement, and can be used
as the target of a
goto (for example); or it can be a
case or default label used in a switch
statement.-
Nested Class Summary
Nested classes/interfaces inherited from interface dev.civl.abc.ast.node.IF.ASTNode
ASTNode.NodeKind -
Method Summary
Modifier and TypeMethodDescriptioncopy()Returns a deep copy of this AST node.The statement which is preceded by a label (but not including the label).voidsetStatement(StatementNode statement) Sets the value returned bygetStatement().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
-
getStatement
StatementNode getStatement()The statement which is preceded by a label (but not including the label). Note that the statement is not a child of this node. If it were, the AST would not be a tree.- Returns:
- the statement labeled
-
setStatement
Sets the value returned bygetStatement().- Parameters:
statement- the statement labeled
-
copy
LabelNode copy()Description copied from interface:ASTNodeReturns 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.
-