- All Superinterfaces:
ASTNode,DesignatorNode
An array designator specifies the index of an element of an array being
initialized.
-
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.getIndex()Gets the constant expression which yields the index to initialize.voidsetIndex(ExpressionNode expression) Sets the index expression.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
-
getIndex
ExpressionNode getIndex()Gets the constant expression which yields the index to initialize.- Returns:
- array index expression
-
setIndex
Sets the index expression.- Parameters:
expression- a constant expression
-
copy
ArrayDesignatorNode 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.- Specified by:
copyin interfaceASTNode- Specified by:
copyin interfaceDesignatorNode- Returns:
- deep copy of this node
-