def Num.step
bend-kube-runtime@0.2.0.0 · src/yaml.bend:303
import bend-kube-runtime@0.2.0.0/src/yaml.bend as Yaml
import Base
303def Num.step(st: Num, +c: Char, dig: Bool, dot: Bool, ex: Bool, sg: Bool) -> Num:
304 match st dig dot ex sg:
305 case NStart{} True{} d e s:
306 NInt{False{}, [c]}
307 case NStart{} False{} True{} e s:
308 NDot0{False{}}
309 case NStart{} False{} False{} e True{}:
310 NSign{Char.is_eq(c, '-')}
311 case NStart{} False{} False{} e False{}:
312 NBad{}
313 case NSign{n} True{} d e s:
314 NInt{n, [c]}
315 case NSign{n} False{} True{} e s:
316 NDot0{n}
317 case NSign{n} False{} False{} e s:
318 NBad{}
319 case NInt{n, i} True{} d e s:
320 NInt{n, Con{c, i}}
321 case NInt{n, i} False{} True{} e s:
322 NFrac{n, i, Nil{}}
323 case NInt{n, i} False{} False{} True{} s:
324 NExp0{n, i, Nil{}, [c]}
325 case NInt{n, i} False{} False{} False{} s:
326 NBad{}
327 case NDot0{n} True{} d e s:
328 NFrac{n, Nil{}, [c]}
329 case NDot0{n} False{} d e s:
330 NBad{}
331 case NFrac{n, i, f} True{} d e s:
332 NFrac{n, i, Con{c, f}}
333 case NFrac{n, i, f} False{} d True{} s:
334 NExp0{n, i, f, [c]}
335 case NFrac{n, i, f} False{} d False{} s:
336 NBad{}
337 case NExp0{n, i, f, x} True{} d e s:
338 NExpD{n, i, f, Con{c, x}}
339 case NExp0{n, i, f, x} False{} d e True{}:
340 NExp1{n, i, f, Con{c, x}}
341 case NExp0{n, i, f, x} False{} d e False{}:
342 NBad{}
343 case NExp1{n, i, f, x} True{} d e s:
344 NExpD{n, i, f, Con{c, x}}
345 case NExp1{n, i, f, x} False{} d e s:
346 NBad{}
347 case NExpD{n, i, f, x} True{} d e s:
348 NExpD{n, i, f, Con{c, x}}
349 case NExpD{n, i, f, x} False{} d e s:
350 NBad{}
351 case NBad{} g d e s:
352 NBad{}