def put

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

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

169# a finished node lands in the frame below
170def put(stack: List<&2, Frame>, nn: Node) -> List<&2, Frame>:
171  match stack:
172    case Nil{}:
173      Nil{}
174    case Con{FGroup{open, kids}, rest}:
175      FGroup{open, NCons{nn, kids}} <> rest
176    case Con{FStmt{indent, kids, body}, rest}:
177      FStmt{indent, NCons{nn, kids}, body} <> rest
178    case Con{FRoot{body}, rest}:
179      FRoot{NCons{nn, body}} <> rest

Uses (3)

Used by (3)