(&mut self, kind: &'static str, name: &str, row: u32, node: Node<'t>)
| 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 | // |
no test coverage detected