Interface FieldDeclarationNode

All Superinterfaces:
ASTNode, DeclarationNode

public interface FieldDeclarationNode extends DeclarationNode
Represents a declaration of a field (member) in a struct or union type.
  • Method Details

    • getTypeNode

      TypeNode getTypeNode()
      Returns the type of the field being declared. This may be null.
      Returns:
      the type node child of this node
      See Also:
    • setTypeNode

      void setTypeNode(TypeNode type)
      Sets the type node child of this node. This is the type of field.
      Parameters:
      type - the type of the field being declared
      See Also:
    • getBitFieldWidth

      ExpressionNode getBitFieldWidth()
      Returns the bit field width. This is a constant expression. It is optional. If there is no identifier, the bit width must be there, but it can also be there with an identifier. If absent, this method returns null. This is a child node of this node.
      Returns:
      the optional bit field width expression (null if absent)
      See Also:
    • setBitFieldWidth

      void setBitFieldWidth(ExpressionNode width)
      Sets the bit field width child node of this node to the given node.
      Parameters:
      width - the expression to be the bit field width of this node
      See Also:
    • getEntity

      Field 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