1 test/Golden/Splice/G3.hs:0:0:: Splicing expression
2 P.runParser @Text Grammar.g3
6 !(# init, readMore, readNext #)
7 = let _ = "cursorOf" in
9 next t@(Data.Text.Internal.Text arr off unconsumed)
10 = let !(Data.Text.Unsafe.Iter c d) = (Data.Text.Unsafe.iter t) 0
12 (# c, ((Data.Text.Internal.Text arr) (off + d)) (unconsumed - d) #)
13 more (Data.Text.Internal.Text _ _ unconsumed) = (unconsumed > 0)
14 in (# input, more, next #) in
15 let finalRet = \ _farInp _farExp v _inp -> Right v in
17 finalRaise :: forall b. P.Catcher inp b
18 = \ _failInp !farInp !farExp
20 P.ParsingErrorStandard
21 {P.parsingErrorOffset = P.offset farInp,
22 P.parsingErrorUnexpected = if readMore farInp then
23 Just (let (# c, _ #) = readNext farInp in c)
26 P.parsingErrorExpecting = Data.Set.Internal.fromList farExp} in
29 = \ !ok !inp !koByLabel
30 -> let _ = ("catchException lbl=" <> "fail") in
33 = \ !failInp !farInp !farExp
35 (((\ (Data.Text.Internal.Text _ i _)
36 (Data.Text.Internal.Text _ j _)
42 (((ok farInp) farExp) (let _ = "resume.genCode" in \ x -> x))
48 ((compare `Data.Function.on` P.offset) farInp) failInp
50 LT -> (# failInp, [] #)
51 EQ -> (# farInp, (farExp <> []) #)
52 GT -> (# farInp, farExp #)
54 (((((Data.Map.Strict.Internal.findWithDefault finalRaise)
62 let !(# c, cs #) = readNext inp
66 _ = "call exceptionsByName(name_1)=[] catchStackByLabel(ctx)=["fail"]"
70 _ = "suspend raiseException=fromList [(name_1,fromList [])]"
72 \ farInp farExp v !inp
76 (let _ = "resume.genCode"
80 (\ x -> \ x -> \ x -> ('a' : x x)))
87 let _ = "checkToken.else" in
90 = case ((compare `Data.Function.on` P.offset) init) inp of
91 LT -> (# inp, [P.ErrorItemToken 'a'] #)
92 EQ -> (# init, ([] <> [P.ErrorItemToken 'a']) #)
94 in ((readFail inp) farInp) farExp
96 let _ = "checkHorizon.else" in
99 = case ((compare `Data.Function.on` P.offset) init) inp of
100 LT -> (# inp, [P.ErrorItemHorizon 1] #)
101 EQ -> (# init, ([] <> [P.ErrorItemHorizon 1]) #)
103 in ((readFail inp) farInp) farExp in
105 _ = "call exceptionsByName(name_1)=["fail"] catchStackByLabel(ctx)=[]"
109 _ = "suspend raiseException=fromList [(name_1,fromList [("fail",())])]"
111 \ farInp farExp v !inp
114 (((finalRet farInp) farExp)
115 (let _ = "resume.genCode"
116 in ((\ x -> \ x -> x x) (\ x -> x [])) v))
119 Data.Map.Internal.Tip