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
//! Go-language backend: scope model, AbcSize, used-once/never-used.
//!
//! Metric spec (mirrors the Rust backend's semantics where a direct
//! analogue exists):
//! - Units: every named `function_declaration` and `method_declaration`.
//! Function literals roll into the enclosing unit (mirrors Ruby blocks /
//! Rust closures) -- they are NOT unit boundaries here.
//! - A: short var declarations and assignments (+1 per written identifier
//! target), var specs, inc/dec statements.
//! - B: calls, arithmetic/bitwise/shift binary operators, unary operators
//! (including `<-` receives and pointer indirections).
//! - C: if / for (all forms), each switch/select/type-switch case,
//! comparisons and `&&`/`||`.
//! - UsedOnce: single plain write, pure RHS, straight-line write, single
//! read after the write. Parameters, results, blank `_` and
//! underscore-free-only rule apply; struct fields (`field_identifier`)
//! are never variable reads.
//! - NeverUsed: written but never read, reported at the first write;
//! same exclusions.
pub
use Tree;
pub use ;