Foo, = bar ^^^
Foo::Bar ^^^^^^^^
-> { _1 + _2 } ^^^^^^^^^^^^^^
Visit a destructured positional parameter node.
A shareable constant.
Ripper
gives back the escaped string content but strips out the common leading whitespace. Prism
gives back the unescaped string content and a location for the escaped string content. Unfortunately these don’t work well together, so here we need to re-derive the common leading whitespace.
@@foo &&= bar
becomes
@@foo && @@foo = bar
@@foo ||= bar
becomes
defined?(@@foo) ? @@foo : @@foo = bar
@@foo += bar
becomes
@@foo = @@foo + bar
$foo ||= bar
becomes
defined?($foo) ? $foo : $foo = bar
$foo += bar
becomes
$foo = $foo + bar
@foo &&= bar
becomes
@foo && @foo = bar
@foo ||= bar
becomes
@foo || @foo = bar
@foo += bar
becomes
@foo = @foo + bar