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

Method extract_enum_members

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

Source from the content-addressed store, hash-verified

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

Callers 1

extract_enumMethod · 0.45

Calls 2

textMethod · 0.45
create_nodeMethod · 0.45

Tested by

no test coverage detected