1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
//! Zig-language backend: scope model, AbcSize, used-once/never-used.
//!
//! Metric spec (mirrors the Rust/Go backends' semantics where a direct
//! analogue exists):
//! - Units: every `function_declaration` with a body, plus
//! `test_declaration` and `comptime_declaration` blocks. Nested
//! methods inside `struct`/`union` containers are separate units.
//! - A: `const`/`var` declarations (+1 per declared name), assignment
//! targets (statement form aliased as `variable_declaration`, plus
//! `assignment_expression`), and payload bindings (`|x|`).
//! - B: calls (including `@builtin`), arithmetic/bitwise/shift binary
//! operators, unary operators, `try`.
//! - C: if / for / while (statement and expression forms), each switch
//! case, `catch`, comparisons, `and`/`or`/`orelse`.
//! - UsedOnce: single plain write, pure RHS, straight-line write, single
//! read after the write. Parameters and payloads are protocol.
//! - NeverUsed: written but never read, reported at the first write;
//! same exclusions. Root-scope container bindings stay unreported
//! (`include_root_scope: false`) because module/struct state may be
//! consumed elsewhere.
pub
use Tree;
pub use ;