Package org.ruby_lang.prism
Class Nodes.RangeNode
java.lang.Object
org.ruby_lang.prism.Nodes.Node
org.ruby_lang.prism.Nodes.RangeNode
- Enclosing class:
- Nodes
Represents the use of the `..` or `...` operators.
1..2
^^^^
c if a =~ /left/ ... b =~ /right/
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal shortfinal Nodes.NodeThe left-hand side of the range, if present.final Nodes.NodeThe right-hand side of the range, if present.Fields inherited from class org.ruby_lang.prism.Nodes.Node
EMPTY_ARRAY, length, nodeId, startOffset -
Constructor Summary
ConstructorsConstructorDescriptionRangeNode(int nodeId, int startOffset, int length, short flags, Nodes.Node left, Nodes.Node right) -
Method Summary
Modifier and TypeMethodDescription<T> Taccept(AbstractNodeVisitor<T> visitor) booleanprotected String<T> voidvisitChildNodes(AbstractNodeVisitor<T> visitor) Methods inherited from class org.ruby_lang.prism.Nodes.Node
endOffset, hasNewLineFlag, setNewLineFlag, setNewLineFlag, toString
-
Field Details
-
flags
public final short flags -
left
The left-hand side of the range, if present. It can be either `nil` or any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). 1... ^ hello...goodbye ^^^^^ -
right
The right-hand side of the range, if present. It can be either `nil` or any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). ..5 ^ 1...foo ^^^ If neither right-hand or left-hand side was included, this will be an ErrorRecoveryNode.
-
-
Constructor Details
-
RangeNode
public RangeNode(int nodeId, int startOffset, int length, short flags, Nodes.Node left, Nodes.Node right)
-
-
Method Details
-
isExcludeEnd
public boolean isExcludeEnd() -
visitChildNodes
- Specified by:
visitChildNodesin classNodes.Node
-
childNodes
- Specified by:
childNodesin classNodes.Node
-
accept
- Specified by:
acceptin classNodes.Node
-
toString
- Specified by:
toStringin classNodes.Node
-