Tree.close_tok: def of bolt@1.27.0.0 Import: import bolt@1.27.0.0/src/syntax/tree.bend as Tree Lines 232-236 of bolt@1.27.0.0/src/syntax/tree.bend: https://jend.leeeet.dev/read.txt?path=bolt@1.27.0.0/src/syntax/tree.bend&start_line=232&end_line=236 import Base import bolt@1.27.0.0/src/lazy/lazy.bend as Lazy import bolt@1.27.0.0/src/syntax/lex.bend as Lex # a close bracket: to its match if it has one, else a stray leaf def close_tok(+stack: List<&2, Frame>, +close: Lex.Tok) -> List<&2, Frame>: Lex.Tok{k, +t, l, c} = close +n = depth_to(stack, t) Lazy.stop(List<&2, Frame>, Nat.is_eq(n, 0n), put(stack, Leaf{close}), _u => close_n(n, stack, Some{close})) Uses (10): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Maybe https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.is_eq https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/lazy/lazy.bend&name=stop 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=Frame 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=close_n https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/syntax/tree.bend&name=depth_to https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/syntax/tree.bend&name=put