def foo(bar); end ^^^
foo rescue bar ^^^^^^^^^^^^^^
def foo(*bar); end ^^^^
def foo(*); end ^
When the content of a string node is split across multiple lines, the parser gem creates individual string nodes for each line the content is part of.
For %-arrays whitespace, the parser gem only considers whitespace before the newline.
foo => [bar] ^^^^^
foo.bar, = 1 ^^^^^^^
foo => bar => baz ^^^^^^^^^^
foo => [*, bar, *] ^^^^^^^^^^^
if foo .. bar; end ^^^^^^^^^^
def foo(...); end ^^^
super ^^^^^ super {} ^^^^^^^^
foo[bar], = 1 ^^^^^^^^
"foo #{bar}" ^^^^^^^^^^^^
:"foo #{bar}" ^^^^^^^^^^^^^
`foo #{bar}` ^^^^^^^^^^^^
foo, bar = baz ^^^^^^^^
def foo(bar = 1); end ^^^^^^^
If the bounds of a range node are empty parentheses, then they do not get replaced by their usual s(:nil), but instead are s(:begin).
def foo(bar); end ^^^
foo rescue bar ^^^^^^^^^^^^^^
def foo(*bar); end ^^^^ def foo(*); end ^