Packages

final class Extractor[Expr[_], Type[_], -A] extends VersionSpecificExtractor[Expr, Type, A]

Parses an interpolated string expression into some extractor

Expr

the macro-level expression type

Type

the macro-level type type

A

the type of the parsed result

Source
Extractor.scala
Linear Supertypes
VersionSpecificExtractor[Expr, Type, A], AnyRef, Any
Ordering
  1. Grouped
  2. Alphabetic
  3. By Inheritance
Inherited
  1. Extractor
  2. VersionSpecificExtractor
  3. AnyRef
  4. Any
Implicitly
  1. by any2stringadd
  2. by StringFormat
  3. by Ensuring
  4. by ArrowAssoc
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. def +(other: String): String
    Implicit
    This member is added by an implicit conversion from Extractor[Expr, Type, A] to any2stringadd[Extractor[Expr, Type, A]] performed by method any2stringadd in scala.Predef.
    Definition Classes
    any2stringadd
  4. def ->[B](y: B): (Extractor[Expr, Type, A], B)
    Implicit
    This member is added by an implicit conversion from Extractor[Expr, Type, A] to ArrowAssoc[Extractor[Expr, Type, A]] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @inline()
  5. def <|>[B, Z](rhs: Extractor[Expr, Type, B])(implicit ev: ContraEithered[Expr, A, B, Z]): Extractor[Expr, Type, Z]

    An alias for #orElse

    An alias for #orElse

    Since

    0.1.1

  6. def <~(rhs: Extractor[Expr, Type, Unit]): Extractor[Expr, Type, A]

    Returns a parser which invokes this parser, and upon success invokes the other parser, discarding the Unit result from the other parser

    Returns a parser which invokes this parser, and upon success invokes the other parser, discarding the Unit result from the other parser

    Since

    0.1.1

  7. def <~>[B, Z](rhs: Extractor[Expr, Type, B])(implicit ev: ContraSequenced[A, B, Z]): Extractor[Expr, Type, Z]

    An alias for #andThen

    An alias for #andThen

    Since

    0.1.1

  8. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  9. def andThen[B, Z](rhs: Extractor[Expr, Type, B])(implicit ev: ContraSequenced[A, B, Z]): Extractor[Expr, Type, Z]

    Returns a parser which invokes this parser, and upon success invokes the other parser.

    Returns a parser which invokes this parser, and upon success invokes the other parser.

    Z

    the result parser's parsed value type

    rhs

    the parser to call after this one

    ev

    A descriptor of how to combine two values into one value

  10. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  11. def attempt: Extractor[Expr, Type, A]

    Returns a parser which invokes this parser, but treats the result of a failed parse as if it does not consume input

  12. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  13. def contramap[Z](contrafn: (Z) ⇒ A): Extractor[Expr, Type, Z]

    Returns an extractor which invokes this extractor after mapping the input value using contrafn

  14. def ensuring(cond: (Extractor[Expr, Type, A]) ⇒ Boolean, msg: ⇒ Any): Extractor[Expr, Type, A]
    Implicit
    This member is added by an implicit conversion from Extractor[Expr, Type, A] to Ensuring[Extractor[Expr, Type, A]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  15. def ensuring(cond: (Extractor[Expr, Type, A]) ⇒ Boolean): Extractor[Expr, Type, A]
    Implicit
    This member is added by an implicit conversion from Extractor[Expr, Type, A] to Ensuring[Extractor[Expr, Type, A]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  16. def ensuring(cond: Boolean, msg: ⇒ Any): Extractor[Expr, Type, A]
    Implicit
    This member is added by an implicit conversion from Extractor[Expr, Type, A] to Ensuring[Extractor[Expr, Type, A]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  17. def ensuring(cond: Boolean): Extractor[Expr, Type, A]
    Implicit
    This member is added by an implicit conversion from Extractor[Expr, Type, A] to Ensuring[Extractor[Expr, Type, A]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  18. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  19. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  20. final def extract(sc: StringContext, scrutinee: A)(implicit ev: =:=[Id[Any], Expr[Any]], ev2: =:=[ClassTag[Any], Type[Any]]): Option[Seq[Any]]

    Extract subexpressions from the given value according to the given StringContext

  21. final def extractor[UnexprA](c: Context)(extensionClassName: String)(value: scala.reflect.macros.blackbox.Context.Expr[UnexprA])(implicit ev: <:<[scala.reflect.macros.blackbox.Context.Expr[UnexprA], A], ev2: =:=[scala.reflect.macros.blackbox.Context.Expr[_], Expr[_]], ev3: =:=[scala.reflect.macros.blackbox.Context.TypeTag[_], Type[_]], ttUnexprA: scala.reflect.macros.blackbox.Context.TypeTag[UnexprA]): scala.reflect.macros.blackbox.Context.Expr[Any]

    Build an extractor that will extract values from a value of type A based on the provided StringContext

    Build an extractor that will extract values from a value of type A based on the provided StringContext

    Definition Classes
    VersionSpecificExtractor
  22. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  23. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  24. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  25. def hide: Extractor[Expr, Type, A]

    Returns a parser which invokes this parser, but does not show the expected value in failure messages

  26. val impl: internal.Extractor[Expr, Type, A]
    Attributes
    protected[stringContextParserCombinator]
    Definition Classes
    Extractor → VersionSpecificExtractor
  27. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  28. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  29. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  30. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  31. def opaque(description: String): Extractor[Expr, Type, A]

    Returns a extractor which invokes this parser, but has the given description upon failure

  32. def optionally[Z](strategy: RepeatStrategy = RepeatStrategy.Possessive)(implicit ev: ContraOptionally[Expr, A, Z]): Extractor[Expr, Type, Z]

    Returns a parser which invokes this parser and provides a value whether this parser succeeded or failed

    Returns a parser which invokes this parser and provides a value whether this parser succeeded or failed

    Z

    the result parser's parsed value type

    strategy

    whether the optionally will attempt to match as much or as little as possible, and whether it will backtrack. Default is RepeatStrategy.Possessive

    ev

    A descriptor of how to mark present or absent values

  33. def orElse[B, Z](rhs: Extractor[Expr, Type, B])(implicit ev: ContraEithered[Expr, A, B, Z]): Extractor[Expr, Type, Z]

    Returns a parser which invokes this parser, and then: * If this parser run succeeded, return this internal's success * If this parser failed and consumed input, return this parser's failure * If this parser failed but did not consume input, run the other parser and return the other parser's result

    Returns a parser which invokes this parser, and then: * If this parser run succeeded, return this internal's success * If this parser failed and consumed input, return this parser's failure * If this parser failed but did not consume input, run the other parser and return the other parser's result

    Z

    the result parser's parsed value type

    rhs

    the parser to call after this one

    ev

    A descriptor of how to treat either value as one value

  34. def repeat[Z](min: Int = 0, max: Int = Integer.MAX_VALUE, delimiter: Extractor[Expr, Type, Unit] = ..., strategy: RepeatStrategy = RepeatStrategy.Possessive)(implicit ev: ContraRepeated[Expr, A, Z]): Extractor[Expr, Type, Z]

    Returns a parser which invokes this parser repeatedly and returns the aggregated result

    Returns a parser which invokes this parser repeatedly and returns the aggregated result

    Z

    the result parser's parsed value type

    min

    the minimum number of repeats to be considered successful

    max

    the maximum number of repeats to consume

    delimiter

    a parser describing separators between each repeat. Defaults to a parser that always succeeds and consumes no input.

    strategy

    whether the repeat will attempt to match as much or as little as possible, and whether it will backtrack. Default is RepeatStrategy.Possessive

    ev

    A descriptor of how to combine the repeated values into one value

  35. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  36. def toString(): String
    Definition Classes
    AnyRef → Any
  37. def void: Extractor[Expr, Type, Unit]

    Returns an extractor which runs this parser but ignores the input

    Returns an extractor which runs this parser but ignores the input

    Approximately equivalent to this.contramap({_ => a}), where a is some value this extractor will accept, except this discards all match groups

  38. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  39. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  40. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  41. def widenWith[Z](contrafn: PartialExprFunction[Expr, Z, A]): Extractor[Expr, Type, Z]

    Returns an extractor which invokes the contrafn, then * If the Expr is true, passes the value to this extractor * If the Expr is false, fails the match

  42. def ~>[B](rhs: Extractor[Expr, Type, B])(implicit ev: <:<[Unit, A]): Extractor[Expr, Type, B]

    Returns a parser which invokes this parser, and upon success invokes the other parser, discarding the Unit result from this parser

    Returns a parser which invokes this parser, and upon success invokes the other parser, discarding the Unit result from this parser

    Since

    0.1.1

  43. def [B](y: B): (Extractor[Expr, Type, A], B)
    Implicit
    This member is added by an implicit conversion from Extractor[Expr, Type, A] to ArrowAssoc[Extractor[Expr, Type, A]] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc

Deprecated Value Members

  1. def formatted(fmtstr: String): String
    Implicit
    This member is added by an implicit conversion from Extractor[Expr, Type, A] to StringFormat[Extractor[Expr, Type, A]] performed by method StringFormat in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @deprecated @inline()
    Deprecated

    (Since version 2.12.16) Use formatString.format(value) instead of value.formatted(formatString), or use the f"" string interpolator. In Java 15 and later, formatted resolves to the new method in String which has reversed parameters.

Inherited from VersionSpecificExtractor[Expr, Type, A]

Inherited from AnyRef

Inherited from Any

Inherited by implicit conversion any2stringadd from Extractor[Expr, Type, A] to any2stringadd[Extractor[Expr, Type, A]]

Inherited by implicit conversion StringFormat from Extractor[Expr, Type, A] to StringFormat[Extractor[Expr, Type, A]]

Inherited by implicit conversion Ensuring from Extractor[Expr, Type, A] to Ensuring[Extractor[Expr, Type, A]]

Inherited by implicit conversion ArrowAssoc from Extractor[Expr, Type, A] to ArrowAssoc[Extractor[Expr, Type, A]]

parse

Ungrouped

Result Changing Combinators

Sequencing Combinators

Branching Combinators

Repeating Combinators

Error Enriching Combinators

Other Combinators