def check.width
bolt@1.27.0.0 · src/rules/correctness/hole.bend:26
import bolt@1.27.0.0/src/rules/correctness/hole.bend as Hole
import Base
import bolt@1.27.0.0/src/syntax/lex.bend as Lex
import bolt@1.27.0.0/src/lazy/lazy.bend as Lazy
26
27
28def check.width(toks: List<&2, Lex.Tok>, +line: U32, +col: U32) -> U32:
29 match toks:
30 case Con{Lex.Tok{k, t, +l, +c}, rest}:
31 Lazy.stop(U32, Lex.significant(k), Bool.pick(U32, U32.is_eq(l, line), U32.add(U32.sub(c, col), 4), 1),
32 _u => check.width(rest, line, col))
33 case Nil{}:
34 1