-
Notifications
You must be signed in to change notification settings - Fork 14
/
lift.scala
513 lines (511 loc) · 30.8 KB
/
lift.scala
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
/* SPDX-FileCopyrightText: © 2021 Parsley Contributors <https://github.com/j-mie6/Parsley/graphs/contributors>
* SPDX-License-Identifier: BSD-3-Clause
*/
package parsley.implicits
import parsley.Parsley, Parsley.pure
import parsley.lift._
// TODO: Scaladoc bug where the macros aren't expanding into the methods, so it's duplicated. Works on Scala 3 though
/** This module provides the "`lift` syntax", which enables a `lift` combinator on functions
* of arities up to 22, applying the function across the results of several parsers.
*
* @example {{{
* scala> import parsley.character.char
* scala> import parsley.implicits.lift.{Lift2, Lift3}
* scala> case class Add(x: Int, y: Int)
* scala> val p = Add.lift(char('a') #> 4, char('b') #> 5)
* scala> p.parse("ab")
* val res0 = Success(Add(4, 5))
* scala> val f = (x: Int, y: Int, z: Int) => x * y + z
* scala> val q = f.lift(char('a') #> 3, char('b') #> 2, char('c') #> 5)
* scala> q.parse("abc")
* val res1 = Success(11)
* scala> q.parse("ab")
* val res2 = Failure(..)
* }}}
*
* @since 3.0.0
* @note a limitation of this syntax is that it requires the function's type to be fully known.
* For a version of this syntax that behaves better with type inference, see [[zipped `zipped`]].
*
* @define constructor This constructor should not be called manually, it is designed to be used via Scala's implicit resolution.
* @define classdesc This class enables the `lift` syntax on functions of arity
* @define paramdesc the function to apply to the parsers.
*
* @define body
* This combinator executes each of its argument parsers in turn and applies this function to their results.
*
* Each of the given parsers is executed in sequence, each yielding a result. So long as
* every parser succeeded, the whole combinator succeeds and each of the results is fed into
* this function. The result of this application is returned by the combinator. If any
* of the given parsers fails then the whole combinator fails.
* @define return a parser that applies this function to the results of all the given parsers.
*/
object lift {
// $COVERAGE-OFF$
// scalastyle:off parameter.number ensure.single.space.after.token
/** This class enables the `lift` syntax on any value, which functions as `pure` as a postfix method.
*
* @constructor $constructor
* @param x the value to lift to the parser level.
*/
implicit final class Lift0[R](private val x: R) extends AnyVal {
/** This combinator injects a value into the parser level without consuming input.
*
* This acts as a postfix verion of the `pure` combinator, this exists
* for consistency with the other arity lifters.
*
* @return
* @see [[parsley.Parsley.pure `pure`]]
*/
def lift: Parsley[R] = pure(x)
}
/** $classdesc one: a flipped `map`.
*
* @constructor $constructor
* @param f the function to apply to the result of the parser.
*/
implicit final class Lift1[T1, R](private val f: T1 => R) extends AnyVal {
/** This combinator maps this function over the result of the given parser `p1`.
*
* Acting as a flipped version of the regular `map` combinator, this exists
* for consistency with the other arity lifters.
*
* @return a parser that applies this function the result of the given parser.
* @see [[parsley.lift.lift1 `lift1`]]
*/
def lift(p1: Parsley[T1]): Parsley[R] = lift1(f, p1)
}
/** $classdesc two.
*
* @constructor $constructor
* @param f $paramdesc
*/
implicit final class Lift2[T1, T2, R](private val f: (T1, T2) => R) extends AnyVal {
/** This combinator executes each of its argument parsers in turn and applies this function to their results.
*
* Each of the given parsers is executed in sequence, each yielding a result. So long as
* every parser succeeded, the whole combinator succeeds and each of the results is fed into
* this function. The result of this application is returned by the combinator. If any
* of the given parsers fails then the whole combinator fails.
*
* @return a parser that applies this function to the results of all the given parsers.
* @see [[parsley.lift.lift2 `lift2`]]
*/
def lift(p1: Parsley[T1], p2: =>Parsley[T2]): Parsley[R] = lift2(f, p1, p2)
}
/** $classdesc three.
*
* @constructor $constructor
* @param f $paramdesc
*/
implicit final class Lift3[T1, T2, T3, R](private val f: (T1, T2, T3) => R) extends AnyVal {
/** This combinator executes each of its argument parsers in turn and applies this function to their results.
*
* Each of the given parsers is executed in sequence, each yielding a result. So long as
* every parser succeeded, the whole combinator succeeds and each of the results is fed into
* this function. The result of this application is returned by the combinator. If any
* of the given parsers fails then the whole combinator fails.
*
* @return a parser that applies this function to the results of all the given parsers.
* @see [[parsley.lift.lift3 `lift3`]]
*/
def lift(p1: Parsley[T1], p2: =>Parsley[T2], p3: =>Parsley[T3]): Parsley[R] = lift3(f, p1, p2, p3)
}
/** $classdesc four.
*
* @constructor $constructor
* @param f $paramdesc
*/
implicit final class Lift4[T1, T2, T3, T4, R](private val f: (T1, T2, T3, T4) => R) extends AnyVal {
/** This combinator executes each of its argument parsers in turn and applies this function to their results.
*
* Each of the given parsers is executed in sequence, each yielding a result. So long as
* every parser succeeded, the whole combinator succeeds and each of the results is fed into
* this function. The result of this application is returned by the combinator. If any
* of the given parsers fails then the whole combinator fails.
*
* @return a parser that applies this function to the results of all the given parsers.
* @see [[parsley.lift.lift4 `lift4`]]
*/
def lift(p1: Parsley[T1], p2: =>Parsley[T2], p3: =>Parsley[T3], p4: =>Parsley[T4]): Parsley[R] = lift4(f, p1, p2, p3, p4)
}
/** $classdesc five.
*
* @constructor $constructor
* @param f $paramdesc
*/
implicit final class Lift5[T1, T2, T3, T4, T5, R](private val f: (T1, T2, T3, T4, T5) => R) extends AnyVal {
/** This combinator executes each of its argument parsers in turn and applies this function to their results.
*
* Each of the given parsers is executed in sequence, each yielding a result. So long as
* every parser succeeded, the whole combinator succeeds and each of the results is fed into
* this function. The result of this application is returned by the combinator. If any
* of the given parsers fails then the whole combinator fails.
*
* @return a parser that applies this function to the results of all the given parsers.
* @see [[parsley.lift.lift5 `lift5`]]
*/
def lift(p1: Parsley[T1], p2: =>Parsley[T2], p3: =>Parsley[T3], p4: =>Parsley[T4], p5: =>Parsley[T5]): Parsley[R] = lift5(f, p1, p2, p3, p4, p5)
}
/** $classdesc six.
*
* @constructor $constructor
* @param f $paramdesc
*/
implicit final class Lift6[T1, T2, T3, T4, T5, T6, R](private val f: (T1, T2, T3, T4, T5, T6) => R) extends AnyVal {
/** This combinator executes each of its argument parsers in turn and applies this function to their results.
*
* Each of the given parsers is executed in sequence, each yielding a result. So long as
* every parser succeeded, the whole combinator succeeds and each of the results is fed into
* this function. The result of this application is returned by the combinator. If any
* of the given parsers fails then the whole combinator fails.
*
* @return a parser that applies this function to the results of all the given parsers.
* @see [[parsley.lift.lift6 `lift6`]]
*/
def lift(p1: Parsley[T1], p2: =>Parsley[T2], p3: =>Parsley[T3], p4: =>Parsley[T4], p5: =>Parsley[T5], p6: =>Parsley[T6]): Parsley[R] =
lift6(f, p1, p2, p3, p4, p5, p6)
}
/** $classdesc seven.
*
* @constructor $constructor
* @param f $paramdesc
*/
implicit final class Lift7[T1, T2, T3, T4, T5, T6, T7, R](private val f: (T1, T2, T3, T4, T5, T6, T7) => R) extends AnyVal {
/** This combinator executes each of its argument parsers in turn and applies this function to their results.
*
* Each of the given parsers is executed in sequence, each yielding a result. So long as
* every parser succeeded, the whole combinator succeeds and each of the results is fed into
* this function. The result of this application is returned by the combinator. If any
* of the given parsers fails then the whole combinator fails.
*
* @return a parser that applies this function to the results of all the given parsers.
* @see [[parsley.lift.lift7 `lift7`]]
*/
def lift(p1: Parsley[T1], p2: =>Parsley[T2], p3: =>Parsley[T3], p4: =>Parsley[T4], p5: =>Parsley[T5], p6: =>Parsley[T6],
p7: =>Parsley[T7]): Parsley[R] = lift7(f, p1, p2, p3, p4, p5, p6, p7)
}
/** $classdesc eight.
*
* @constructor $constructor
* @param f $paramdesc
*/
implicit final class Lift8[T1, T2, T3, T4, T5, T6, T7, T8, R](private val f: (T1, T2, T3, T4, T5, T6, T7, T8) => R) extends AnyVal {
/** This combinator executes each of its argument parsers in turn and applies this function to their results.
*
* Each of the given parsers is executed in sequence, each yielding a result. So long as
* every parser succeeded, the whole combinator succeeds and each of the results is fed into
* this function. The result of this application is returned by the combinator. If any
* of the given parsers fails then the whole combinator fails.
*
* @return a parser that applies this function to the results of all the given parsers.
* @see [[parsley.lift.lift8 `lift8`]]
*/
def lift(p1: Parsley[T1], p2: =>Parsley[T2], p3: =>Parsley[T3], p4: =>Parsley[T4], p5: =>Parsley[T5], p6: =>Parsley[T6],
p7: =>Parsley[T7], p8: =>Parsley[T8]): Parsley[R] = lift8(f, p1, p2, p3, p4, p5, p6, p7, p8)
}
/** $classdesc nine.
*
* @constructor $constructor
* @param f $paramdesc
*/
implicit final class Lift9[T1, T2, T3, T4, T5, T6, T7, T8, T9, R](private val f: (T1, T2, T3, T4, T5, T6, T7, T8, T9) => R) extends AnyVal {
/** This combinator executes each of its argument parsers in turn and applies this function to their results.
*
* Each of the given parsers is executed in sequence, each yielding a result. So long as
* every parser succeeded, the whole combinator succeeds and each of the results is fed into
* this function. The result of this application is returned by the combinator. If any
* of the given parsers fails then the whole combinator fails.
*
* @return a parser that applies this function to the results of all the given parsers.
* @see [[parsley.lift.lift9 `lift9`]]
*/
def lift(p1: Parsley[T1], p2: =>Parsley[T2], p3: =>Parsley[T3], p4: =>Parsley[T4], p5: =>Parsley[T5], p6: =>Parsley[T6],
p7: =>Parsley[T7], p8: =>Parsley[T8], p9: =>Parsley[T9]): Parsley[R] = lift9(f, p1, p2, p3, p4, p5, p6, p7, p8, p9)
}
/** $classdesc ten.
*
* @constructor $constructor
* @param f $paramdesc
*/
implicit final class Lift10[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, R](private val f: (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10) => R) extends AnyVal {
/** This combinator executes each of its argument parsers in turn and applies this function to their results.
*
* Each of the given parsers is executed in sequence, each yielding a result. So long as
* every parser succeeded, the whole combinator succeeds and each of the results is fed into
* this function. The result of this application is returned by the combinator. If any
* of the given parsers fails then the whole combinator fails.
*
* @return a parser that applies this function to the results of all the given parsers.
* @see [[parsley.lift.lift10 `lift10`]]
*/
def lift(p1: Parsley[T1], p2: =>Parsley[T2], p3: =>Parsley[T3], p4: =>Parsley[T4], p5: =>Parsley[T5], p6: =>Parsley[T6],
p7: =>Parsley[T7], p8: =>Parsley[T8], p9: =>Parsley[T9], p10: =>Parsley[T10]): Parsley[R] = lift10(f, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10)
}
/** $classdesc eleven.
*
* @constructor $constructor
* @param f $paramdesc
*/
implicit final class Lift11[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, R]
(private val f: (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11) => R) extends AnyVal {
/** This combinator executes each of its argument parsers in turn and applies this function to their results.
*
* Each of the given parsers is executed in sequence, each yielding a result. So long as
* every parser succeeded, the whole combinator succeeds and each of the results is fed into
* this function. The result of this application is returned by the combinator. If any
* of the given parsers fails then the whole combinator fails.
*
* @return a parser that applies this function to the results of all the given parsers.
* @see [[parsley.lift.lift11 `lift11`]]
*/
def lift(p1: Parsley[T1], p2: =>Parsley[T2], p3: =>Parsley[T3], p4: =>Parsley[T4], p5: =>Parsley[T5], p6: =>Parsley[T6],
p7: =>Parsley[T7], p8: =>Parsley[T8], p9: =>Parsley[T9], p10: =>Parsley[T10], p11: =>Parsley[T11]): Parsley[R] =
lift11(f, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11)
}
/** $classdesc twelve.
*
* @constructor $constructor
* @param f $paramdesc
*/
implicit final class Lift12[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, R]
(private val f: (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12) => R) extends AnyVal {
/** This combinator executes each of its argument parsers in turn and applies this function to their results.
*
* Each of the given parsers is executed in sequence, each yielding a result. So long as
* every parser succeeded, the whole combinator succeeds and each of the results is fed into
* this function. The result of this application is returned by the combinator. If any
* of the given parsers fails then the whole combinator fails.
*
* @return a parser that applies this function to the results of all the given parsers.
* @see [[parsley.lift.lift12 `lift12`]]
*/
def lift(p1: Parsley[T1], p2: =>Parsley[T2], p3: =>Parsley[T3], p4: =>Parsley[T4],
p5: =>Parsley[T5], p6: =>Parsley[T6], p7: =>Parsley[T7], p8: =>Parsley[T8],
p9: =>Parsley[T9], p10: =>Parsley[T10], p11: =>Parsley[T11], p12: =>Parsley[T12]): Parsley[R] =
lift12(f, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12)
}
/** $classdesc thirteen.
*
* @constructor $constructor
* @param f $paramdesc
*/
implicit final class Lift13[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, R]
(private val f: (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13) => R) extends AnyVal {
/** This combinator executes each of its argument parsers in turn and applies this function to their results.
*
* Each of the given parsers is executed in sequence, each yielding a result. So long as
* every parser succeeded, the whole combinator succeeds and each of the results is fed into
* this function. The result of this application is returned by the combinator. If any
* of the given parsers fails then the whole combinator fails.
*
* @return a parser that applies this function to the results of all the given parsers.
* @see [[parsley.lift.lift13 `lift13`]]
*/
def lift(p1: Parsley[T1], p2: =>Parsley[T2], p3: =>Parsley[T3], p4: =>Parsley[T4], p5: =>Parsley[T5], p6: =>Parsley[T6],
p7: =>Parsley[T7], p8: =>Parsley[T8], p9: =>Parsley[T9], p10: =>Parsley[T10], p11: =>Parsley[T11], p12: =>Parsley[T12],
p13: =>Parsley[T13]): Parsley[R] = lift13(f, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13)
}
/** $classdesc fourteen.
*
* @constructor $constructor
* @param f $paramdesc
*/
implicit final class Lift14[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, R]
(private val f: (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14) => R) extends AnyVal {
/** This combinator executes each of its argument parsers in turn and applies this function to their results.
*
* Each of the given parsers is executed in sequence, each yielding a result. So long as
* every parser succeeded, the whole combinator succeeds and each of the results is fed into
* this function. The result of this application is returned by the combinator. If any
* of the given parsers fails then the whole combinator fails.
*
* @return a parser that applies this function to the results of all the given parsers.
* @see [[parsley.lift.lift14 `lift14`]]
*/
def lift(p1: Parsley[T1], p2: =>Parsley[T2], p3: =>Parsley[T3], p4: =>Parsley[T4], p5: =>Parsley[T5], p6: =>Parsley[T6],
p7: =>Parsley[T7], p8: =>Parsley[T8], p9: =>Parsley[T9], p10: =>Parsley[T10], p11: =>Parsley[T11], p12: =>Parsley[T12],
p13: =>Parsley[T13], p14: =>Parsley[T14]): Parsley[R] = lift14(f, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14)
}
/** $classdesc fifteen.
*
* @constructor $constructor
* @param f $paramdesc
*/
implicit final class Lift15[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, R]
(private val f: (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15) => R) extends AnyVal {
/** This combinator executes each of its argument parsers in turn and applies this function to their results.
*
* Each of the given parsers is executed in sequence, each yielding a result. So long as
* every parser succeeded, the whole combinator succeeds and each of the results is fed into
* this function. The result of this application is returned by the combinator. If any
* of the given parsers fails then the whole combinator fails.
*
* @return a parser that applies this function to the results of all the given parsers.
* @see [[parsley.lift.lift15 `lift15`]]
*/
def lift(p1: Parsley[T1], p2: =>Parsley[T2], p3: =>Parsley[T3], p4: =>Parsley[T4], p5: =>Parsley[T5], p6: =>Parsley[T6],
p7: =>Parsley[T7], p8: =>Parsley[T8], p9: =>Parsley[T9], p10: =>Parsley[T10], p11: =>Parsley[T11], p12: =>Parsley[T12],
p13: =>Parsley[T13], p14: =>Parsley[T14], p15: =>Parsley[T15]): Parsley[R] =
lift15(f, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15)
}
/** $classdesc sixteen.
*
* @constructor $constructor
* @param f $paramdesc
*/
implicit final class Lift16[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, R]
(private val f: (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16) => R) extends AnyVal {
/** This combinator executes each of its argument parsers in turn and applies this function to their results.
*
* Each of the given parsers is executed in sequence, each yielding a result. So long as
* every parser succeeded, the whole combinator succeeds and each of the results is fed into
* this function. The result of this application is returned by the combinator. If any
* of the given parsers fails then the whole combinator fails.
*
* @return a parser that applies this function to the results of all the given parsers.
* @see [[parsley.lift.lift16 `lift16`]]
*/
def lift(p1: Parsley[T1], p2: =>Parsley[T2], p3: =>Parsley[T3], p4: =>Parsley[T4], p5: =>Parsley[T5], p6: =>Parsley[T6],
p7: =>Parsley[T7], p8: =>Parsley[T8], p9: =>Parsley[T9], p10: =>Parsley[T10], p11: =>Parsley[T11], p12: =>Parsley[T12],
p13: =>Parsley[T13], p14: =>Parsley[T14], p15: =>Parsley[T15], p16: =>Parsley[T16]): Parsley[R] =
lift16(f, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16)
}
/** $classdesc seventeen.
*
* @constructor $constructor
* @param f $paramdesc
*/
implicit final class Lift17[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, R]
(private val f: (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17) => R) extends AnyVal {
/** This combinator executes each of its argument parsers in turn and applies this function to their results.
*
* Each of the given parsers is executed in sequence, each yielding a result. So long as
* every parser succeeded, the whole combinator succeeds and each of the results is fed into
* this function. The result of this application is returned by the combinator. If any
* of the given parsers fails then the whole combinator fails.
*
* @return a parser that applies this function to the results of all the given parsers.
* @see [[parsley.lift.lift17 `lift17`]]
*/
def lift(p1: Parsley[T1], p2: =>Parsley[T2], p3: =>Parsley[T3], p4: =>Parsley[T4], p5: =>Parsley[T5], p6: =>Parsley[T6],
p7: =>Parsley[T7], p8: =>Parsley[T8], p9: =>Parsley[T9], p10: =>Parsley[T10], p11: =>Parsley[T11], p12: =>Parsley[T12],
p13: =>Parsley[T13], p14: =>Parsley[T14], p15: =>Parsley[T15], p16: =>Parsley[T16], p17: =>Parsley[T17]): Parsley[R] =
lift17(f, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17)
}
/** $classdesc eighteen.
*
* @constructor $constructor
* @param f $paramdesc
*/
implicit final class Lift18[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, R]
(private val f: (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18) => R) extends AnyVal {
/** This combinator executes each of its argument parsers in turn and applies this function to their results.
*
* Each of the given parsers is executed in sequence, each yielding a result. So long as
* every parser succeeded, the whole combinator succeeds and each of the results is fed into
* this function. The result of this application is returned by the combinator. If any
* of the given parsers fails then the whole combinator fails.
*
* @return a parser that applies this function to the results of all the given parsers.
* @see [[parsley.lift.lift18 `lift18`]]
*/
def lift(p1: Parsley[T1], p2: =>Parsley[T2], p3: =>Parsley[T3], p4: =>Parsley[T4], p5: =>Parsley[T5], p6: =>Parsley[T6],
p7: =>Parsley[T7], p8: =>Parsley[T8], p9: =>Parsley[T9], p10: =>Parsley[T10], p11: =>Parsley[T11], p12: =>Parsley[T12],
p13: =>Parsley[T13], p14: =>Parsley[T14], p15: =>Parsley[T15], p16: =>Parsley[T16], p17: =>Parsley[T17], p18: =>Parsley[T18]): Parsley[R] =
lift18(f, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18)
}
/** $classdesc nineteen.
*
* @constructor $constructor
* @param f $paramdesc
*/
implicit final class Lift19[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, R]
(private val f: (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19) => R) extends AnyVal {
/** This combinator executes each of its argument parsers in turn and applies this function to their results.
*
* Each of the given parsers is executed in sequence, each yielding a result. So long as
* every parser succeeded, the whole combinator succeeds and each of the results is fed into
* this function. The result of this application is returned by the combinator. If any
* of the given parsers fails then the whole combinator fails.
*
* @return a parser that applies this function to the results of all the given parsers.
* @see [[parsley.lift.lift19 `lift19`]]
*/
def lift(p1: Parsley[T1], p2: =>Parsley[T2], p3: =>Parsley[T3], p4: =>Parsley[T4], p5: =>Parsley[T5], p6: =>Parsley[T6],
p7: =>Parsley[T7], p8: =>Parsley[T8], p9: =>Parsley[T9], p10: =>Parsley[T10], p11: =>Parsley[T11], p12: =>Parsley[T12],
p13: =>Parsley[T13], p14: =>Parsley[T14], p15: =>Parsley[T15], p16: =>Parsley[T16], p17: =>Parsley[T17], p18: =>Parsley[T18],
p19: =>Parsley[T19]): Parsley[R] = lift19(f, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19)
}
/** $classdesc twenty.
*
* @constructor $constructor
* @param f $paramdesc
*/
implicit final class Lift20[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, R]
(private val f: (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20) => R) extends AnyVal {
/** This combinator executes each of its argument parsers in turn and applies this function to their results.
*
* Each of the given parsers is executed in sequence, each yielding a result. So long as
* every parser succeeded, the whole combinator succeeds and each of the results is fed into
* this function. The result of this application is returned by the combinator. If any
* of the given parsers fails then the whole combinator fails.
*
* @return a parser that applies this function to the results of all the given parsers.
* @see [[parsley.lift.lift20 `lift20`]]
*/
def lift(p1: Parsley[T1], p2: =>Parsley[T2], p3: =>Parsley[T3], p4: =>Parsley[T4], p5: =>Parsley[T5], p6: =>Parsley[T6],
p7: =>Parsley[T7], p8: =>Parsley[T8], p9: =>Parsley[T9], p10: =>Parsley[T10], p11: =>Parsley[T11], p12: =>Parsley[T12],
p13: =>Parsley[T13], p14: =>Parsley[T14], p15: =>Parsley[T15], p16: =>Parsley[T16], p17: =>Parsley[T17], p18: =>Parsley[T18],
p19: =>Parsley[T19], p20: =>Parsley[T20]): Parsley[R] =
lift20(f, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20)
}
/** $classdesc twenty-one.
*
* @constructor $constructor
* @param f $paramdesc
*/
implicit final class Lift21[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, R]
(private val f: (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21) => R) extends AnyVal {
/** This combinator executes each of its argument parsers in turn and applies this function to their results.
*
* Each of the given parsers is executed in sequence, each yielding a result. So long as
* every parser succeeded, the whole combinator succeeds and each of the results is fed into
* this function. The result of this application is returned by the combinator. If any
* of the given parsers fails then the whole combinator fails.
*
* @return a parser that applies this function to the results of all the given parsers.
* @see [[parsley.lift.lift21 `lift21`]]
*/
def lift(p1: Parsley[T1], p2: =>Parsley[T2], p3: =>Parsley[T3], p4: =>Parsley[T4], p5: =>Parsley[T5], p6: =>Parsley[T6],
p7: =>Parsley[T7], p8: =>Parsley[T8], p9: =>Parsley[T9], p10: =>Parsley[T10], p11: =>Parsley[T11], p12: =>Parsley[T12],
p13: =>Parsley[T13], p14: =>Parsley[T14], p15: =>Parsley[T15], p16: =>Parsley[T16], p17: =>Parsley[T17], p18: =>Parsley[T18],
p19: =>Parsley[T19], p20: =>Parsley[T20], p21: =>Parsley[T21]): Parsley[R] =
lift21(f, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21)
}
/** $classdesc twenty-two.
*
* @constructor $constructor
* @param f $paramdesc
*/
implicit final class Lift22[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, R]
(private val f: (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22) => R) extends AnyVal {
/** This combinator executes each of its argument parsers in turn and applies this function to their results.
*
* Each of the given parsers is executed in sequence, each yielding a result. So long as
* every parser succeeded, the whole combinator succeeds and each of the results is fed into
* this function. The result of this application is returned by the combinator. If any
* of the given parsers fails then the whole combinator fails.
*
* @return a parser that applies this function to the results of all the given parsers.
* @see [[parsley.lift.lift22 `lift22`]]
*/
def lift(p1: Parsley[T1], p2: =>Parsley[T2], p3: =>Parsley[T3], p4: =>Parsley[T4], p5: =>Parsley[T5], p6: =>Parsley[T6],
p7: =>Parsley[T7], p8: =>Parsley[T8], p9: =>Parsley[T9], p10: =>Parsley[T10], p11: =>Parsley[T11], p12: =>Parsley[T12],
p13: =>Parsley[T13], p14: =>Parsley[T14], p15: =>Parsley[T15], p16: =>Parsley[T16], p17: =>Parsley[T17], p18: =>Parsley[T18],
p19: =>Parsley[T19], p20: =>Parsley[T20], p21: =>Parsley[T21], p22: =>Parsley[T22]): Parsley[R] =
lift22(f, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22)
}
// scalastyle:on parameter.number ensure.single.space.after.token
// $COVERAGE-ON$
}