def check.go

bolt@1.27.0.0 · src/rules/pedantic/foreign.bend:75

import bolt@1.27.0.0/src/rules/pedantic/foreign.bend as Foreign
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/syntax/bind.bend as Bind

75def check.go(root: Tree.Node, +native: Bool, +path: String) -> List<&2, F.Finding>:
76  match root:
77    case Tree.NCons{Tree.Stmt{Tree.SDef{}, +kids, body}, rest}:
78      at(lack(lanes(body), native, name.of(Bind.declared(kids))), Tree.line(kids), Tree.col(kids), path,
79        check.go(rest, native, path))
80    case Tree.NCons{h, rest}:
81      check.go(rest, native, path)
82    case other:
83      Nil{}

Uses (13)

Used by (1)