Empty.close.list: def of bolt@1.27.0.0 Import: import bolt@1.27.0.0/src/rules/suspicious/empty.bend as Empty Lines 162-176 of bolt@1.27.0.0/src/rules/suspicious/empty.bend: https://jend.leeeet.dev/read.txt?path=bolt@1.27.0.0/src/rules/suspicious/empty.bend&start_line=162&end_line=176 import Base import bolt@1.27.0.0/src/syntax/lex.bend as Lex # a List.length's arguments, scanned to the `)` that closes them: the name # they end in and the tokens after that `)`; none when they end otherwise # or run out. done carries whether the last token read was that `)`. def close.list(toks: List<&2, Lex.Tok>, +dd: Nat, +ll: Last, done: Bool, got: Maybe<&2, Taken>) -> Maybe<&2, Taken>: match toks: case Nil{}: got case Con{Lex.Tok{+k, +t, l, c}, +rest}: match done: case True{}: got case False{}: +here = close.here(k, dd) close.list(rest, close.depth(k, dd), last.step(k, t, ll), here, Bool.pick(Maybe<&2, Taken>, here, last.name(ll, rest), None{})) Uses (12): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool 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=Maybe https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/rules/suspicious/empty.bend&name=Last https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/rules/suspicious/empty.bend&name=Taken https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/rules/suspicious/empty.bend&name=close.depth https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/rules/suspicious/empty.bend&name=close.here https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/rules/suspicious/empty.bend&name=last.name https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/rules/suspicious/empty.bend&name=last.step https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/syntax/lex.bend&name=Tok