Module dev.civl.abc

Interface DotNode

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

public interface DotNode extends ExpressionNode
A C expression in which the operator is the . (dot) operator, used to specify a member of a structure or union.
  • Method Details

    • getStructure

      ExpressionNode getStructure()
      Returns the node representing the left operand, which must have structure or union type.
      Returns:
      the left operand
    • setStructure

      void setStructure(ExpressionNode structure)
      Sets the value returned by getStructure().
      Parameters:
      structure - the left operand
    • getFieldName

      IdentifierNode getFieldName()
      Returns the node representing the right operand, which must be an identifier which names a field in the structure or union type which is the type of the left operand.
      Returns:
      the right operand
    • setFieldName

      void setFieldName(IdentifierNode field)
      Sets the value returned by getFieldName().
      Parameters:
      field - the right operand
    • getNavigationSequence

      Field[] getNavigationSequence()
      Returns the sequence of nested fields navigates from an outer structure or union member to an inner member through anonymous structure or union members. Example:
       struct S {
         union {       // call this field "f0"
           struct {    // call this field "f1"
             union {   // call this field "f2"
               int x;
             };
           };
         };
       } u;
       
      For the dot expression u.x, the navigation sequence is the sequence of Field objects {f0, f1, f2, x}. If those anonymous fields were given the names f0, f1, and f2, then the dot expression would be transformed to u.f0.f1.f2.x.
      Returns:
      the navigation sequence
    • setNavigationSequence

      void setNavigationSequence(Field[] sequence)
    • copy

      DotNode 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