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

Method extract_enum_members

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

Source from the content-addressed store, hash-verified

935 }
936
937 fn extract_enum_members(&mut self, node: Node<'t>) {
938 // name field → null (zero fields) → the identifier-children scan: one
939 // enum_member per direct simple_identifier, positioned AT the
940 // identifier. Entry value_arguments and entry class_bodies (override
941 // methods!) are never visited — invisible (quirk).
942 for i in 0..node.named_child_count() {
943 let Some(child) = node.named_child(i) else { continue };
944 if matches!(child.kind(), "simple_identifier" | "identifier" | "property_identifier") {
945 let name = self.text(child).to_string();
946 self.create_node("enum_member", &name, child, Extra::default());
947 }
948 }
949 }
950
951 /// extractTypeAlias — plain node; the alias-value ref walk reads the
952 /// `value` FIELD → null (zero fields) → NO refs. Returns false →

Callers 1

extract_enumMethod · 0.45

Calls 2

textMethod · 0.65
create_nodeMethod · 0.45

Tested by

no test coverage detected