Represents an alternation pattern in pattern matching.
foo => bar | baz ^^^^^^^^^
Represents writing to a class variable in a context that doesn’t have an explicit value.
@@foo, @@bar = baz ^^^^^ ^^^^^
Represents the use of the ‘&&=` operator for assignment to a constant path.
Parent::Child &&= value ^^^^^^^^^^^^^^^^^^^^^^^
Represents accessing a constant through a path of ‘::` operators.
Foo::Bar ^^^^^^^^
Represents assigning to a constant path using an operator that isn’t ‘=`.
Parent::Child += value ^^^^^^^^^^^^^^^^^^^^^^
Represents the use of the ‘||=` operator for assignment to a constant path.
Parent::Child ||= value ^^^^^^^^^^^^^^^^^^^^^^^
Represents writing to a constant path.
::Foo = 1 ^^^^^^^^^ Foo::Bar = 1 ^^^^^^^^^^^^ ::Foo::Bar = 1 ^^^^^^^^^^^^^^
Represents assigning to an index.
foo[bar], = 1 ^^^^^^^^ begin rescue => foo[bar] ^^^^^^^^ end for foo[bar] in baz do end ^^^^^^^^
Represents reading a local variable. Note that this requires that a local variable of the same name has already been written to in the same scope, otherwise it is parsed as a method call.
foo ^^^
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
This node wraps a constant write to indicate that when the value is written, it should have its shareability state modified.
# shareable_constant_value: literal C = { a: 1 } ^^^^^^^^^^^^
Represents a set of statements contained within some scope.
foo; bar; baz ^^^^^^^^^^^^^