PrefixedParser

laika.parse.text.PrefixedParser
See thePrefixedParser companion trait

Factories and utilities for creating or processing PrefixedParser instances.

Attributes

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

Members list

Value members

Concrete methods

def apply[U](sc: Type[Char])(p: Parser[U]): PrefixedParser[U]

Creates a new parser that is only triggered when a character in the specified set is seen on the input.

Creates a new parser that is only triggered when a character in the specified set is seen on the input.

Attributes

Source
PrefixedParser.scala
def apply[U](char: Char, chars: Char*)(p: Parser[U]): PrefixedParser[U]

Creates a new parser that is only triggered when one of the specified characters is seen on the input.

Creates a new parser that is only triggered when one of the specified characters is seen on the input.

Attributes

Source
PrefixedParser.scala
def mapAndMerge[T](parsers: Seq[PrefixedParser[T]]): Map[Char, Parser[T]]

Creates a mapping from start characters to their corresponding parser from the specified sequence of PrefixedParsers.

Creates a mapping from start characters to their corresponding parser from the specified sequence of PrefixedParsers. If a character is a trigger for more than one parser they will be combined using orElse where the parser which comes first in the sequence has higher precedence.

Attributes

Source
PrefixedParser.scala