Table.top_has: def of bolt@1.27.0.0 Import: import bolt@1.27.0.0/src/rules/table.bend as Table Lines 24-35 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=24&end_line=35 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 # a top-level token of this text, not one nested in a group def top_has(nn: Tree.Node, +want: String) -> Bool: match nn: case Tree.NCons{Tree.Group{open, kids, close}, rest}: top_has(rest, want) case Tree.NCons{Tree.Leaf{Lex.Tok{k, +t, l, c}}, rest}: +more = top_has(rest, want) Bool.or(String.eq(t, want), more) case Tree.NCons{h, rest}: top_has(rest, want) case other: False{} Uses (6): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.or https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String.eq 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