def block
bend-toon-codec@0.1.0.0 · src/step.bend:60
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/frame.bend as F
60def block(+zero: Bool, +fields: List<&2, String>, +n: U32, +d: U32, +att: F.Att, +depth: U32) -> Result<&2, &2, String, Start>:
61 match zero fields:
62 case True{} _:
63 Done{SVal{J.JArr{J.JNil{}}}}
64 case False{} Nil{}:
65 Done{SOpen{F.FLst{depth, att, n, 0, J.JNil{}}}}
66 case False{} Con{f, t}:
67 Done{SOpen{F.FTab{depth, att, n, 0, d, Con{f, t}, J.JNil{}}}}