Skip to main content

Module declarations

Module declarations 

Source

Structs§

RubyNamePath
RubyVisitor
Walks a Ruby file and emits its declarations into parsed.

Enums§

RubyFieldScope

Functions§

collect_ruby_identifiers
extract_name_path
extract_name_segments
Extracts the namespace segments from a class/module name node by walking the AST (not by string-splitting ::). A plain (constant) yields one segment; a (scope_resolution) like A::B walks its scope and name fields to yield ["A", "B"].
is_descendable_container
Container node kinds the visitor recurses through to find conditionally declared symbols (e.g. a def inside an if). Excludes method/ singleton_method, whose bodies are treated as leaves.
parse_ruby_tree
Parses Ruby source into a tree-sitter tree, or None if parsing fails.
qualified_internal_name
Renders a constant/scope_resolution reference node into the internal $-joined name used as a CodeUnit key (e.g. A::B -> A$B).
ruby_field_scope_for_assignment_left
ruby_field_short_name
ruby_node_text
Reads the source text backing a tree-sitter node.
ruby_variable_field_name