def step
emerging-ezhttp@0.21.0.0 · src/unescape.bend:301
import emerging-ezhttp@0.21.0.0/src/unescape.bend as Unescape
import Base
301
302def step(st: Scan, +c: Char, k: Scan -> String) -> String:
303 match st:
304 case Txt{}:
305 text(c, k)
306 case Amp{}:
307 amp(c, k, Char.is_eq(c, '#'))
308 case Hash{}:
309 hash(c, k, digit(False{}, c))
310 case HashX{x}:
311 hash.hex(x, c, k, digit(True{}, c))
312 case Num{+hex, n}:
313 num(hex, n, c, k, digit(hex, c), U32.is_lt(digit(hex, c), 16))
314 case Name{s, len}:
315 name(s, len, c, k, Char.is_eq(c, ';'))