def end_stmt
import bolt@1.27.0.0/src/syntax/tree.bend as Treeimport 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