- All Superinterfaces:
ASTNode,DeclarationNode,LabelNode
Represents an ordinary label (i.e., a label which is not a case
or default label).
A label may precede a statement, as in l1: x=1;. An instance of
this class is used to represent the l1. It contains a reference
to the statement which it precedes.
-
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.Returns the Label entity defined by this label node.The function in which this label occurs.voidsetFunction(Function function) Sets the value returned bygetFunction().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, transformAnnotationsMethods inherited from interface dev.civl.abc.ast.node.IF.declaration.DeclarationNode
getIdentifier, getName, isDefinition, setEntity, setIdentifier, setIsDefinitionMethods inherited from interface dev.civl.abc.ast.node.IF.label.LabelNode
getStatement, setStatement
-
Method Details
-
getEntity
Label getEntity()Returns the Label entity defined by this label node.- Specified by:
getEntityin interfaceDeclarationNode- Returns:
- the Label entity corresponding to this label node
- See Also:
-
getFunction
Function getFunction()The function in which this label occurs. A label has "function scope".- Returns:
- the function in which this label occurs
-
setFunction
Sets the value returned bygetFunction().- Parameters:
function- the function in which this label occurs
-
copy
OrdinaryLabelNode 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.
-