def item.ent

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

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/prim.bend as P
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

148# A list item whose text parsed as an entry or as nothing special.
149def item.ent(+r: Result<&2, &2, String, E.Ent>, +t: String, +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>:
150  match r:
151    case Fail{e}:
152      Fail{e}
153    case Done{E.ENot{}}:
154      item.prim(P.parse(t), dp, a, n, c, xs, rest, root, bmin)
155    case Done{E.EArr{None{}, h}}:
156      item.arr(arr_start(F.AItem{}, (dp + 1 : U32), h, strict), dp, a, n, c, xs, rest, root, bmin)
157    case Done{ent}:
158      obj.ent(ent, (dp + 1 : U32), F.AItem{}, J.JNil{}, Con{F.FLst{dp, a, n, (c + 1 : U32), xs}, rest}, root, bmin, strict)

Uses (17)

Used by (1)