Empty.kept: def of bolt@1.27.0.0 Import: import bolt@1.27.0.0/src/rules/suspicious/empty.bend as Empty Lines 201-217 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=201&end_line=217 import Base import bolt@1.27.0.0/src/syntax/lex.bend as Lex # is x read among the tokens before the bracket that closes the group they # sit in? found carries whether the last token read was x, live whether that # bracket is still ahead def kept(toks: List<&2, Lex.Tok>, +xx: String, +dd: Nat, found: Bool, live: Bool) -> Bool: match toks: case Nil{}: found case Con{Lex.Tok{+k, +t, l, c}, rest}: match found: case True{}: True{} case False{}: match live: case False{}: False{} case True{}: kept(rest, xx, close.depth(k, dd), same(k, t, xx), Bool.not(close.here(k, dd))) Uses (9): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.not https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String 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=same https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/syntax/lex.bend&name=Tok