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