Packages

  • package root
    Definition Classes
    root
  • package parsley
    Definition Classes
    root
  • package implicits

    This package contains various functionality that involve Scala's implicits mechanism.

    This package contains various functionality that involve Scala's implicits mechanism.

    This includes conversions from scala literals into parsers, as well as enabling new syntax on regular Scala values (such as Parsley's lift or zipped syntax). Automatic conversion to Parsley[Unit] is also supported within this package.

    Definition Classes
    parsley
  • 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.

    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.

    Definition Classes
    implicits
    Example:
    1. 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.

  • Lift0
  • Lift1
  • Lift10
  • Lift11
  • Lift12
  • Lift13
  • Lift14
  • Lift15
  • Lift16
  • Lift17
  • Lift18
  • Lift19
  • Lift2
  • Lift20
  • Lift21
  • Lift22
  • Lift3
  • Lift4
  • Lift5
  • Lift6
  • Lift7
  • Lift8
  • Lift9

implicit final class Lift0[R] extends AnyVal

This class enables the lift syntax on any value, which functions as pure as a postfix method.

Source
lift.scala
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Lift0
  2. AnyVal
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Lift0(x: R)

    This constructor should not be called manually, it is designed to be used via Scala's implicit resolution.

    This constructor should not be called manually, it is designed to be used via Scala's implicit resolution.

    x

    the value to lift to the parser level.

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    Any
  2. final def ##(): Int
    Definition Classes
    Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def getClass(): Class[_ <: AnyVal]
    Definition Classes
    AnyVal → Any
  6. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  7. def lift: Parsley[R]

    This combinator injects a value into the parser level without consuming input.

    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.

    See also

    pure

  8. def toString(): String
    Definition Classes
    Any

Inherited from AnyVal

Inherited from Any

Ungrouped