Source/Packages

Data.JSONAccess

packages/foundation/standard/src/Data/JSONAccess.alpha

1,210 lines73 declarations39.2 KiBSHA-256 1e44e4cc014b

def · lines 1151–1151

jsonWord64MaximumDigits

Full file
Tensor-file offsets can exceed both 2^32 and the practical runtime range of Nat. Parse their decimal spelling straight into eight bytes. The bound is checked on the spelling BEFORE the wrapping word arithmetic: every nonnegative decimal prefix is at most the final value, so neither 10*a nor 10*a+digit can overflow once the complete digit string fits u64. This accepts integer JSON syntax only; 1.0, 1e3, -0 and quoted numbers are not offsets. jsonNumber owns JSON syntax/leading-zero validation.
1151def jsonWord64MaximumDigits : Bytes = b"18446744073709551615"

The compiler supplied declaration spans and resolved links from this source snapshot. This page does not assert that this file belongs to a checked closure.