module RubyLsp::Requests::Support::Common
def each_constant_path_part(node, &block)
`Baz`.
name. For example, for `Foo::Bar::Baz`, this method will invoke the block with `Foo`, then `Bar` and finally
Iterates over each part of a constant path, so that we can easily push response items for each section of the
def each_constant_path_part(node, &block) current = node #: Prism::Node? while current.is_a?(Prism::ConstantPathNode) block.call(current) current = current.parent end end