def walk

bolt@1.27.0.0 · src/rules/suspicious/empty.bend:353

import bolt@1.27.0.0/src/rules/suspicious/empty.bend as Empty
import Base
import bolt@1.27.0.0/src/finding.bend as F
import bolt@1.27.0.0/src/syntax/lex.bend as Lex

353# every kept test among the tokens, in order; skip says whether the tokens
354# so far sit in a law or a def that is a proof
355def walk(toks: List<&2, Lex.Tok>, +path: String, skip: Bool) -> List<&2, F.Finding>:
356  match toks:
357    case Nil{}:
358      Nil{}
359    case Con{Lex.Tok{+k, +t, l, c}, +rest}:
360      +sk = item(k, t, rest, skip)
361      hit(found(sk, k, rest), path, walk(rest, path, sk))

Uses (8)

Used by (2)