Class

laika.parse.directive

TemplateParsers

Related Doc: package directive

Permalink

class TemplateParsers extends DefaultRecursiveSpanParsers

Provides the parsers for directives and context references in templates.

Linear Supertypes
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. TemplateParsers
  2. DefaultRecursiveSpanParsers
  3. DefaultEscapedTextParsers
  4. RecursiveSpanParsers
  5. EscapedTextParsers
  6. AnyRef
  7. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new TemplateParsers(directives: Map[String, directive.Templates.Directive])

    Permalink

Type Members

  1. case class DirectiveSpan(f: (DocumentCursor) ⇒ Span, options: Options = NoOpt) extends Element with SpanResolver with TemplateSpan with Product with Serializable

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. def delimitedRecursiveSpans(textParser: DelimitedText[String]): Parser[List[Span]]

    Permalink

    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 used in inline parsers, that need to process inline markup for a span with a delimiter while supporting nested spans.

    Definition Classes
    DefaultRecursiveSpanParsersRecursiveSpanParsers
  7. def delimitedRecursiveSpans(textParser: DelimitedText[String], additionalSpanParsers: ⇒ Map[Char, Parser[Span]]): Parser[List[Span]]

    Permalink

    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. Adds the specified additional parsers to the span parsers of the host markup language.

    This type of span parser is usually used in inline parsers, that need to process inline markup for a span with a delimiter while supporting nested spans.

    Definition Classes
    DefaultRecursiveSpanParsersRecursiveSpanParsers
  8. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  9. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  10. lazy val escapedChar: Parser[String]

    Permalink

    Parses a single escape character.

    Parses a single escape character. In the default implementation any character can be escaped. Sub-traits may override this parser to restrict the number of escapable characters.

    Definition Classes
    DefaultEscapedTextParsersEscapedTextParsers
  11. def escapedText(p: DelimitedText[String]): Parser[String]

    Permalink

    Adds support for escape sequences to the specified text parser.

    Adds support for escape sequences to the specified text parser.

    p

    the parser to add support for escape sequences to

    returns

    a parser for a text span that supports escape sequences

    Definition Classes
    DefaultEscapedTextParsersEscapedTextParsers
  12. def escapedUntil(char: Char*): Parser[String]

    Permalink

    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.

    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.

    char

    the character(s) that signals the end of the text span

    returns

    a parser for a text span that supports escape sequences

    Definition Classes
    DefaultEscapedTextParsersEscapedTextParsers
  13. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  14. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  15. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  16. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  17. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  18. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  19. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  20. def recursiveSpans: Parser[List[Span]]

    Permalink

    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 is usually applied to the string result of a previous parser invocation.

    Definition Classes
    DefaultRecursiveSpanParsersRecursiveSpanParsers
  21. def recursiveSpans(p: Parser[String], additionalParsers: ⇒ Map[Char, Parser[Span]] = Map.empty): Parser[List[Span]]

    Permalink

    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. Adds the specified additional parsers to the span parsers of the host markup language.

    This type of span parser is usually used in block parsers, that need to process inline markup after the text for the block has been parsed from the input string.

    Definition Classes
    DefaultRecursiveSpanParsersRecursiveSpanParsers
  22. def recursiveSpans(p: Parser[String]): Parser[List[Span]]

    Permalink

    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 used in block parsers, that need to process inline markup after the text for the block has been parsed from the input string.

    Definition Classes
    DefaultRecursiveSpanParsersRecursiveSpanParsers
  23. lazy val spanParsers: Map[Char, Parser[Span]]

    Permalink

    The mapping of markup start characters to their corresponding span parsers.

    The mapping of markup start characters to their corresponding span parsers.

    A parser mapped to a start character is not required to successfully parse the subsequent input. If it fails the character that triggered the parser invocation will be treated as normal text. The mapping is merely used as a performance optimization. The parser will be invoked with the input offset pointing to the character after the one specified as the key for the mapping.

    Definition Classes
    TemplateParsersDefaultRecursiveSpanParsers
  24. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  25. lazy val templateDirective: Parser[TemplateSpan]

    Permalink
  26. lazy val templateRoot: Parser[TemplateRoot]

    Permalink
  27. lazy val templateSpans: Parser[List[TemplateSpan]]

    Permalink
  28. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  29. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  30. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  31. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  32. def withRecursiveSpanParser[T](p: Parser[T]): Parser[((String) ⇒ List[Span], T)]

    Permalink

    Adds a span parser function to the result of the specified parser.

    Adds a span parser function to the result of the specified parser. The function can be used for any kind of custom span parsing of portions of the result produced by the base parser.

    The parser function never fails, but instead inserts spans of type InvalidSpan into the result in case of errors.

    Definition Classes
    DefaultRecursiveSpanParsersRecursiveSpanParsers

Inherited from DefaultEscapedTextParsers

Inherited from RecursiveSpanParsers

Inherited from EscapedTextParsers

Inherited from AnyRef

Inherited from Any

Ungrouped