package stringContextParserCombinator
A library for implementing custom string interpolation implementations using Parser Combinators
- Source
- package.scala
- Alphabetic
- By Inheritance
- stringContextParserCombinator
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
-
final
class
CodePoint extends AnyRef
Represents a unicode codepoint
-
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
-
type
Id[+A] = A
An identity context - for parsing outside of a macro
-
type
IdToExpr[A] = =:=[A, A]
An identity function for lifting into the identity context
-
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
-
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.
-
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
-
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
-
trait
PartialExprFunction[+Expr[_], -A, +Z] extends AnyRef
A partial function which is valid according to an
Expr[Boolean]
instead of a plainBoolean
-
sealed
trait
RepeatStrategy extends AnyRef
Describes how much a Repeat will attempt to match
-
sealed
trait
Unapply[-A] extends AnyRef
An object that can be a pattern match pattern
Value Members
- object CodePoint
- object Extractor extends VersionSpecificExtractorModule
- object Interpolator extends VersionSpecificInterpolatorModule with ExprIndependentInterpolators[Any]
- object Parser extends VersionSpecificParserModule
- object PartialExprFunction
-
object
RepeatStrategy
The instances of the RepeatStrategy enum
-
object
Unapply
The types of pattern match objects
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.