1 test/Golden/Splice/G9.hs:0:0:: Splicing expression
2 P.runParser @Text Grammar.g9
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
27 let _ = ("catchException lbl=" <> "fail") in
28 let _ = ("catchException lbl=" <> "fail") in
31 = \ !failInp !farInp !farExp
34 (((finalRet farInp) farExp) (let _ = "resume.genCode" in ())) init
37 let !(# c, cs #) = readNext init
39 if (\ x -> True) c then
42 = case ((compare `Data.Function.on` P.offset) init) init of
44 EQ -> (# init, ([] <> []) #)
47 (((\ !failInp !farInp !farExp
49 (((\ (Data.Text.Internal.Text _ i _)
50 (Data.Text.Internal.Text _ j _)
57 ((compare `Data.Function.on` P.offset) farInp) failInp
59 LT -> (# failInp, [P.ErrorItemEnd] #)
60 EQ -> (# farInp, (farExp <> [P.ErrorItemEnd]) #)
61 GT -> (# farInp, farExp #)
62 in ((finalRaise failInp) farInp) farExp
67 ((compare `Data.Function.on` P.offset) farInp) failInp
69 LT -> (# failInp, [] #)
70 EQ -> (# farInp, (farExp <> []) #)
71 GT -> (# farInp, farExp #)
72 in ((finalRaise failInp) farInp) farExp)
77 let _ = "checkToken.else" in
80 = case ((compare `Data.Function.on` P.offset) init) init of
82 EQ -> (# init, ([] <> []) #)
84 in ((readFail init) farInp) farExp
86 let _ = "checkHorizon.else" in
89 = case ((compare `Data.Function.on` P.offset) init) init of
90 LT -> (# init, [P.ErrorItemHorizon 1] #)
91 EQ -> (# init, ([] <> [P.ErrorItemHorizon 1]) #)
93 in ((readFail init) farInp) farExp