object Interpolator extends VersionSpecificInterpolatorModule with ExprIndependentInterpolators[Any]
- Grouped
- Alphabetic
- By Inheritance
- Interpolator
- ExprIndependentInterpolators
- VersionSpecificInterpolatorModule
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
- trait Interpolators[Expr[+_], ToExpr[_], Type[_]] extends AnyRef
A trait that provides Interpolator factory methods that conform to a particular input Expr type parameter.
A trait that provides Interpolator factory methods that conform to a particular input Expr type parameter.
In scala 3, the Interpolator companion object contains methods similar to these for quoted.Expr, and as such this would generally by calling methods directly on Interpolator. However, since in scala 2 the Expr depends on a particular instance of
blackbox.Context
, instead an Interpolators must be constructed from the Interpolator companion object'smacroInterpolators
method that takes a Context. - trait LiftedInterpolator[C <: Context with Singleton] extends AnyRef
- Definition Classes
- VersionSpecificInterpolatorModule
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def charIn(str: String): Interpolator[Any, Char]
Succeeds if the next character is a member of the given String; captures that character
Succeeds if the next character is a member of the given String; captures that character
- Definition Classes
- ExprIndependentInterpolators
- def charIn(str: Seq[Char]): Interpolator[Any, Char]
Succeeds if the next character is a member of the given Seq; captures that character
Succeeds if the next character is a member of the given Seq; captures that character
- Definition Classes
- ExprIndependentInterpolators
- def charIn(str: Set[Char]): Interpolator[Any, Char]
Succeeds if the next character is a member of the given Set; captures that character
Succeeds if the next character is a member of the given Set; captures that character
- Definition Classes
- ExprIndependentInterpolators
- def charWhere(fn: (Char) => Boolean): Interpolator[Any, Char]
Succeeds if the next character matches the given predicate; captures that character
Succeeds if the next character matches the given predicate; captures that character
- Definition Classes
- ExprIndependentInterpolators
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- def codePointIn(str: String): Interpolator[Any, CodePoint]
Succeeds if the next codepoint is a member of the given string; captures that code point
Succeeds if the next codepoint is a member of the given string; captures that code point
- Definition Classes
- ExprIndependentInterpolators
- def codePointIn(str: Seq[CodePoint]): Interpolator[Any, CodePoint]
Succeeds if the next codepoint is a member of the given Seq; captures that code point
Succeeds if the next codepoint is a member of the given Seq; captures that code point
- Definition Classes
- ExprIndependentInterpolators
- def codePointIn(str: Set[CodePoint]): Interpolator[Any, CodePoint]
Succeeds if the next codepoint is a member of the given Set; captures that code point
Succeeds if the next codepoint is a member of the given Set; captures that code point
- Definition Classes
- ExprIndependentInterpolators
- def codePointWhere(fn: (CodePoint) => Boolean): Interpolator[Any, CodePoint]
Succeeds if the next codepoint matches the given predicate; captures that code point
Succeeds if the next codepoint matches the given predicate; captures that code point
- Definition Classes
- ExprIndependentInterpolators
- def contextInterpolators(c: Context): Interpolators[scala.reflect.macros.blackbox.Context.Expr, scala.reflect.macros.Universe.Liftable, scala.reflect.macros.blackbox.Context.TypeTag] with LiftedInterpolator[c.type]
Create a Interpolators that can parse Exprs belonging to the specified Context
Create a Interpolators that can parse Exprs belonging to the specified Context
- Definition Classes
- VersionSpecificInterpolatorModule
- def end: Interpolator[Any, Unit]
A parser that succeeds iff the input is empty
A parser that succeeds iff the input is empty
- Definition Classes
- ExprIndependentInterpolators
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def fail(message: String): Interpolator[Any, Nothing]
Indirectly refers to a parser, to allow for mutual-recursion
Indirectly refers to a parser, to allow for mutual-recursion
- Definition Classes
- ExprIndependentInterpolators
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- val idInterpolators: Interpolators[Id, IdToExpr, ClassTag]
Returns an Interpolators that can parse raw values
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def isString(str: String): Interpolator[Any, Unit]
Succeeds if the next set of characters in the input is equal to the given string
Succeeds if the next set of characters in the input is equal to the given string
- Definition Classes
- ExprIndependentInterpolators
- def lazy[Expr, A](fn: () => Interpolator[Expr, A]): Interpolator[Expr, A]
Indirectly refers to a parser, to allow for mutual-recursion
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def pass: Interpolator[Any, Unit]
A parser that consumes no input and always succeeds
A parser that consumes no input and always succeeds
- Definition Classes
- ExprIndependentInterpolators
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
A library for writing custom string interpolation implementations via parser combinators
## Entry Points
If the string context should create an object: Create leaf parsers using the methods in the Interpolator companion object, combine and manipulate them with the methods in Interpolator, then interpolate using the final
Interpolator
'sinterpolate
method.If the string context should create an extractor: Create leaf parsers using the methods in the Extractor companion object, combine and manipulate them with the methods in Extractor, then interpolate using the final
Extractor
'sextractor
method.If the string context should do both: Create leaf parsers using the methods in the Parser companion object, combine and manipulate them with the methods in Parser, then interpolate using the final
Parser
'sinterpolate
andextractor
methods.