new ClassName, extends ClassName, implements ClassName, type hints,
and $x instanceof ClassName. Does NOT match free function calls or
method names with the same spelling.
Collect all $var_name spans within the innermost function/method scope
that contains byte_off. If byte_off is not inside any function, collects
from the top-level stmts (respecting scope boundaries). Also collects the
parameter declaration span when the variable is a parameter of the scope.
Collect spans where name is called as a free function (not a method).
Only matches name(...) calls where the callee is a bare identifier, not
$obj->name() or Class::name().
Collect all spans where $var_name (the variable name WITHOUT $) appears as an
ExprKind::Variable within stmts. Stops at nested function/closure/arrow-function
scope boundaries so that $x in an inner function is not conflated with $x in
the outer function.