Format.rows.line: def of bend-lint-rules@0.2.0.0 Import: import bend-lint-rules@0.2.0.0/layout/format.bend as Format Lines 2241-2264 of bend-lint-rules@0.2.0.0/layout/format.bend: https://jend.leeeet.dev/read.txt?path=bend-lint-rules@0.2.0.0/layout/format.bend&start_line=2241&end_line=2264 import Base def rows.line(+head: Token, +record: List<&2, Tree>, +set: Settings, r: Rows) -> Rows: match set r: case Settings{+tab, width, newline} Rows{levels, +blank, unsafe, prior, rows}: +col = Token.col(head) +levels2 = indented(levels, col) +declaration = is_declaration(Token.sym(head)) +comment = is_comment(head) gap = Bool.pick( Bool, U32.is_zero(col), (declaration && Bool.not(prior) && Bool.not(unsafe)) || (comment && blank), blank ) doc = record_doc(is_import(Token.sym(head)), head, record, declaration, tab, col) fuel = U32.to_nat( (fuel_per_point() * ((record_end(head, record) - Token.beg(head): U32) + 1): U32) ) Rows{ levels2, False{}, is_unsafe(is_sym(Token.sym(head), At{}), record), comment, Con{print(doc, width, (depth(levels2) * tab: U32), newline, fuel), gapped(gap, rows)} } Uses (32): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.and https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.not https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.or https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.pick https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List 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=Base/base.bend&name=U32.is_zero https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.mul https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.sub https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.to_nat https://jend.leeeet.dev/definition.txt?path=bend-lint-rules@0.2.0.0/layout/format.bend&name=Rows https://jend.leeeet.dev/definition.txt?path=bend-lint-rules@0.2.0.0/layout/format.bend&name=Settings https://jend.leeeet.dev/definition.txt?path=bend-lint-rules@0.2.0.0/layout/format.bend&name=Sym https://jend.leeeet.dev/definition.txt?path=bend-lint-rules@0.2.0.0/layout/format.bend&name=Token https://jend.leeeet.dev/definition.txt?path=bend-lint-rules@0.2.0.0/layout/format.bend&name=Token.beg https://jend.leeeet.dev/definition.txt?path=bend-lint-rules@0.2.0.0/layout/format.bend&name=Token.col https://jend.leeeet.dev/definition.txt?path=bend-lint-rules@0.2.0.0/layout/format.bend&name=Token.sym https://jend.leeeet.dev/definition.txt?path=bend-lint-rules@0.2.0.0/layout/format.bend&name=Tree https://jend.leeeet.dev/definition.txt?path=bend-lint-rules@0.2.0.0/layout/format.bend&name=depth https://jend.leeeet.dev/definition.txt?path=bend-lint-rules@0.2.0.0/layout/format.bend&name=fuel_per_point https://jend.leeeet.dev/definition.txt?path=bend-lint-rules@0.2.0.0/layout/format.bend&name=gapped https://jend.leeeet.dev/definition.txt?path=bend-lint-rules@0.2.0.0/layout/format.bend&name=indented https://jend.leeeet.dev/definition.txt?path=bend-lint-rules@0.2.0.0/layout/format.bend&name=is_comment https://jend.leeeet.dev/definition.txt?path=bend-lint-rules@0.2.0.0/layout/format.bend&name=is_declaration https://jend.leeeet.dev/definition.txt?path=bend-lint-rules@0.2.0.0/layout/format.bend&name=is_import https://jend.leeeet.dev/definition.txt?path=bend-lint-rules@0.2.0.0/layout/format.bend&name=is_sym https://jend.leeeet.dev/definition.txt?path=bend-lint-rules@0.2.0.0/layout/format.bend&name=is_unsafe https://jend.leeeet.dev/definition.txt?path=bend-lint-rules@0.2.0.0/layout/format.bend&name=print https://jend.leeeet.dev/definition.txt?path=bend-lint-rules@0.2.0.0/layout/format.bend&name=record_doc https://jend.leeeet.dev/definition.txt?path=bend-lint-rules@0.2.0.0/layout/format.bend&name=record_end