Represents the use of the .. or ... operators.

1..2
^^^^

c if a =~ /left/ ... b =~ /right/
     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Attributes
Read

The left-hand side of the range, if present. It can be either nil or any non-void expression.

1...
^

hello...goodbye
^^^^^
Read

The right-hand side of the range, if present. It can be either nil or any non-void expression.

..5
  ^

1...foo
    ^^^

If neither right-hand or left-hand side was included, this will be a MissingNode.

Class Methods

Initialize a new RangeNode node.

Return a symbol representation of this node type. See Node::type.

Instance Methods

Implements case-equality for the node. This is effectively == but without comparing the value of locations. Locations are checked only for presence.

def accept: (Visitor visitor) -> void

def child_nodes: () -> Array

def comment_targets: () -> Array[Node | Location]

def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?left: Prism::node?, ?right: Prism::node?, ?operator_loc: Location) -> RangeNode

def deconstruct_keys: (Array keys) -> { node_id: Integer, location: Location, left: Prism::node?, right: Prism::node?, operator_loc: Location }

def exclude_end?: () -> bool

def inspect -> String

def operator: () -> String

The location of the .. or ... operator.

Save the operator_loc location using the given saved source so that it can be retrieved later.

Return a symbol representation of this node type. See Node#type.