Rewalk.binds: def of bolt@1.27.0.0 Import: import bolt@1.27.0.0/src/rules/pedantic/rewalk.bend as Rewalk Lines 521-534 of bolt@1.27.0.0/src/rules/pedantic/rewalk.bend: https://jend.leeeet.dev/read.txt?path=bolt@1.27.0.0/src/rules/pedantic/rewalk.bend&start_line=521&end_line=534 import Base import bolt@1.27.0.0/src/syntax/tree.bend as Tree # the lets of one straight piece; a case arm is not part of it def binds(nn: Tree.Node, +acc: List<&2, Bind>) -> List<&2, Bind>: match nn: case Tree.NCons{Tree.Stmt{Tree.SCase{}, kids, body}, rest}: binds(rest, acc) case Tree.NCons{Tree.Stmt{Tree.SLet{}, +kids, +body}, rest}: +here = bind_at(lhs_names(kids, []), last_pos(Tree.leaves.go(body, Tree.leaves.go(kids, []))), acc) binds(rest, binds(body, here)) case Tree.NCons{Tree.Stmt{kind, kids, +body}, rest}: binds(rest, binds(body, acc)) case Tree.NCons{h, rest}: binds(rest, acc) case other: acc Uses (8): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/rules/pedantic/rewalk.bend&name=Bind https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/rules/pedantic/rewalk.bend&name=bind_at https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/rules/pedantic/rewalk.bend&name=last_pos https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/rules/pedantic/rewalk.bend&name=lhs_names https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/syntax/tree.bend&name=Node https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/syntax/tree.bend&name=StmtKind https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/syntax/tree.bend&name=leaves.go