isCppStackConstruction (#1035).
(&self, node: Node)
| 1386 | |
| 1387 | /// isCppStackConstruction (#1035). |
| 1388 | fn is_cpp_stack_construction(&self, node: Node) -> bool { |
| 1389 | let Some(type_node) = node.child_by_field_name("type") else { return false }; |
| 1390 | if !matches!( |
| 1391 | type_node.kind(), |
| 1392 | "type_identifier" | "template_type" | "qualified_identifier" |
| 1393 | ) { |
| 1394 | return false; |
| 1395 | } |
| 1396 | for i in 0..node.named_child_count() { |
| 1397 | let Some(child) = node.named_child(i) else { continue }; |
| 1398 | if child.kind() != "init_declarator" { |
| 1399 | continue; |
| 1400 | } |
| 1401 | if let Some(value) = child.child_by_field_name("value") { |
| 1402 | if matches!(value.kind(), "argument_list" | "initializer_list") { |
| 1403 | return true; |
| 1404 | } |
| 1405 | } |
| 1406 | } |
| 1407 | false |
| 1408 | } |
| 1409 | |
| 1410 | /// recordCppFnPtrBinding (tree-sitter.ts:5089). |
| 1411 | fn record_cpp_fn_ptr_binding(&mut self, local_name: &str, value: Option<Node>) { |
no outgoing calls
no test coverage detected