Interface IGPPASTArrayRangeDesignator

All Superinterfaces:
IASTNode, ICPPASTDesignator

public interface IGPPASTArrayRangeDesignator extends ICPPASTDesignator
GCC-specific designator that allows for shorthand array range to be specified in a designated initializer, e.g. in int a[6] = { [2 ... 4] = 29 }; or struct ABC { int def[10]; } abc = { .def[4 ... 6] = 3 };
Since:
6.0
Restriction:
This interface is not intended to be implemented by clients.
Restriction:
This interface is not intended to be extended by clients.
  • Field Details

    • SUBSCRIPT_FLOOR_EXPRESSION

      static final ASTNodeProperty SUBSCRIPT_FLOOR_EXPRESSION
      The start of the index range.
    • SUBSCRIPT_CEILING_EXPRESSION

      static final ASTNodeProperty SUBSCRIPT_CEILING_EXPRESSION
      The end of the index range.
  • Method Details

    • getRangeFloor

      ICPPASTExpression getRangeFloor()
      Returns the start expression of the index range.
    • setRangeFloor

      void setRangeFloor(ICPPASTExpression expression)
      Sets the start expression of the index range.
      Parameters:
      expression - the expression for the start of the range
    • getRangeCeiling

      ICPPASTExpression getRangeCeiling()
      Returns the end expression of the index range.
    • setRangeCeiling

      void setRangeCeiling(ICPPASTExpression expression)
      Sets the end expression of the index range.
      Parameters:
      expression - the expression for the end of the range
    • copy

      Description copied from interface: IASTNode
      Returns a mutable copy of the tree rooted at this node. The following postconditions hold:
       copy.getParent() == null
       copy.getPropertyInParent() == null
       copy.isFrozen() == false
       
      Preprocessor nodes do not currently support being copied. Implicit name nodes are not copied, instead they can be regenerated if required.

      Calling this method is equivalent to copy(CopyStyle.withoutLocations).

      Specified by:
      copy in interface IASTNode
      Specified by:
      copy in interface ICPPASTDesignator
    • copy

      Description copied from interface: IASTNode
      Returns a mutable copy of the tree rooted at this node. The following postconditions hold:
       copy.getParent() == null
       copy.getPropertyInParent() == null
       copy.isFrozen() == false
       
      Preprocessor nodes do not currently support being copied. Implicit name nodes are not copied, instead they can be regenerated if required.
      Specified by:
      copy in interface IASTNode
      Specified by:
      copy in interface ICPPASTDesignator
      Parameters:
      style - IASTNode.CopyStyle create a copy with or without locations. Please see IASTNode.CopyStyle for restrictions on copies with Locations.