def check.go
bolt@1.27.0.0 · src/rules/correctness/hole.bend:36
import bolt@1.27.0.0/src/rules/correctness/hole.bend as Hole
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
import bolt@1.27.0.0/src/lazy/lazy.bend as Lazy
import bolt@1.27.0.0/src/rules/calls.bend as Calls
36def check.go(toks: List<&2, Lex.Tok>, +path: String) -> List<&2, F.Finding>:
37 match toks:
38 case Con{Lex.Tok{k, +q, +l, +c}, +rest}:
39 +more = check.go(rest, path)
40 Lazy.stop(List<&2, F.Finding>, Bool.not(Bool.and(Calls.kind.oper(k), Lazy.and_then(String.eq(q, "?"),
41 _u => check.todo(rest)))), more,
42 _u => F.Finding{path, l, c, check.width(rest, l, c), "hole", "This ?TODO hole is still unfilled."} <> more)
43 case Nil{}:
44 Nil{}