Source/Packages

Compiler.Parser

packages/compiler/src/Compiler/Parser.alpha

5,902 lines337 declarations199.2 KiBSHA-256 6d135c41813d

def · lines 1541–1554

parseNaturalLiteralDigits

Full file
Shared exact Nat accumulation for universe levels and expected Nat literals. Range is not capped to a machine word; compact storage remains separate work.
1541def parseNaturalLiteralDigits =
1542  (lambda unrestricted radix : (family IntegerLiteralRadix) .
1543    (lambda unrestricted digits : Bytes .
1544      (eliminate
1545        IntegerLiteralSyntaxResult
1546        (lambda unrestricted result : (family IntegerLiteralSyntaxResult) .
1547          (family NaturalLiteralParseResult))
1548        (Compiler.IntegerLiteral/integerLiteralValidateSeparators radix digits)
1549        (branch IntegerLiteralSyntaxAccepted . (foldNaturalLiteralDigits radix digits))
1550        (branch
1551          IntegerLiteralSyntaxFailed
1552          failure
1553          .
1554          (constructor NaturalLiteralParseResult NaturalLiteralParseFailed failure)))))

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.