extractVariable — the python/ruby assignment branch (2709-2727): identifier or constant LHS mints a `variable` node (no isConst hook — `MAX = 3` is kind variable) at the ASSIGNMENT node's position, with the `= ` initializer signature.
(&mut self, node: Node<'t>)
| 709 | /// `MAX = 3` is kind variable) at the ASSIGNMENT node's position, with the |
| 710 | /// `= <first 100 utf16 units>` initializer signature. |
| 711 | fn extract_variable(&mut self, node: Node<'t>) { |
| 712 | let docstring = preceding_docstring(node, self.src); |
| 713 | let left = node.child_by_field_name("left").or_else(|| node.named_child(0)); |
| 714 | let right = node.child_by_field_name("right").or_else(|| node.named_child(1)); |
| 715 | let Some(left) = left else { return }; |
| 716 | if !matches!(left.kind(), "identifier" | "constant") { |
| 717 | return; |
| 718 | } |
| 719 | let name = self.text(left).to_string(); |
| 720 | let signature = right.map(|r| util::init_signature(self.text(r))); |
| 721 | self.create_node("variable", &name, node, Extra { docstring, signature, ..Extra::default() }); |
| 722 | } |
| 723 | |
| 724 | /// extractImport — every non-body `call` lands here (importTypes:['call']). |
| 725 | /// Hook (languages/ruby.ts:123): FIRST identifier named child must read |
no test coverage detected