def num.go

bend-net-json@0.3.0.0 · json.bend:94

import bend-net-json@0.3.0.0/json.bend as Json
import Base

94def num.go(t: String, +c: U32, +st: U32, acc: String, stop: Bool) -> Maybe<&2, Next>:
95  match t:
96    case SNil{}:
97      match stop:
98        case True{}:
99          num.end(st, acc, SCon{Chr{c}, SNil{}})
100        case False{}:
101          num.end(num.trans(st, c), SCon{Chr{c}, acc}, SNil{})
102    case SCon{Chr{+d}, u}:
103      match stop:
104        case True{}:
105          num.end(st, acc, SCon{Chr{c}, SCon{Chr{d}, u}})
106        case False{}:
107          +n = num.trans(st, c)
108          num.go(u, d, n, SCon{Chr{c}, acc}, U32.is_eq(num.trans(n, d), 99))

Uses (9)

Used by (1)