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

Method is_const_declaration

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

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

(&self, node: Node)

Source from the content-addressed store, hash-verified

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