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

Method extract_class

codegraph-kernel/src/php.rs:725–745  ·  view source on GitHub ↗
(&mut self, node: Node<'t>, kind: &'static str)

Source from the content-addressed store, hash-verified

723 }
724
725 fn extract_class(&mut self, node: Node<'t>, kind: &'static str) {
726 stack_guard!();
727 let name = self.extract_name(node);
728 let extra = Extra {
729 docstring: preceding_docstring(node, self.src),
730 visibility: Some(self.visibility_of(node)),
731 ..Extra::default()
732 };
733 let Some(row) = self.create_node(kind, &name, node, extra) else { return };
734 self.extract_inheritance(node, row);
735 // primary-ctor refs: csharp-only (needs a parameter_list child type);
736 // decorators: none.
737 self.stack.push(Scope { row, kind, name });
738 let body = node.child_by_field_name("body").unwrap_or(node);
739 for i in 0..body.named_child_count() {
740 if let Some(c) = body.named_child(i) {
741 self.visit_node(c);
742 }
743 }
744 self.stack.pop();
745 }
746
747 fn extract_interface(&mut self, node: Node<'t>) {
748 stack_guard!();

Callers 2

visit_nodeMethod · 0.45

Calls 7

preceding_docstringFunction · 0.85
pushMethod · 0.80
extract_nameMethod · 0.45
visibility_ofMethod · 0.45
create_nodeMethod · 0.45
extract_inheritanceMethod · 0.45
visit_nodeMethod · 0.45

Tested by

no test coverage detected