instance method
Prism::ArrayNode#opening_loc
opening_loc
lib/prism/node.rb
View on GitHub ↗
# File tmp/rubies/ruby-4.0.0/lib/prism/node.rb, line 927
def opening_loc
location = @opening_loc
case location
when nil
nil
when Location
location
else
@opening_loc = Location.new(source, location >> 32, location & 0xFFFFFFFF)
end
end
Represents the optional source location for the opening token.
Example
[1,2,3] # "[" %w[foo bar baz] # "%w[" %I(apple orange banana) # "%I(" foo = 1, 2, 3 # nil