def end_stmt

bolt@1.27.0.0 · src/syntax/tree.bend:327

import bolt@1.27.0.0/src/syntax/tree.bend as Tree
import Base

327# the innermost open statement is finished and lands in its parent
328def end_stmt(stack: List<&2, Frame>) -> List<&2, Frame>:
329  match stack:
330    case Con{FStmt{indent, kids, body}, rest}:
331      +ks = reverse(kids, NNil{})
332      put_stmt(rest, Stmt{classify(ks), ks, reverse(body, NNil{})})
333    case other:
334      other

Uses (6)

Used by (1)