Decimal.Decimal.read.step: def of bend-kit-bignum@0.1.0.0 Import: import bend-kit-bignum@0.1.0.0/decimal.bend as Decimal Lines 314-380 of bend-kit-bignum@0.1.0.0/decimal.bend: https://jend.leeeet.dev/read.txt?path=bend-kit-bignum@0.1.0.0/decimal.bend&start_line=314&end_line=380 import Base def Decimal.read.step(st: Scan, cl: Class) -> Scan: match st: case Begin{}: match cl: case Digit{c}: Whole{False{}, Decimal.read.push(c, SNil{})} case Minus{}: Signed{True{}} case Plus{}: Signed{False{}} case _: Bad{} case Signed{neg}: match cl: case Digit{c}: Whole{neg, Decimal.read.push(c, SNil{})} case _: Bad{} case Whole{neg, ds}: match cl: case Digit{c}: Whole{neg, Decimal.read.push(c, ds)} case Point{}: Dot{neg, ds} case Expo{}: Exp{neg, ds, 0n} case _: Bad{} case Dot{neg, ds}: match cl: case Digit{c}: Frac{neg, Decimal.read.push(c, ds), 1n} case _: Bad{} case Frac{neg, ds, sc}: match cl: case Digit{c}: Frac{neg, Decimal.read.push(c, ds), 1n+sc} case Expo{}: Exp{neg, ds, sc} case _: Bad{} case Exp{neg, ds, sc}: match cl: case Digit{c}: ExpDigits{neg, ds, sc, False{}, U32.sub(c, 48)} case Minus{}: ExpSigned{neg, ds, sc, True{}} case Plus{}: ExpSigned{neg, ds, sc, False{}} case _: Bad{} case ExpSigned{neg, ds, sc, eneg}: match cl: case Digit{c}: ExpDigits{neg, ds, sc, eneg, U32.sub(c, 48)} case _: Bad{} case ExpDigits{neg, ds, sc, eneg, e}: match cl: case Digit{c}: +x = (e * 10 + c - 48 : U32) Decimal.read.exp(U32.is_gt(x, 100000), neg, ds, sc, eneg, x) case _: Bad{} case _: Bad{} Uses (12): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.add https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.is_gt https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.mul https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.sub https://jend.leeeet.dev/definition.txt?path=bend-kit-bignum@0.1.0.0/decimal.bend&name=Class https://jend.leeeet.dev/definition.txt?path=bend-kit-bignum@0.1.0.0/decimal.bend&name=Decimal.read.exp https://jend.leeeet.dev/definition.txt?path=bend-kit-bignum@0.1.0.0/decimal.bend&name=Decimal.read.push https://jend.leeeet.dev/definition.txt?path=bend-kit-bignum@0.1.0.0/decimal.bend&name=Scan