def plan.obj_first
import cswap-bend-cli@0.1.0.0/json.bend as Jsonimport Base
import cswap-bend-cli@0.1.0.0/json/lex.bend as Lex
149def plan.obj_first(+toks: List<&2, Lex.Tok>) -> Plan:
150 match toks:
151 case Nil{}:
152 PRes{Done{JNil{}}}
153 case Con{Lex.TStr{k}, Con{Lex.TColon{}, +t}}:
154 plan.field(k, t)
155 case _:
156 PRes{Fail{"expected a string key and :"}}