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

Method capture_value_ref_scope

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

Source from the content-addressed store, hash-verified

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

Callers 1

create_nodeMethod · 0.45

Calls 3

utf16_lenFunction · 0.85
mapMethod · 0.80
pushMethod · 0.80

Tested by

no test coverage detected