RecursiveSpanParsers

laika.parse.markup.RecursiveSpanParsers

Provides parsers for nested spans, custom span parser implementations can use these without knowing the available span types of the host markup language.

Includes the support for escaped text.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes

Members list

Value members

Abstract methods

def getSyntaxHighlighter(language: String): Option[RecursiveSpanParser]

Provides the syntax highlighter for the specified language if present.

Provides the syntax highlighter for the specified language if present.

Attributes

Lifts the specified text parser to parse the string result as a sequence of spans.

Lifts the specified text parser to parse the string result as a sequence of spans.

This type of span parser is usually either used in block parsers, that need to process inline markup after the text for the block has been parsed from the input string or for inline parsers, that need to process inline markup for a span with a delimiter while supporting nested spans.

In the latter case the passed parser is usually of type DelimitedText which is an optimized parser that parses text and recursive spans in one pass. For other kinds of parsers the resulting parser will be a two-pass parser.

The returned parser allows to register parsers for child spans with its embed method for parsing types of child spans in addition to the available span types of the host markup language

Attributes

Lifts the specified text parser to parse the string result as a sequence of spans.

Lifts the specified text parser to parse the string result as a sequence of spans.

This type of span parser is usually either used in block parsers, that need to process inline markup after the text for the block has been parsed from the input string or for inline parsers, that need to process inline markup for a span with a delimiter while supporting nested spans.

In the latter case the passed parser is usually of type DelimitedText which is an optimized parser that parses text and recursive spans in one pass. For other kinds of parsers the resulting parser will be a two-pass parser.

The returned parser allows to register parsers for child spans with its embed method for parsing types of child spans in addition to the available span types of the host markup language

Attributes

Parses the input into a sequence of spans based on the available span types of the host markup language.

Parses the input into a sequence of spans based on the available span types of the host markup language.

This parser always parses to the end of the input, therefore it is usually applied to the result of a previous parser invocation.

Attributes

Inherited methods

Parses an escape sequence (usually a backslash followed by a single char). The characters allowed in an escape sequence might differ between markup languages, therefore custom parser implementations should use this parser as it is always configured correctly for the current host language.

Parses an escape sequence (usually a backslash followed by a single char). The characters allowed in an escape sequence might differ between markup languages, therefore custom parser implementations should use this parser as it is always configured correctly for the current host language.

Attributes

Inherited from:
EscapedTextParsers
def escapedText(p: DelimitedText): Parser[String]

Adds support for escape sequences to the specified text parser.

Adds support for escape sequences to the specified text parser.

Attributes

Inherited from:
EscapedTextParsers
def escapedUntil(char: Char, chars: Char*): Parser[String]

Parses a span of text until one of the specified characters is seen (unless it is escaped), while also processing escaped characters, but no other nested spans. The final character is not included in the result.

Parses a span of text until one of the specified characters is seen (unless it is escaped), while also processing escaped characters, but no other nested spans. The final character is not included in the result.

Attributes

Inherited from:
EscapedTextParsers