Tree.fresh: def of bolt@1.27.0.0 Import: import bolt@1.27.0.0/src/syntax/tree.bend as Tree Lines 375-381 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=375&end_line=381 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 significant token that starts a line: at column 0 it closes every open # group (unless it is a bracket closing one of them); outside a group it opens # a statement def fresh(+stack: List<&2, Frame>, +tok: Lex.Tok) -> List<&2, Frame>: Lex.Tok{k, t, l, +c} = tok +cuts = Bool.and(Bool.and(in_group(stack), U32.is_eq(c, 0)), Nat.is_eq(depth_to(stack, t), 0n)) open_stmt(Lazy.stop(List<&2, Frame>, Bool.not(cuts), stack, _u => close_all(stack)), c) Uses (12): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.and https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.not https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.is_eq https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.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=close_all 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=in_group https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/syntax/tree.bend&name=open_stmt