def check.lead

bolt@1.27.0.0 · src/rules/style/doc.bend:51

import bolt@1.27.0.0/src/rules/style/doc.bend as Doc
import Base
import bolt@1.27.0.0/src/lazy/lazy.bend as Lazy

51# reading lines 0 to nn - 1 down from ok: does a comment block end right
52# above line nn, past a run of attribute lines?
53def check.lead(lines: List<&2, String>, +nn: U32, +ok: Bool) -> Bool:
54  match lines:
55    case Nil{}:
56      Bool.and(U32.is_eq(nn, 0), ok)
57    case Con{hh, tt}:
58      Lazy.stop(Bool, U32.is_eq(nn, 0), ok, _u => check.lead(tt, U32.sub(nn, 1), check.after(hh, ok)))

Uses (9)

Used by (1)