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

Method extract_interface

codegraph-kernel/src/tsjs/extractors.rs:564–581  ·  view source on GitHub ↗
(&mut self, node: Node<'t>)

Source from the content-addressed store, hash-verified

562 // --- extractInterface / extractEnum / members -----------------------------------
563
564 pub(super) fn extract_interface(&mut self, node: Node<'t>) {
565 let name = self.extract_name(node);
566 let extra = Extra {
567 docstring: crate::docstring::preceding_docstring(node, self.src),
568 is_exported: Some(self.is_exported(node)),
569 ..Extra::default()
570 };
571 let Some(row) = self.create_node("interface", &name, node, extra) else {
572 return;
573 };
574 self.extract_inheritance(node, row);
575 self.stack.push(Scope { row, kind: "interface", name });
576 let body = body_of(node).unwrap_or(node);
577 for c in body.named_children(&mut body.walk()) {
578 self.visit_node(c);
579 }
580 self.stack.pop();
581 }
582
583 pub(super) fn extract_enum(&mut self, node: Node<'t>) {
584 let Some(body) = body_of(node) else { return };

Callers 2

visit_nodeMethod · 0.45

Calls 9

preceding_docstringFunction · 0.85
body_ofFunction · 0.85
pushMethod · 0.80
extract_nameMethod · 0.45
is_exportedMethod · 0.45
create_nodeMethod · 0.45
extract_inheritanceMethod · 0.45
walkMethod · 0.45
visit_nodeMethod · 0.45

Tested by

no test coverage detected