Interface GenericSelectionNode

All Superinterfaces:
ASTNode, ExpressionNode, ForLoopInitializerNode, InitializerNode, SizeableNode

public interface GenericSelectionNode extends ExpressionNode
Represents a C11 generic selection construct; see C11 Section 6.5.1.1.
  • Method Details

    • getControllingExpression

      ExpressionNode getControllingExpression()
      Returns the controlling expression.
      Returns:
      the controlling expression which is the (unevaluated) expression whose type is used to select an expression from the association list.
    • getDefaultAssociation

      ExpressionNode getDefaultAssociation()
      Returns:
      the default association if it exists, null otherwise
    • getAssociationList

      SequenceNode<GenericAssociationNode> getAssociationList()
      Returns:
      the sequence node containing all generic associations (which does not include the default association)
    • getAssociatedExpression

      ExpressionNode getAssociatedExpression(Type typeLabel)
      Gets the expression node associated to the typeNode representing a type compatible with typeLabel. If no such type node exists in the sequence of associations then returns the expression of the default association (which may be null if there is no default association).
      Parameters:
      typeLabel - the conceptual type that pinpoints the association of interest
      Returns:
      the expression node associated with typeLabel if it exists; returns getDefaultAssociation() otherwise.
    • 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 ExpressionNode
      Specified by:
      copy in interface ForLoopInitializerNode
      Specified by:
      copy in interface InitializerNode
      Specified by:
      copy in interface SizeableNode
      Returns:
      deep copy of this node