Json.plan.val: def of cswap-bend-cli@0.1.0.0 Import: import cswap-bend-cli@0.1.0.0/json.bend as Json Lines 95-114 of cswap-bend-cli@0.1.0.0/json.bend: https://jend.leeeet.dev/read.txt?path=cswap-bend-cli@0.1.0.0/json.bend&start_line=95&end_line=114 import Base import cswap-bend-cli@0.1.0.0/json/lex.bend as Lex def plan.val(+toks: List<&2, Lex.Tok>) -> Plan: match toks: case Con{Lex.TNull{}, t}: PRes{only(t, JNull{})} case Con{Lex.TTrue{}, t}: PRes{only(t, JBool{True{}})} case Con{Lex.TFalse{}, t}: PRes{only(t, JBool{False{}})} case Con{Lex.TNum{x}, t}: PRes{only(t, JNum{x})} case Con{Lex.TStr{x}, t}: PRes{only(t, JStr{x})} case Con{Lex.TLBrack{}, +t}: PArr{t} case Con{Lex.TLBrace{}, +t}: PObj{t} case Nil{}: PRes{Fail{"unexpected end of input"}} case _: PRes{Fail{"unexpected token"}} Uses (7): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Result https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/json/lex.bend&name=Tok https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/json.bend&name=Json https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/json.bend&name=Plan https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/json.bend&name=only