lift
parsley.syntax.lift
object lift
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.
Attributes
- Since
-
4.5.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
. - Example
-
scala> import parsley.character.char scala> import parsley.syntax.lift.{liftSyntax2, liftSyntax3} scala> case class Add(x: Int, y: Int) scala> val p = Add.lift(char('a').as(4), char('b').as(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').as(3), char('b').as(2), char('c').as(5)) scala> q.parse("abc") val res1 = Success(11) scala> q.parse("ab") val res2 = Failure(..)
- Source
- lift.scala
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
lift.type
Members list
Implicits
Inherited implicits
Attributes
- Inherited from:
- lift (hidden)
- Source
- lift.scala
Attributes
- Inherited from:
- lift (hidden)
- Source
- lift.scala
Attributes
- Inherited from:
- lift (hidden)
- Source
- lift.scala
Attributes
- Inherited from:
- lift (hidden)
- Source
- lift.scala
Attributes
- Inherited from:
- lift (hidden)
- Source
- lift.scala
Attributes
- Inherited from:
- lift (hidden)
- Source
- lift.scala
Attributes
- Inherited from:
- lift (hidden)
- Source
- lift.scala
Attributes
- Inherited from:
- lift (hidden)
- Source
- lift.scala
Attributes
- Inherited from:
- lift (hidden)
- Source
- lift.scala
Attributes
- Inherited from:
- lift (hidden)
- Source
- lift.scala
Attributes
- Inherited from:
- lift (hidden)
- Source
- lift.scala
final implicit def liftSyntax19[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, R](f: (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19) => R): Lift19[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, R]
Attributes
- Inherited from:
- lift (hidden)
- Source
- lift.scala
Attributes
- Inherited from:
- lift (hidden)
- Source
- lift.scala
final implicit def liftSyntax20[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, R](f: (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20) => R): Lift20[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, R]
Attributes
- Inherited from:
- lift (hidden)
- Source
- lift.scala
final implicit def liftSyntax21[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, R](f: (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21) => R): Lift21[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, R]
Attributes
- Inherited from:
- lift (hidden)
- Source
- lift.scala
final implicit def liftSyntax22[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, R](f: (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22) => R): Lift22[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, R]
Attributes
- Inherited from:
- lift (hidden)
- Source
- lift.scala
Attributes
- Inherited from:
- lift (hidden)
- Source
- lift.scala
Attributes
- Inherited from:
- lift (hidden)
- Source
- lift.scala
Attributes
- Inherited from:
- lift (hidden)
- Source
- lift.scala
Attributes
- Inherited from:
- lift (hidden)
- Source
- lift.scala
Attributes
- Inherited from:
- lift (hidden)
- Source
- lift.scala
Attributes
- Inherited from:
- lift (hidden)
- Source
- lift.scala
In this article