Open jotego opened 1 year ago
Pretty sure the core tokenization logic supports it since it goes through scanner.Int
. However parseNumber
doesn't deal with it -- you could change that to fallback on strconv.ParseInt
with a base of 0. (Just saying this based on glancing at the code, didn't do any actual tests.)
Worth noting that gval's base/arithmetic language can't represent actual integers, only float64's. You'll run into precision issues once you go above 1<<53 in magnitude. But of course you could specify a language based on int64's, see e.g. how decimal is handled.
Thank you for this great package.
It would be nice if
0x
for hexadecimal numbers was usable by default. I think the way around it now is to define some sort ofhex
function within the application.