MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / is_cpp_stack_construction

Method is_cpp_stack_construction

codegraph-kernel/src/ccpp/mod.rs:1404–1424  ·  view source on GitHub ↗

isCppStackConstruction (#1035).

(&self, node: Node)

Source from the content-addressed store, hash-verified

1402
1403 /// isCppStackConstruction (#1035).
1404 fn is_cpp_stack_construction(&self, node: Node) -> bool {
1405 let Some(type_node) = node.child_by_field_name("type") else { return false };
1406 if !matches!(
1407 type_node.kind(),
1408 "type_identifier" | "template_type" | "qualified_identifier"
1409 ) {
1410 return false;
1411 }
1412 for i in 0..node.named_child_count() {
1413 let Some(child) = node.named_child(i) else { continue };
1414 if child.kind() != "init_declarator" {
1415 continue;
1416 }
1417 if let Some(value) = child.child_by_field_name("value") {
1418 if matches!(value.kind(), "argument_list" | "initializer_list") {
1419 return true;
1420 }
1421 }
1422 }
1423 false
1424 }
1425
1426 /// recordCppFnPtrBinding (tree-sitter.ts:5089).
1427 fn record_cpp_fn_ptr_binding(&mut self, local_name: &str, value: Option<Node>) {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected