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

Method capture_value_ref_scope

codegraph-kernel/src/java.rs:383–402  ·  view source on GitHub ↗
(&mut self, kind: &'static str, name: &str, row: u32, node: Node<'t>)

Source from the content-addressed store, hash-verified

381 }
382
383 fn capture_value_ref_scope(&mut self, kind: &'static str, name: &str, row: u32, node: Node<'t>) {
384 let target_kind_ok = kind == "constant" || kind == "variable";
385 if target_kind_ok
386 && util::utf16_len(name) >= 3
387 && util::has_upper_or_underscore().is_match(name)
388 {
389 let parent_ok = self
390 .stack
391 .last()
392 .map(|s| matches!(s.kind, "file" | "class" | "module" | "struct" | "enum"))
393 .unwrap_or(false);
394 if parent_ok {
395 self.fs_values.insert(name.to_string(), row);
396 *self.fs_value_counts.entry(name.to_string()).or_insert(0) += 1;
397 }
398 }
399 if matches!(kind, "function" | "method" | "constant" | "variable") {
400 self.value_scopes.push(ValueScope { row, node, name: name.to_string() });
401 }
402 }
403
404 // --- modifiers / hooks (languages/java.ts) -----------------------------------
405

Callers 1

create_nodeMethod · 0.45

Calls 3

utf16_lenFunction · 0.85
mapMethod · 0.80
pushMethod · 0.80

Tested by

no test coverage detected