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

Method capture_value_ref_scope

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

Source from the content-addressed store, hash-verified

399 }
400
401 fn capture_value_ref_scope(&mut self, kind: &'static str, name: &str, row: u32, node: Node<'t>) {
402 let target_kind_ok = kind == "constant" || kind == "variable";
403 if target_kind_ok
404 && util::utf16_len(name) >= 3
405 && util::has_upper_or_underscore().is_match(name)
406 {
407 let parent_ok = self
408 .stack
409 .last()
410 .map(|s| matches!(s.kind, "file" | "class" | "module" | "struct" | "enum"))
411 .unwrap_or(false);
412 if parent_ok {
413 self.fs_values.insert(name.to_string(), row);
414 *self.fs_value_counts.entry(name.to_string()).or_insert(0) += 1;
415 }
416 }
417 if matches!(kind, "function" | "method" | "constant" | "variable") {
418 self.value_scopes.push(ValueScope { row, node, name: name.to_string() });
419 }
420 }
421
422 // --- hooks (languages/csharp.ts) --------------------------------------------
423 //

Callers 1

create_nodeMethod · 0.45

Calls 3

utf16_lenFunction · 0.85
mapMethod · 0.80
pushMethod · 0.80

Tested by

no test coverage detected