- All Superinterfaces:
ASTNode,ExpressionNode,ForLoopInitializerNode,InitializerNode,SizeableNode
Represents a CIVL-C regular range expression, which has the form
lo .. hi or lo .. hi # step.
The step argument is optional. If absent, it is the same as
using 1.
If step is positive, it represents the sequence of integers
lo, lo+step, lo+2*step, ..., which is
truncated so that all entries are less than or equal to hi.
If step is negative, it represents the sequence
hi, hi+step, hi+2*
step, ..., which is truncated so that all entries are greater
than or equal to lo.
-
Nested Class Summary
Nested classes/interfaces inherited from interface dev.civl.abc.ast.node.IF.ASTNode
ASTNode.NodeKindNested classes/interfaces inherited from interface dev.civl.abc.ast.node.IF.expression.ExpressionNode
ExpressionNode.ExpressionKind -
Method Summary
Modifier and TypeMethodDescriptiongetHigh()Returns the upper bound argumenthi.getLow()Returns the lower bound argumentlo.getStep()Returns the step argumentstepif it is present, else returnsnullvoidsetHigh(ExpressionNode arg) Sets the upper bound argumenthivoidsetLow(ExpressionNode arg) Sets the lower bound argumentlovoidsetStep(ExpressionNode arg) Sets the step argumentstepMethods inherited from interface dev.civl.abc.ast.node.IF.ASTNode
addAllTransformAnnotations, addTransformAnnotation, child, childIndex, children, diff, equiv, getAttribute, getOwner, getScope, getSource, id, keepOnly, nextDFS, nodeKind, numChildren, parent, prettyPrint, prettyRepresentation, prettyRepresentation, print, remove, removeChild, removeTransformAnnotation, setAttribute, setChild, setId, setOwner, setScope, toString, transformAnnotationsMethods inherited from interface dev.civl.abc.ast.node.IF.expression.ExpressionNode
addConversion, copy, expressionKind, getConversion, getConvertedType, getInitialType, getNumConversions, isConstantExpression, isLvalue, removeConversions, setInitialTypeMethods inherited from interface dev.civl.abc.ast.node.IF.declaration.InitializerNode
isSideEffectFreeMethods inherited from interface dev.civl.abc.ast.node.IF.expression.SizeableNode
getType
-
Method Details
-
getLow
ExpressionNode getLow()Returns the lower bound argumentlo.- Returns:
- the lower bound
-
setLow
Sets the lower bound argumentlo- Parameters:
arg- the new lower bound argument
-
getHigh
ExpressionNode getHigh()Returns the upper bound argumenthi.- Returns:
- the lower bound
-
setHigh
Sets the upper bound argumenthi- Parameters:
arg- the new upper bound argument
-
getStep
ExpressionNode getStep()Returns the step argumentstepif it is present, else returnsnull- Returns:
- the step argument or
null
-
setStep
Sets the step argumentstep- Parameters:
arg- the new step argument
-