Source/Packages

Compiler.Parser

packages/compiler/src/Compiler/Parser.alpha

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

def · lines 832–852

parserConsumeEmittedBytes

Full file
832def parserConsumeEmittedBytes =
833  (lambda unrestricted endOffset : Nat .
834    (lambda unrestricted emit : Bytes .
835      (app
836        (bytes-eliminate
837          (lambda unrestricted remaining : Bytes .
838            (pi unrestricted offset : Nat .
839              (pi unrestricted state : (family StreamingStructuralState) .
840                (family StreamingStructuralState))))
841          (lambda unrestricted offset : Nat .
842            (lambda unrestricted state : (family StreamingStructuralState) . state))
843          (lambda unrestricted head : Byte .
844            (lambda unrestricted tail : Bytes .
845              (lambda unrestricted continue : (pi unrestricted offset : Nat . (pi unrestricted state : (family StreamingStructuralState) . (family StreamingStructuralState))) .
846                (lambda unrestricted offset : Nat .
847                  (lambda unrestricted state : (family StreamingStructuralState) .
848                    (parserLocatePendingAtom
849                      offset
850                      (consumeStreamingSourceByte head (continue (succ offset) state))))))))
851          emit)
852        (Std.Natural/naturalSaturatingSubtract endOffset (bytes-length emit)))))

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.