def foreign.ends

bolt@1.27.0.0 · src/rules/suspicious/unused.bend:43

import bolt@1.27.0.0/src/rules/suspicious/unused.bend as Unused
import Base
import bolt@1.27.0.0/src/syntax/tree.bend as Tree

43# does a statement's own chain end in a `:` leaf? last: whether the node
44# before the chain did
45def foreign.ends(kids: Tree.Node, last: Bool) -> Bool:
46  match kids:
47    case Tree.NCons{h, t}:
48      foreign.ends(t, colon(h))
49    case other:
50      last

Uses (3)

Used by (2)