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

Method is_const_declaration

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

cExtractor.isConst: any named `type_qualifier` child reading "const".

(&self, node: Node)

Source from the content-addressed store, hash-verified

1022
1023 /// cExtractor.isConst: any named `type_qualifier` child reading "const".
1024 fn is_const_declaration(&self, node: Node) -> bool {
1025 (0..node.named_child_count())
1026 .filter_map(|i| node.named_child(i))
1027 .any(|c| c.kind() == "type_qualifier" && self.text(c) == "const")
1028 }
1029
1030 /// `#1727`: C++ pure-virtual method declaration (`virtual int read(int key) = 0;`).
1031 /// tree-sitter-cpp shapes these as `field_declaration` whose declarator unwraps

Callers 1

extract_variableMethod · 0.80

Calls 1

textMethod · 0.65

Tested by

no test coverage detected