Represents a hash pattern in pattern matching.
foo => { a: 1, b: 2 } ^^^^^^^^^^^^^^ foo => { a: 1, b: 2, **c } ^^^^^^^^^^^^^^^^^^^
Represents the use of an assignment operator on a call to ‘[]`.
foo.bar[baz] += value ^^^^^^^^^^^^^^^^^^^^^
Represents assigning to an index.
foo[bar], = 1 ^^^^^^^^ begin rescue => foo[bar] ^^^^^^^^ end for foo[bar] in baz do end ^^^^^^^^
Represents writing to an instance variable in a context that doesn’t have an explicit value.
@foo, @bar = baz ^^^^ ^^^^
Represents a regular expression literal that contains interpolation that is being used in the predicate of a conditional to implicitly match against the last line read by an IO
object.
if /foo #{bar} baz/ then end ^^^^^^^^^^^^^^^^
Represents a regular expression literal that contains interpolation.
/foo #{bar} baz/ ^^^^^^^^^^^^^^^^
Represents a string literal that contains interpolation.
"foo #{bar} baz" ^^^^^^^^^^^^^^^^
Represents a symbol literal that contains interpolation.
:"foo #{bar} baz" ^^^^^^^^^^^^^^^^^
Represents an xstring literal that contains interpolation.
`foo #{bar} baz` ^^^^^^^^^^^^^^^^
Represents an implicit set of parameters through the use of the ‘it` keyword within a block or lambda.
-> { it + it } ^^^^^^^^^^^^^^
Represents a keyword rest parameter to a method, block, or lambda definition.
def a(**b) ^^^ end
Represents the use of ‘**nil` inside method arguments.
def a(**nil) ^^^^^ end
Represents an optional keyword parameter to a method, block, or lambda definition.
def a(b: 1) ^^^^ end
Represents an optional parameter to a method, block, or lambda definition.
def a(b = 1) ^^^^^ end
Represents the list of parameters on a method, block, or lambda definition.
def a(b, c, d) ^^^^^^^ end
The top level node of any parse tree.
Represents the use of the ‘..` or `…` operators.
1..2 ^^^^ c if a =~ /left/ ... b =~ /right/ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Represents a required keyword parameter to a method, block, or lambda definition.
def a(b: ) ^^ end
Represents a required parameter to a method, block, or lambda definition.
def a(b) ^ end
Represents an expression modified with a rescue.
foo rescue nil ^^^^^^^^^^^^^^
Represents a rest parameter to a method, block, or lambda definition.
def a(*b) ^^ end
Represents the use of the ‘super` keyword with parentheses or arguments.
super() ^^^^^^^ super foo, bar ^^^^^^^^^^^^^^