def Sp.step

bendtorch-load@1.3.0.0 · main.bend:390

import bendtorch-load@1.3.0.0/main.bend as BendtorchLoad
import Base

390def Sp.step(t: Tok, ps: Ps) -> Ps:
391  match t ps:
392    case TStr{s} Ps{+d, +c, p, n, +f, dt, sh, of, ns, rs, bad}:
393      Sp.str(c, Bool.and(U32.is_eq(d, 2), String.eq(f, "dtype")), Ps{d, c, p, n, f, dt, sh, of, ns, rs, bad}, s)
394    case TNum{v} Ps{+d, c, p, n, f, dt, sh, of, ns, rs, bad}:
395      Sp.num(U32.is_eq(d, 3), v, Ps{d, c, p, n, f, dt, sh, of, ns, rs, bad})
396    case TPun{+k} Ps{+d, c, p, n, +f, dt, sh, of, ns, rs, bad}:
397      Sp.pun(U32.is_eq(k, 58), U32.is_eq(k, 123), U32.is_eq(k, 125), U32.is_eq(k, 91), U32.is_eq(k, 93), d, f, Ps{d, c, p, n, f, dt, sh, of, ns, rs, bad})
398    case TBad{k} Ps{d, c, p, n, f, dt, sh, of, ns, rs, bad}:
399      Ps{d, c, p, n, f, dt, sh, of, ns, rs, (bad + 1 : U32)}

Uses (10)

Used by (1)