Source/Packages

Compiler.Parser

packages/compiler/src/Compiler/Parser.alpha

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

def · lines 1117–1156

parseStreamingValidSource

Full file
1117def parseStreamingValidSource =
1118  (lambda unrestricted rawSource : Bytes .
1119    (app
1120      (bytes-eliminate
1121        (lambda unrestricted remaining : Bytes .
1122          (pi unrestricted offset : Nat .
1123            (pi unrestricted quoteState : Nat .
1124              (pi unrestricted stripState : Nat .
1125                (pi unrestricted bytePrefix : Nat . (family StreamingStructuralState))))))
1126        (lambda unrestricted offset : Nat .
1127          (lambda unrestricted quoteState : Nat .
1128            (lambda unrestricted stripState : Nat .
1129              (lambda unrestricted bytePrefix : Nat . (parserFinishStripState offset stripState)))))
1130        (lambda unrestricted head : Byte .
1131          (lambda unrestricted tail : Bytes .
1132            (lambda unrestricted continue : (pi unrestricted offset : Nat . (pi unrestricted quoteState : Nat . (pi unrestricted stripState : Nat . (pi unrestricted bytePrefix : Nat . (family StreamingStructuralState))))) .
1133              (lambda unrestricted offset : Nat .
1134                (lambda unrestricted quoteState : Nat .
1135                  (lambda unrestricted stripState : Nat .
1136                    (lambda unrestricted bytePrefix : Nat .
1137                      (app
1138                        (lambda unrestricted next : (pi unrestricted nextQuote : Nat . (pi unrestricted nextStrip : Nat . (family StreamingStructuralState))) .
1139                          (parserChooseStreamingState
1140                            quoteState
1141                            (lambda unrestricted force : Nat .
1142                              (parserQuotedSourceByte offset head quoteState stripState next))
1143                            (lambda unrestricted force : Nat .
1144                              (parserOutsideSourceByte bytePrefix offset head stripState next))))
1145                        (lambda unrestricted nextQuote : Nat .
1146                          (lambda unrestricted nextStrip : Nat .
1147                            (continue
1148                              (succ offset)
1149                              nextQuote
1150                              nextStrip
1151                              (parserNextBytePrefix head quoteState stripState))))))))))))
1152        rawSource)
1153      zero
1154      zero
1155      parserStripStateBetween
1156      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.