Interface EnumeratorDeclarationNode

All Superinterfaces:
ASTNode, DeclarationNode

public interface EnumeratorDeclarationNode extends DeclarationNode
The declaration of an enumerator (enumeration constant) within an enumeration type definition.
  • Method Details

    • getValue

      ExpressionNode getValue()
      Each enumerator in an enumeration type definition may have an optional constant value specified. This method returns the constant expression for that value, if the value is present. Otherwise, returns null
      Returns:
      the specified constant value for this enumerator, else null
      See Also:
    • setValue

      void setValue(ExpressionNode value)
      Sets the optional value expression to the given expression node.
      Parameters:
      value - a constant integer expression
    • getEntity

      Enumerator getEntity()
      Description copied from interface: DeclarationNode
      Returns the entity whose existence is declared by this declaration. This is initially null, and can be changed by DeclarationNode.setEntity(Entity).
      Specified by:
      getEntity in interface DeclarationNode
      Returns:
      the entity declared by this declaration
      See Also:
    • 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 DeclarationNode
      Returns:
      deep copy of this node