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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
//! Byte-level identity helpers shared by the classifiers and the metrics.
//!
//! Some questions a walk asks are not answerable from a node's kind: an
//! Elixir `def` and a `quote` are both `Call` nodes told apart only by
//! their target text, a Tcl `switch` is a plain `command` whose leading
//! word names the builtin, and Python's aliased `block` / `lambda` kinds
//! must be normalised at one site (grammar-dispatch §9 and §10). These
//! helpers read the bytes once so `Checker`, `Getter`, and every metric
//! agree on the answer.
//!
//! They live beside the classifiers rather than in a metric module
//! because the classifiers consult them: a `Checker` impl that imported
//! a helper *from* `metrics::cognitive` would make the parse layer depend
//! on the metric layer, the inversion #1376 exists to remove.
// Crate-private: the arm and guard predicates are read by this crate's
// `CaseArm` / `Guard` rows; the one the root's Tcl metrics also need is
// re-exported below rather than by widening the module (#1695).
pub
// Crate-private: the doc-comment predicates are read by this crate's
// `Checker` impls; only the run walk the LOC metric drives is
// re-exported below.
pub
// Crate-private: the per-tool doc-marker tests over a comment's bytes,
// split from the binding walk in `doc_comment` (#1649), which re-exports
// them so their callers keep one path.
pub
// Crate-private: Doxygen's attachment rule, read by the four C-family
// `Checker` impls only (#1613).
pub
// Crate-private: this dialect's only helper is a kind table the three
// classifiers in this crate share, and nothing outside names it.
pub
// Crate-private: YARD's scope and call-form rules, read by this crate's
// `Checker` impl and the Ruby role rows only (#1699).
pub
// Crate-private for the same reason as `irules` above: the braced-word
// slot rule is read by this crate's three classifiers and by nothing
// outside it. The one exception is re-exported below rather than by
// widening the module, which would publish the slot tables too.
pub
/// Re-exported because both dialects' metrics need it and the module
/// holding it is crate-private: iRules' nexits and ABC walkers resolve a
/// leading word themselves rather than through `tcl::tcl_command_name`,
/// so they normalise the `::` qualifier at their own call sites.
pub use strip_global_qualifier;
/// Re-exported because Tcl's cyclomatic and cognitive metrics locate a
/// brace-list `switch`'s arm list themselves — the one is the modified
/// count's container, the other a nesting structure — while the arm
/// predicates beside it stay crate-private (#1695).
pub use tcl_switch_arm_list;
/// Re-exported so the root crate's tests can count the sibling scans a
/// metric or `ops` walk runs on an erroring Tcl line: those walks lend
/// the `FoldCache` that memoises the scan, and the count is the only
/// thing that shows they did (#1686).
pub use argument_slot_scans;
/// Re-exported because the LOC metric bills documentation through them —
/// Go, Ruby and Lua runs by position, and the doc comments a bound
/// language's tool attaches — while the predicates beside them stay
/// crate-private.
pub use ;