Interface IGPPASTArrayRangeDesignator
- All Superinterfaces:
IASTNode
,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.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.eclipse.cdt.core.dom.ast.IASTNode
IASTNode.CopyStyle
-
Field Summary
Modifier and TypeFieldDescriptionstatic final ASTNodeProperty
The end of the index range.static final ASTNodeProperty
The start of the index range.Fields inherited from interface org.eclipse.cdt.core.dom.ast.IASTNode
EMPTY_NODE_ARRAY
Fields inherited from interface org.eclipse.cdt.core.dom.ast.cpp.ICPPASTDesignator
EMPTY_ARRAY
-
Method Summary
Modifier and TypeMethodDescriptioncopy()
Returns a mutable copy of the tree rooted at this node.copy
(IASTNode.CopyStyle style) Returns a mutable copy of the tree rooted at this node.Returns the end expression of the index range.Returns the start expression of the index range.void
setRangeCeiling
(ICPPASTExpression expression) Sets the end expression of the index range.void
setRangeFloor
(ICPPASTExpression expression) Sets the start expression of the index range.Methods inherited from interface org.eclipse.cdt.core.dom.ast.IASTNode
accept, contains, getChildren, getContainingFilename, getFileLocation, getLeadingSyntax, getNodeLocations, getOriginalNode, getParent, getPropertyInParent, getRawSignature, getSyntax, getTrailingSyntax, getTranslationUnit, isActive, isFrozen, isPartOfTranslationUnitFile, setParent, setPropertyInParent
-
Field Details
-
SUBSCRIPT_FLOOR_EXPRESSION
The start of the index range. -
SUBSCRIPT_CEILING_EXPRESSION
The end of the index range.
-
-
Method Details
-
getRangeFloor
ICPPASTExpression getRangeFloor()Returns the start expression of the index range. -
setRangeFloor
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
Sets the end expression of the index range.- Parameters:
expression
- the expression for the end of the range
-
copy
IGPPASTArrayRangeDesignator 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 interfaceIASTNode
- Specified by:
copy
in interfaceICPPASTDesignator
-
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 interfaceIASTNode
- Specified by:
copy
in interfaceICPPASTDesignator
- Parameters:
style
-IASTNode.CopyStyle
create a copy with or without locations. Please seeIASTNode.CopyStyle
for restrictions on copies with Locations.
-