Source/Packages

Compiler.Parser

packages/compiler/src/Compiler/Parser.alpha

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

def · lines 1947–1958

bytesElementTerm

Full file
A bytes expression whose members are all natural literals below 256 is a BytesLiteral. Any other member turns the whole expression into a bytes-cons application chain over the empty literal, with literal members lowered to byte literals -- the same meaning the trusted elaborator gives a bytes expression with computed members.
1947def bytesElementTerm =
1948  (lambda unrestricted element : (family Term) .
1949    (eliminate
1950      SourceByteResult
1951      (lambda unrestricted result : (family SourceByteResult) . (family Term))
1952      (sourceByteFromTerm element)
1953      (branch
1954        SourceByteDecoded
1955        decodedSourceByte
1956        .
1957        (constructor Term ByteLiteral decodedSourceByte))
1958      (branch SourceByteInvalid . element)))

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.