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

Method is_const_declaration

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

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

(&self, node: Node)

Source from the content-addressed store, hash-verified

1012
1013 /// cExtractor.isConst: any named `type_qualifier` child reading "const".
1014 fn is_const_declaration(&self, node: Node) -> bool {
1015 (0..node.named_child_count())
1016 .filter_map(|i| node.named_child(i))
1017 .any(|c| c.kind() == "type_qualifier" && self.text(c) == "const")
1018 }
1019
1020 /// `#1727`: C++ pure-virtual method declaration (`virtual int read(int key) = 0;`).
1021 /// 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