def fresh
bolt@1.27.0.0 · src/syntax/tree.bend:375
import bolt@1.27.0.0/src/syntax/tree.bend as Tree
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
375
376
377
378def fresh(+stack: List<&2, Frame>, +tok: Lex.Tok) -> List<&2, Frame>:
379 Lex.Tok{k, t, l, +c} = tok
380 +cuts = Bool.and(Bool.and(in_group(stack), U32.is_eq(c, 0)), Nat.is_eq(depth_to(stack, t), 0n))
381 open_stmt(Lazy.stop(List<&2, Frame>, Bool.not(cuts), stack, _u => close_all(stack)), c)