Pick.search.text: def of bolt@1.27.0.0 Import: import bolt@1.27.0.0/src/rules/correctness/pick.bend as Pick Lines 151-167 of bolt@1.27.0.0/src/rules/correctness/pick.bend: https://jend.leeeet.dev/read.txt?path=bolt@1.27.0.0/src/rules/correctness/pick.bend&start_line=151&end_line=167 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 node's tokens, each then a space (a group's open, not its close) def search.text(nn: Tree.Node) -> String: match nn: case Tree.Leaf{Lex.Tok{_k, t, _l, _c}}: t ++ " " case Tree.Group{Lex.Tok{_k, o, _l, _c}, kids, _cl}: o ++ " " ++ search.text(kids) case Tree.Stmt{_k, kids, body}: +a = search.text(kids) +b = search.text(body) a ++ b case Tree.NCons{h, t}: +a = search.text(h) +b = search.text(t) a ++ b case Tree.NNil{}: "" Uses (4): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String.append 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/tree.bend&name=Node