def pop
import yaml-for-bend@0.1.1.0/parse.bend as Parseimport Base
151# Returns to the state on the stack.
152def pop(ps: Ps) -> Ps:
153 match ps:
154 case Ps{toks, state, states, tags, out}:
155 match states:
156 case Nil{}:
157 Ps{toks, SEnd{}, [], tags, out}
158 case Con{s, rest}:
159 Ps{toks, s, rest, tags, out}