Source/Packages

Compiler.Parser

packages/compiler/src/Compiler/Parser.alpha

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

def · lines 1210–1227

parseStructuralSourceWithFinalizer

Full file
Validate the whole byte source once, before comments/literals can hide bytes.
1210def parseStructuralSourceWithFinalizer =
1211  (lambda unrestricted finish : (pi unrestricted state : (family StreamingStructuralState) . (family StructuralParseResult)) .
1212    (lambda unrestricted rawSource : Bytes .
1213      (eliminate
1214        UTF8DecodeResult
1215        (lambda unrestricted decoded : (family UTF8DecodeResult) . (family StructuralParseResult))
1216        (Data.UTF8/decodeUTF8 rawSource)
1217        (branch UTF8DecodeSucceeded points . (finish (parseStreamingValidSource rawSource)))
1218        (branch
1219          UTF8DecodeFailed
1220          failure
1221          offset
1222          .
1223          (constructor
1224            StructuralParseResult
1225            StructuralParseFailed
1226            (byte-to-nat (byte 101))
1227            (constructor SyntaxOrigin SyntaxOriginUnknown))))))

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.