def close_one

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

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

181# the innermost open group, closed by close (None: never closed)
182def close_one(stack: List<&2, Frame>, close: Maybe<&2, Lex.Tok>) -> List<&2, Frame>:
183  match stack:
184    case Con{FGroup{open, kids}, rest}:
185      put(rest, Group{open, reverse(kids, NNil{}), close})
186    case other:
187      other

Uses (7)

Used by (1)