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