def hash.hex.of
import emerging-ezhttp@0.21.0.0/src/unescape.bend as Unescapeimport Base
247# after `&#x`, once it is known whether the character is a hex digit
248def hash.hex.of(+x: Char, +c: Char, k: Scan -> String, +d: U32, digit: Bool)
249 -> String:
250 match digit:
251 case True{}:
252 k(Num{True{}, d})
253 case False{}:
254 SCon{'&', SCon{'#', SCon{x, text(c, k)}}}