cExtractor.isConst: any named `type_qualifier` child reading "const".
(&self, node: Node)
| 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 |