Table.lets: def of bolt@1.27.0.0 Import: import bolt@1.27.0.0/src/rules/table.bend as Table Lines 188-203 of bolt@1.27.0.0/src/rules/table.bend: https://jend.leeeet.dev/read.txt?path=bolt@1.27.0.0/src/rules/table.bend&start_line=188&end_line=203 import Base import bolt@1.27.0.0/src/syntax/lex.bend as Lex import bolt@1.27.0.0/src/syntax/tree.bend as Tree # the keys of every name use under the node whose binding in scope is a # table: a let reaches the statements after it and their bodies, not an # enclosing block or a sibling arm, and a later let of the name replaces it def lets(nn: Tree.Node, +live: List<&2, String>, acc: List<&2, String>) -> List<&2, String>: match nn: case Tree.NCons{Tree.Stmt{kind, +kids, body}, rest}: +next = rebind(bind_name(kids, False{}, False{}, ""), built(bind_rhs(kids)), live) lets(rest, next, lets(body, live, lets(kids, live, acc))) case Tree.NCons{Tree.Group{open, +kids, close}, rest}: lets(rest, live, lets(kids, live, acc)) case Tree.NCons{Tree.Leaf{Lex.Tok{Lex.TName{}, +t, +l, +c}}, rest}: lets(rest, live, use_at(t, l, c, live, acc)) case Tree.NCons{h, rest}: lets(rest, live, acc) case other: acc Uses (11): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List 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/table.bend&name=bind_name https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/rules/table.bend&name=bind_rhs https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/rules/table.bend&name=built https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/rules/table.bend&name=rebind https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/rules/table.bend&name=use_at https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/syntax/lex.bend&name=Tok https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/syntax/lex.bend&name=TokKind https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/syntax/tree.bend&name=Node