Interface EnumerationTypeNode

All Superinterfaces:
ASTNode, BlockItemNode, DeclarationNode, SizeableNode, TypeNode

public interface EnumerationTypeNode extends DeclarationNode, TypeNode, BlockItemNode
An enumeration type.
  • 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

      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

      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 DeclarationNode
      Specified by:
      copy in interface SizeableNode
      Specified by:
      copy in interface TypeNode
      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: TypeNode

      Returns the conceptual C type associated to this type node.

      Specified by:
      getType in interface SizeableNode
      Specified by:
      getType in interface TypeNode
      Returns:
      the C type defined by this type node