Space.widths: def of bolt@1.27.0.0 Import: import bolt@1.27.0.0/src/rules/style/space.bend as Space Lines 51-60 of bolt@1.27.0.0/src/rules/style/space.bend: https://jend.leeeet.dev/read.txt?path=bolt@1.27.0.0/src/rules/style/space.bend&start_line=51&end_line=60 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 # one pass over the tokens: a newline closes a line's width def widths(toks: List<&2, Lex.Tok>, +path: String, +nn: U32, +acc: U32) -> List<&2, F.Finding>: match toks: case Nil{}: too_wide(acc, path, nn, []) case Con{Lex.Tok{Lex.TNewline{}, t, l, c}, rest}: too_wide(acc, path, nn, widths(rest, path, (nn + 1 : U32), 0)) case Con{Lex.Tok{k, t, l, c}, rest}: +w = width_of(k, t) widths(rest, path, nn, (acc + w : U32)) Uses (9): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.add https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/finding.bend&name=Finding https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/rules/style/space.bend&name=too_wide https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/rules/style/space.bend&name=width_of https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/syntax/lex.bend&name=Tok https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/syntax/lex.bend&name=TokKind