def check.go

bolt@1.27.0.0 · src/rules/correctness/twice.bend:77

import bolt@1.27.0.0/src/rules/correctness/twice.bend as Twice
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

77def check.go(root: Tree.Node, +path: String) -> List<&2, F.Finding>:
78  match root:
79    case Tree.NCons{Tree.Stmt{Tree.SDef{}, +kids, body}, rest}:
80      List.append(&2, F.Finding, check.def(Bind.declared(kids), body, path), check.go(rest, path))
81    case Tree.NCons{h, rest}:
82      check.go(rest, path)
83    case other:
84      Nil{}

Uses (8)

Used by (1)