Parser

name.rayrobdod.stringContextParserCombinator.Parser
See theParser companion class
object Parser

Attributes

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

Members list

Grouped members

String-Part

def isString(str: String): Parser[Expr, [T <: AnyKind] =>> Type[T], 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:
ExprIndependentParsers (hidden)
Source
Parser.scala

String-Part as Char

def charIn(str: String): Parser[Expr, [T <: AnyKind] =>> Type[T], 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:
ExprIndependentParsers (hidden)
Source
Parser.scala
def charIn(str: Seq[Char]): Parser[Expr, [T <: AnyKind] =>> Type[T], 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:
ExprIndependentParsers (hidden)
Source
Parser.scala
def charIn(str: Set[Char]): Parser[Expr, [T <: AnyKind] =>> Type[T], 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:
ExprIndependentParsers (hidden)
Source
Parser.scala
def charWhere(fn: Char => Boolean): Parser[Expr, [T <: AnyKind] =>> Type[T], 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:
ExprIndependentParsers (hidden)
Source
Parser.scala

String-Part as Codepoint

def codePointIn(str: String): Parser[Expr, [T <: AnyKind] =>> Type[T], 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:
ExprIndependentParsers (hidden)
Source
Parser.scala
def codePointIn(str: Seq[CodePoint]): Parser[Expr, [T <: AnyKind] =>> Type[T], 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

Attributes

Inherited from:
ExprIndependentParsers (hidden)
Source
Parser.scala
def codePointIn(str: Set[CodePoint]): Parser[Expr, [T <: AnyKind] =>> Type[T], 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

Attributes

Inherited from:
ExprIndependentParsers (hidden)
Source
Parser.scala
def codePointWhere(fn: CodePoint => Boolean): Parser[Expr, [T <: AnyKind] =>> Type[T], 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

Attributes

Inherited from:
ExprIndependentParsers (hidden)
Source
Parser.scala

Argument-Part

def ofType[A](using Type[A], Quotes): Parser[Expr, [T <: AnyKind] =>> Type[T], 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:
VersionSpecificParserModule (hidden)
Source
VersionSpecificParser.scala

Constant

def pass: Parser[Expr, [T <: AnyKind] =>> Type[T], Unit]

A parser that consumes no input and always succeeds

A parser that consumes no input and always succeeds

Attributes

Inherited from:
ExprIndependentParsers (hidden)
Source
Parser.scala

Position

def end: Parser[Expr, [T <: AnyKind] =>> Type[T], Unit]

A parser that succeeds iff the input is empty

A parser that succeeds iff the input is empty

Attributes

Inherited from:
ExprIndependentParsers (hidden)
Source
Parser.scala

Miscellaneous

def `lazy`[Expr[_], Type[_], A](fn: () => Parser[Expr, Type, A]): Parser[Expr, Type, A]

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

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

Attributes

Source
Parser.scala
def fail(message: String): Parser[Expr, [T <: AnyKind] =>> Type[T], Nothing]

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

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

Attributes

Inherited from:
ExprIndependentParsers (hidden)
Source
Parser.scala
def paired[Expr[_], Type[_], A](interpolator: Interpolator[Expr[Any], A], extractor: Extractor[Expr, Type, A]): Parser[Expr, Type, A]

A parser that acts like the Interpolator when interpolating, and like the Extractor when extracting

A parser that acts like the Interpolator when interpolating, and like the Extractor when extracting

Attributes

Source
Parser.scala

ParserGroup

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

A trait that provides Parser factory methods that conform to a particular input Expr type parameter.

A trait that provides Parser factory methods that conform to a particular input Expr type parameter.

In scala 3, the Parser companion object contains methods similar to these for quoted.Expr, and as such this would generally by calling methods directly on Parser. However, since in scala 2 the Expr depends on a particular instance of blackbox.Context, instead an Parsers must be constructed from the Parser companion object's macroParsers method that takes a Context.

Attributes

Source
Parser.scala
Supertypes
class Object
trait Matchable
class Any

Returns an Parsers that can parse raw values

Returns an Parsers that can parse raw values

Attributes

Source
Parser.scala
def quotedParsers(using Quotes): Parsers[Expr, ToExpr, [T <: AnyKind] =>> Type[T]]

Create an Parsers that can parse quoted.Exprs

Create an Parsers that can parse quoted.Exprs

Attributes

Inherited from:
VersionSpecificParserModule (hidden)
Source
VersionSpecificParser.scala

Type members

Inherited types

type Extractor[A] = Extractor[Expr, Type, A]

Attributes

Inherited from:
VersionSpecificParserModule (hidden)
Source
VersionSpecificParser.scala
type Interpolator[A] = Interpolator[Expr[Any], A]

Attributes

Inherited from:
VersionSpecificParserModule (hidden)
Source
VersionSpecificParser.scala
type Parser[A] = Parser[Expr, Type, A]

Attributes

Inherited from:
VersionSpecificParserModule (hidden)
Source
VersionSpecificParser.scala