def on_stmt

bolt@1.27.0.0 · src/rules/perf/chars.bend:53

import bolt@1.27.0.0/src/rules/perf/chars.bend as Chars
import Base
import bolt@1.27.0.0/src/finding.bend as F
import bolt@1.27.0.0/src/syntax/tree.bend as Tree
import bolt@1.27.0.0/src/lazy/lazy.bend as Lazy
import bolt@1.27.0.0/src/rules/tokens.bend as T

53# a statement: a match is tallied
54def on_stmt(+kids: Tree.Node, +body: Tree.Node, +path: String) -> List<&2, F.Finding>:
55  +hit = T.keyword(kids, "match")
56  Lazy.stop(List<&2, F.Finding>, Bool.not(hit), [],
57    _u => report(tally(body, 0), path, Tree.line(kids), Tree.col(kids)))

Uses (11)

Used by (1)