Interpolator

name.rayrobdod.stringContextParserCombinator.Interpolator
See theInterpolator companion class
object Interpolator

Attributes

Companion
class
Source
Interpolator.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Grouped members

String-Part

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

Attributes

Inherited from:
ExprIndependentInterpolators (hidden)
Source
Interpolator.scala

String-Part as Char

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

Attributes

Inherited from:
ExprIndependentInterpolators (hidden)
Source
Interpolator.scala
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

Attributes

Inherited from:
ExprIndependentInterpolators (hidden)
Source
Interpolator.scala
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

Attributes

Inherited from:
ExprIndependentInterpolators (hidden)
Source
Interpolator.scala
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

Attributes

Inherited from:
ExprIndependentInterpolators (hidden)
Source
Interpolator.scala

String-Part as 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

Attributes

Inherited from:
ExprIndependentInterpolators (hidden)
Source
Interpolator.scala

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

Attributes

Inherited from:
ExprIndependentInterpolators (hidden)
Source
Interpolator.scala

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

Attributes

Inherited from:
ExprIndependentInterpolators (hidden)
Source
Interpolator.scala

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

Attributes

Inherited from:
ExprIndependentInterpolators (hidden)
Source
Interpolator.scala

Argument-Part

def lifted[Lifter[_], Z](lift: LiftFunction[Lifter, Z], description: String)(using Quotes, Type[Lifter]): Interpolator[Expr[Any], Z]

A parser that succeeds if the next part of the in put is an arg and Lifter parameterized on arg's type can be implicitly summoned

A parser that succeeds if the next part of the in put is an arg and Lifter parameterized on arg's type can be implicitly summoned

The implicitly summoned value and the arg value are passed to lift; the returned value is returned by this parser

Attributes

Inherited from:
VersionSpecificInterpolatorModule (hidden)
Source
VersionSpecificInterpolator.scala
def ofType[A](using Type[A], Quotes): Interpolator[Expr[Any], Expr[A]]

A parser that succeeds iff the next part of the input is an arg with the given type, and captures the arg's tree

A parser that succeeds iff the next part of the input is an arg with the given type, and captures the arg's tree

Attributes

Inherited from:
VersionSpecificInterpolatorModule (hidden)
Source
VersionSpecificInterpolator.scala

Constant

def pass: Interpolator[Any, Unit]

A parser that consumes no input and always succeeds

A parser that consumes no input and always succeeds

Attributes

Inherited from:
ExprIndependentInterpolators (hidden)
Source
Interpolator.scala

Position

def end: Interpolator[Any, Unit]

A parser that succeeds iff the input is empty

A parser that succeeds iff the input is empty

Attributes

Inherited from:
ExprIndependentInterpolators (hidden)
Source
Interpolator.scala

Miscellaneous

def `lazy`[Expr, A](fn: () => Interpolator[Expr, A]): Interpolator[Expr, A]

Indirectly refers to a parser, to allow for mutual-recursion

Indirectly refers to a parser, to allow for mutual-recursion

Attributes

Source
Interpolator.scala
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

Attributes

Inherited from:
ExprIndependentInterpolators (hidden)
Source
Interpolator.scala

InterpolatorGroup

trait Interpolators[Expr[_], ToExpr[_], Type[_]]

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's macroInterpolators method that takes a Context.

Attributes

Source
Interpolator.scala
Supertypes
class Object
trait Matchable
class Any

Attributes

Inherited from:
VersionSpecificInterpolatorModule (hidden)
Source
VersionSpecificInterpolator.scala
Supertypes
class Object
trait Matchable
class Any

Returns an Interpolators that can parse raw values

Returns an Interpolators that can parse raw values

Attributes

Source
Interpolator.scala
def quotedInterpolators(using Quotes): Interpolators[Expr, ToExpr, Type] & LiftedInterpolator

Create an Interpolators that can parse quoted.Exprs

Create an Interpolators that can parse quoted.Exprs

Attributes

Inherited from:
VersionSpecificInterpolatorModule (hidden)
Source
VersionSpecificInterpolator.scala

Type members

Inherited types

type Interpolator[A] = Interpolator[Expr[Any], A]

Attributes

Inherited from:
VersionSpecificInterpolatorModule (hidden)
Source
VersionSpecificInterpolator.scala