Packages

  • package root

    A library for writing custom string interpolation implementations via parser combinators

    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's interpolate 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's extractor 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's interpolate and extractor methods.

    Definition Classes
    root
  • package name
    Definition Classes
    root
  • package rayrobdod
    Definition Classes
    name
  • package stringContextParserCombinator

    A library for implementing custom string interpolation implementations using Parser Combinators

    A library for implementing custom string interpolation implementations using Parser Combinators

    Definition Classes
    rayrobdod
  • package typeclass

    Implicit values used by branch combinators that allow combinations of input types to have more ergonomic return types.

    Implicit values used by branch combinators that allow combinations of input types to have more ergonomic return types.

    Each of the typeclasses defined in this package fit into a matrix, where one dimension is which type of parser the typeclass is used with and the other dimension is the method that uses an instance of the type

    method

    Covariant (Interpolator)

    Contravariant (Extractor)

    Invariant (Parser)

    andThen

    Sequenced

    ContraSequenced

    BiSequenced

    orElse

    Eithered

    ContraEithered

    BiEithered

    repeat

    Repeated

    ContraRepeated

    BiRepeated

    optionally

    Optionally

    ContraOptionally

    BiOptionally

    mapToExpr

    ToExprMapping

    N/A

    N/A

    Thus, if you are only working with interpolators, then you'll only need to work with the unprefixed typeclasses.

    Each of these traits has a companion object that defines a generic instance of the trait, and a few instances for more specific types. For instance, each typeclass includes a instance that will avoid wrapping scala.Unit values in a collection or tuple.

    Defining custom instances of these types is supported. Making custom given instances can significantly reduce the number of explicit map calls required when writing a parser, however the usual advice with given instances applies: keep types specific, or keep the scope of a given instance to the minimum viable to prevent given instances from becoming confusing.

  • CodePoint
  • Extractor
  • Interpolator
  • LiftFunction
  • ParseException
  • Parser
  • PartialExprFunction
  • RepeatStrategy
  • Unapply
p

name.rayrobdod

stringContextParserCombinator

package stringContextParserCombinator

A library for implementing custom string interpolation implementations using Parser Combinators

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. stringContextParserCombinator
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Package Members

  1. package typeclass

    Implicit values used by branch combinators that allow combinations of input types to have more ergonomic return types.

    Implicit values used by branch combinators that allow combinations of input types to have more ergonomic return types.

    Each of the typeclasses defined in this package fit into a matrix, where one dimension is which type of parser the typeclass is used with and the other dimension is the method that uses an instance of the type

    method

    Covariant (Interpolator)

    Contravariant (Extractor)

    Invariant (Parser)

    andThen

    Sequenced

    ContraSequenced

    BiSequenced

    orElse

    Eithered

    ContraEithered

    BiEithered

    repeat

    Repeated

    ContraRepeated

    BiRepeated

    optionally

    Optionally

    ContraOptionally

    BiOptionally

    mapToExpr

    ToExprMapping

    N/A

    N/A

    Thus, if you are only working with interpolators, then you'll only need to work with the unprefixed typeclasses.

    Each of these traits has a companion object that defines a generic instance of the trait, and a few instances for more specific types. For instance, each typeclass includes a instance that will avoid wrapping scala.Unit values in a collection or tuple.

    Defining custom instances of these types is supported. Making custom given instances can significantly reduce the number of explicit map calls required when writing a parser, however the usual advice with given instances applies: keep types specific, or keep the scope of a given instance to the minimum viable to prevent given instances from becoming confusing.

Type Members

  1. final class CodePoint extends AnyRef

    Represents a unicode codepoint

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

    Parses an interpolated string expression into some extractor

    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

  3. type Id[+A] = A

    An identity context - for parsing outside of a macro

  4. type IdToExpr[A] = =:=[A, A]

    An identity function for lifting into the identity context

  5. final class Interpolator[-Expr, +A] extends VersionSpecificInterpolator[Expr, A]

    Parses an interpolated string expression into some value

    Parses an interpolated string expression into some value

    Expr

    the macro-level expression type.

    A

    the type of the parsed result

  6. trait LiftFunction[U <: Context with Singleton, -CC[_], +Z] extends AnyRef

    Support for Interpolator.contextInterpolators.lifted; represents a macro-level function that combines a CC[A] and an A.

  7. final class ParseException extends RuntimeException

    Thrown by Id-using parse methods when the parser fails to parse the string context

    Thrown by Id-using parse methods when the parser fails to parse the string context

    The Expr-using parse methods will fail at compile time instead, and thus don't throw

  8. final class Parser[Expr[_], Type[_], A] extends VersionSpecificParser[Expr, Type, A]

    Parses an interpolated string expression into some value

    Parses an interpolated string expression into some value

    Expr

    the macro-level expression type

    Type

    the macro-level type type

    A

    the type of the parsed result

  9. trait PartialExprFunction[+Expr[_], -A, +Z] extends AnyRef

    A partial function which is valid according to an Expr[Boolean] instead of a plain Boolean

  10. sealed trait RepeatStrategy extends AnyRef

    Describes how much a Repeat will attempt to match

  11. sealed trait Unapply[-A] extends AnyRef

    An object that can be a pattern match pattern

Value Members

  1. object CodePoint
  2. object Extractor extends VersionSpecificExtractorModule

  3. object Interpolator extends VersionSpecificInterpolatorModule with ExprIndependentInterpolators[Any]

  4. object Parser extends VersionSpecificParserModule

  5. object PartialExprFunction
  6. object RepeatStrategy

    The instances of the RepeatStrategy enum

  7. object Unapply

    The types of pattern match objects

Inherited from AnyRef

Inherited from Any

Ungrouped