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

Method extract_interface

codegraph-kernel/src/swift.rs:985–1002  ·  view source on GitHub ↗
(&mut self, node: Node<'t>)

Source from the content-addressed store, hash-verified

983 }
984
985 fn extract_interface(&mut self, node: Node<'t>) {
986 stack_guard!();
987 let name = self.extract_name(node);
988 let extra = Extra {
989 docstring: preceding_docstring(node, self.src),
990 ..Extra::default() // NO visibility, NO decorates
991 };
992 let Some(row) = self.create_node("interface", &name, node, extra) else { return };
993 self.extract_inheritance(node, row);
994 self.stack.push(Scope { row, kind: "interface", name });
995 let body = node.child_by_field_name("body").unwrap_or(node);
996 for i in 0..body.named_child_count() {
997 if let Some(c) = body.named_child(i) {
998 self.visit_node(c);
999 }
1000 }
1001 self.stack.pop();
1002 }
1003
1004 /// extractTypeAlias (:2890) — plain type_alias node + value-subtree type
1005 /// refs (`typealias Handler = (Data) -> Void` → refs Data + Void…Void is

Callers 2

visit_nodeMethod · 0.45

Calls 6

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

Tested by

no test coverage detected