Source/Packages

Compiler.IntegerLiteral

packages/compiler/src/Compiler/IntegerLiteral.alpha

903 lines95 declarations31.8 KiBSHA-256 578f5c4899f4

def · lines 586–605

integerLiteralValidateSeparators

Full file
586def integerLiteralValidateSeparators =
587  (lambda unrestricted radix : (family IntegerLiteralRadix) .
588    (lambda unrestricted digits : Bytes .
589      (app
590        (bytes-eliminate
591          (lambda unrestricted remaining : Bytes .
592            (pi unrestricted previousWasDigit : Nat . (family IntegerLiteralSyntaxResult)))
593          (lambda unrestricted previousWasDigit : Nat .
594            (integerLiteralChooseSyntax
595              previousWasDigit
596              (lambda unrestricted ignored : Nat .
597                (constructor IntegerLiteralSyntaxResult IntegerLiteralSyntaxAccepted))
598              (lambda unrestricted ignored : Nat .
599                (constructor
600                  IntegerLiteralSyntaxResult
601                  IntegerLiteralSyntaxFailed
602                  (constructor IntegerLiteralFailure IntegerLiteralBadSeparator)))))
603          (integerLiteralSeparatorStep radix)
604          digits)
605        zero)))

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.