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