def plan.items

cswap-bend-cli@0.1.0.0 · json.bend:116

import cswap-bend-cli@0.1.0.0/json.bend as Json
import Base
import cswap-bend-cli@0.1.0.0/json/lex.bend as Lex
import cswap-bend-cli@0.1.0.0/json/scan.bend as Scan

116def plan.items(+toks: List<&2, Lex.Tok>) -> Plan:
117  match toks:
118    case Nil{}:
119      PRes{Fail{"unexpected end of input"}}
120    case Con{+h, +t}:
121      PItems{List.take(&2, Lex.Tok, Con{h, t}, Scan.scan(Con{h, t}, 0)), List.drop(&2, Lex.Tok, Con{h, t}, Scan.scan(Con{h, t}, 0))}

Uses (7)

Used by (2)