Returns the node id for the given backtrace location.
begin raise rescue => e loc = e.backtrace_locations.first RubyVM::AbstractSyntaxTree.node_id_for_backtrace_location(loc) end # => 0
def foo(); bar(); end ^^
{ **foo } ^^^^^
def foo(&bar); end ^^^^
A block’s parameters.
foo in bar ^^^^^^^^^^
foo => ^(bar) ^^^^^^
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.
def foo(**); bar(**); end ^^ { **foo } ^^^^^
def foo(&bar); end ^^^^
A block’s parameters.
foo in bar ^^^^^^^^^^
foo => ^(bar) ^^^^^^
/foo #{bar}/ ^^^^^^^^^^^^
foo = 1 ^^^^^^^
foo, = bar ^^^