Represents a regular expression literal used in the predicate of a conditional to implicitly match against the last line read by an IO
object.
if /foo/i then end ^^^^^^
Represents the use of ‘**nil` inside method arguments.
def a(**nil) ^^^^^ end
Represents an implicit set of parameters through the use of numbered parameters within a block or lambda.
-> { _1 + _2 } ^^^^^^^^^^^^^^
Represents an optional keyword parameter to a method, block, or lambda definition.
def a(b: 1) ^^^^ end
Represents the use of the ‘||` operator or the `or` keyword.
left or right ^^^^^^^^^^^^^
Represents the use of the ‘^` operator for pinning an expression in a pattern matching expression.
foo in ^(bar) ^^^^^^
Represents an expression modified with a rescue.
foo rescue nil ^^^^^^^^^^^^^^
Represents a rescue statement.
begin rescue Foo, *splat, Bar => ex foo ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ end
‘Foo, *splat, Bar` are in the `exceptions` field. `ex` is in the `reference` field.
Represents a singleton class declaration involving the ‘class` keyword.
class << self end ^^^^^^^^^^^^^^^^^
Represents a set of statements contained within some scope.
foo; bar; baz ^^^^^^^^^^^^^
Represents a string literal, a string contained within a ‘%w` list, or plain string content within an interpolated string.
"foo" ^^^^^ %w[foo] ^^^ "foo #{bar} baz" ^^^^ ^^^^
This represents an error that was encountered during parsing.
This represents the result of a call to ::parse or ::parse_file. It contains the requested structure, any comments that were encounters, and any errors that were encountered.
This is a result specific to the ‘parse` and `parse_file` methods.
This is a result specific to the ‘lex` and `lex_file` methods.
This is a result specific to the ‘parse_lex` and `parse_lex_file` methods.
This represents a token from the Ruby source.