def word.num
import cswap-bend-cli@0.1.0.0/json/lex.bend as Leximport Base
103# What a bare word is: null, true, false, a number, or an error.
104def word.num(ok: Bool, w: String) -> Tok:
105 match ok:
106 case True{}:
107 TNum{w}
108 case False{}:
109 TErr{"bad literal: " ++ w}