trait RecursiveParsers extends RecursiveSpanParsers
Provides parsers for nested blocks, custom block parser implementations can use these without knowing the available span or block types of the host markup language.
Includes the support for nested spans and escaped text.
- Alphabetic
- By Inheritance
- RecursiveParsers
- RecursiveSpanParsers
- EscapedTextParsers
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Abstract Value Members
-
abstract
def
escapeSequence: PrefixedParser[String]
Parses an escape sequence (usually a backslash followed by a single char).
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.
- Definition Classes
- EscapedTextParsers
-
abstract
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.
- Definition Classes
- EscapedTextParsers
-
abstract
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.
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.
- Definition Classes
- EscapedTextParsers
-
abstract
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.
- Definition Classes
- RecursiveSpanParsers
-
abstract
def
paragraphInterruptions(position: BlockPosition = BlockPosition.Any): Parser[Block]
Provides a test for the start of each line in plain paragraphs that indicates whether the line might be the start of a block that is allowed to interrupt paragraphs.
Provides a test for the start of each line in plain paragraphs that indicates whether the line might be the start of a block that is allowed to interrupt paragraphs.
Usually this is only supposed to be used by implementations of a base paragraph parser for a markup language, not by custom extensions.
If the parser returned by this function succeeds the result is the block that interrupts the paragraph, if it fails normal paragraph parsing should resume.
-
abstract
def
recursiveBlocks: RecursiveBlockParser
Parses the input into a sequence of blocks based on the available block types of the host markup language.
Parses the input into a sequence of blocks based on the available block 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.
-
abstract
def
recursiveBlocks(p: Parser[BlockSource]): Parser[Seq[Block]]
Lifts the specified text parser to parse the string result as a sequence of blocks.
Lifts the specified text parser to parse the string result as a sequence of blocks.
This type of span parser is usually used in block parsers, that support the nesting of other blocks.
-
abstract
def
recursiveSpans: RecursiveSpanParser
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.
- Definition Classes
- RecursiveSpanParsers
-
abstract
def
recursiveSpans(parser: Parser[SourceFragment]): InlineParser[Span, List[Span]]
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- Definition Classes
- RecursiveSpanParsers
-
abstract
def
recursiveSpans(parser: DelimitedText): InlineParser[Span, List[Span]]
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- Definition Classes
- RecursiveSpanParsers
Concrete Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native() @HotSpotIntrinsicCandidate()
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
Deprecated Value Members
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] ) @Deprecated
- Deprecated