def word.num

cswap-bend-cli@0.1.0.0 · json/lex.bend:103

import cswap-bend-cli@0.1.0.0/json/lex.bend as Lex
import 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}

Uses (4)

Used by (1)