def lst.item

bend-toon-codec@0.1.0.0 · src/step.bend:160

import bend-toon-codec@0.1.0.0/src/step.bend as Step
import Base
import bend-toon-codec@0.1.0.0/src/json.bend as J
import bend-toon-codec@0.1.0.0/src/entry.bend as E
import bend-toon-codec@0.1.0.0/src/frame.bend as F

160def lst.item(+it: Item, +strict: Bool, +dp: U32, +a: F.Att, +n: U32, +c: U32, +xs: J.Json, +rest: List<&2, F.Fr>, +root: Maybe<&2, J.Json>, +bmin: U32) -> Result<&2, &2, String, F.St>:
161  match it:
162    case IBad{}:
163      Fail{"expected a list item"}
164    case IEmpty{}:
165      lst.push(J.JObj{J.JNil{}}, dp, a, n, c, xs, rest, root, bmin)
166    case IText{t}:
167      item.ent(E.parse(strict, t), t, strict, dp, a, n, c, xs, rest, root, bmin)

Uses (14)

Used by (1)