def nat_value
import bolt@1.27.0.0/src/rules/tokens.bend as Tokensimport Base
81# a Nat literal's value (`12n` is 12); none for anything else or past U32
82def nat_value(+tt: String) -> Maybe<&2, U32>:
83 Bool.pick(Maybe<&2, U32>, nat_ok(String.to_list(tt)), U32.read(stem(tt)), None{})