(&self, func_node: &Node, source: &str)
| 384 | } |
| 385 | |
| 386 | fn extract_call_name(&self, func_node: &Node, source: &str) -> Option<String> { |
| 387 | match func_node.kind() { |
| 388 | "identifier" => { |
| 389 | let name = self.node_text(func_node, source); |
| 390 | if name.is_empty() { |
| 391 | None |
| 392 | } else { |
| 393 | Some(name) |
| 394 | } |
| 395 | } |
| 396 | "attribute" => { |
| 397 | // obj.method() — extract just "method" |
| 398 | func_node |
| 399 | .child_by_field_name("attribute") |
| 400 | .map(|f| self.node_text(&f, source)) |
| 401 | .filter(|s| !s.is_empty()) |
| 402 | } |
| 403 | _ => None, |
| 404 | } |
| 405 | } |
| 406 | } |
| 407 | |
| 408 | impl Default for PythonParser { |
no test coverage detected