getRootModule (languages/rust.ts:124).
(&self, n: Node)
| 710 | |
| 711 | /// getRootModule (languages/rust.ts:124). |
| 712 | fn root_module(&self, n: Node) -> String { |
| 713 | stack_guard!(); |
| 714 | let Some(first) = n.named_child(0) else { |
| 715 | return self.text(n).to_string(); |
| 716 | }; |
| 717 | match first.kind() { |
| 718 | "identifier" | "crate" | "super" | "self" => self.text(first).to_string(), |
| 719 | "scoped_identifier" => self.root_module(first), |
| 720 | _ => self.text(first).to_string(), |
| 721 | } |
| 722 | } |
| 723 | |
| 724 | /// emitRustUseBindingRefs (tree-sitter.ts:3451) — one FULL-path `imports` |
| 725 | /// ref per binding; `Path as Alias` links the source path; leaves that are |