- All Superinterfaces:
ASTNode,BlockItemNode,DeclarationNode,SizeableNode,TypeNode
An enumeration type.
-
Nested Class Summary
Nested classes/interfaces inherited from interface dev.civl.abc.ast.node.IF.ASTNode
ASTNode.NodeKindNested classes/interfaces inherited from interface dev.civl.abc.ast.node.IF.statement.BlockItemNode
BlockItemNode.BlockItemKindNested classes/interfaces inherited from interface dev.civl.abc.ast.node.IF.type.TypeNode
TypeNode.TypeNodeKind -
Method Summary
Modifier and TypeMethodDescriptioncopy()Returns a deep copy of this AST node.Returns the sequence of enumerators for this enumerated type.getTag()Returns the "tag", which is the name of this enumerated type.getType()Returns the conceptual C type associated to this type node.voidNullifies the enumerators field, making this an incomplete enumeration type.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.statement.BlockItemNode
blockItemKindMethods inherited from interface dev.civl.abc.ast.node.IF.declaration.DeclarationNode
getEntity, getIdentifier, getName, isDefinition, setEntity, setIdentifier, setIsDefinitionMethods inherited from interface dev.civl.abc.ast.node.IF.type.TypeNode
isAtomicQualified, isConstQualified, isInputQualified, isOutputQualified, isRestrictQualified, isVolatileQualified, kind, setAtomicQualified, setConstQualified, setInputQualified, setOutputQualified, setRestrictQualified, setType, setVolatileQualified
-
Method Details
-
getTag
IdentifierNode getTag()Returns the "tag", which is the name of this enumerated type. For example, in "enum color {...}", "color" is the tag.- Returns:
- the tag of this enumerated type
-
enumerators
SequenceNode<EnumeratorDeclarationNode> enumerators()Returns the sequence of enumerators for this enumerated type. Each enumerator consists of a name and optional constant expression. If the optional constant expression is absent, it will be null.- Returns:
- the sequence node for the enumerators of this type
-
copy
EnumerationTypeNode 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 interfaceBlockItemNode- Specified by:
copyin interfaceDeclarationNode- Specified by:
copyin interfaceSizeableNode- Specified by:
copyin interfaceTypeNode- Returns:
- deep copy of this node
-
makeIncomplete
void makeIncomplete()Nullifies the enumerators field, making this an incomplete enumeration type. If already null, it is a no-op. -
getType
EnumerationType getType()Description copied from interface:TypeNodeReturns the conceptual C type associated to this type node.
- Specified by:
getTypein interfaceSizeableNode- Specified by:
getTypein interfaceTypeNode- Returns:
- the C type defined by this type node
-