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

Method extract_class

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

Source from the content-addressed store, hash-verified

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

Callers 2

visit_nodeMethod · 0.45

Calls 8

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

Tested by

no test coverage detected