Module dev.civl.abc

Interface DesignationNode

All Superinterfaces:
ASTNode, Iterable<DesignatorNode>, SequenceNode<DesignatorNode>

public interface DesignationNode extends SequenceNode<DesignatorNode>

A designation node specifies a sequence of designators. Each designator is either an array designator or field designator. The sequence navigates to a point within a compound structure. Here is an example from C17:6.7.9, paragraph 35, Example 11:

  struct { int a[3], b; } w[] = { [0].a = {1}, [1].a[0] = 2 };
 
"[0].a" is represented by a DesignationNode wrapping a sequence of length 2 of DesignatorNodes. The first DesignatorNode in this sequence represents "[0]" (an array element designator) and the second DesignatorNode represents ".a" (a field designator).

The methods inherited from SequenceNode provide all that is necessary to read and modify the sequence of designators.

See Also:
  • Method Details

    • 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 SequenceNode<DesignatorNode>
      Returns:
      deep copy of this node