trait BlockParsers extends AnyRef

Provides base parsers that abstract aspects of block parsing common to most lightweight markup languages.

A block parser in Laika can always safely assume that it is invoked at the start of the current line and that the line is not empty.

Linear Supertypes
AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. BlockParsers
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def block(firstLinePrefix: Parser[Any], linePrefix: => Parser[Any], nextBlockPrefix: => Parser[Any]): Parser[BlockSource]

    Parses a full block based on the specified helper parsers.

    Parses a full block based on the specified helper parsers.

    The result of this parser will not contain the characters consumed by any of the specified prefix parsers. The block source returned by this method maintains x-offsets for each individual line so that it can be passed down to recursive block or span parsers without losing position tracking.

    firstLinePrefix

    parser that recognizes the start of the first line of this block

    linePrefix

    parser that recognizes the start of subsequent lines that still belong to the same block

    nextBlockPrefix

    parser that recognizes whether a line after one or more blank lines still belongs to the same block

  6. def block(firstLinePrefix: Parser[Any], linePrefix: => Parser[Any]): Parser[BlockSource]

    Parses a full block based on the specified helper parsers.

    Parses a full block based on the specified helper parsers.

    The string result of this parser will not contain the characters consumed by any of the specified prefix parsers.

    firstLinePrefix

    parser that recognizes the start of the first line of this block

    linePrefix

    parser that recognizes the start of subsequent lines that still belong to the same block

  7. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  8. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  9. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  10. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  11. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  12. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  13. def indentedBlock(minIndent: Int = 1, linePredicate: => Parser[Any] = success(()), endsOnBlankLine: Boolean = false, firstLineIndented: Boolean = false, maxIndent: Int = Int.MaxValue): Parser[BlockSource]

    Parses a full block based on the specified helper parsers, expecting an indentation for all lines except the first.

    Parses a full block based on the specified helper parsers, expecting an indentation for all lines except the first. The indentation may vary between the parts of the indented block, so that this parser only cuts off the minimum indentation shared by all lines, but each line must have at least the specified minimum indentation.

    minIndent

    the minimum indentation that each line in this block must have

    linePredicate

    parser that recognizes the start of subsequent lines that still belong to the same block

    endsOnBlankLine

    indicates whether parsing should end on the first blank line

    firstLineIndented

    indicates whether the first line is expected to be indented, too

    maxIndent

    the maximum indentation that will get dropped from the start of each line of the result

    returns

    a parser that produces the raw text of the parsed block with the indentation removed

  14. def indentedBlockWithLevel(minIndent: Int = 1, linePredicate: => Parser[Any] = success(()), endsOnBlankLine: Boolean = false, firstLineIndented: Boolean = false, maxIndent: Int = Int.MaxValue): Parser[(BlockSource, Int)]

    Parses a full block based on the specified helper parsers, expecting an indentation for all lines except the first.

    Parses a full block based on the specified helper parsers, expecting an indentation for all lines except the first. The indentation may vary between the parts of the indented block, so that this parser only cuts off the minimum indentation shared by all lines, but each line must have at least the specified minimum indentation.

    minIndent

    the minimum indentation that each line in this block must have

    linePredicate

    parser that recognizes the start of subsequent lines that still belong to the same block

    endsOnBlankLine

    indicates whether parsing should end on the first blank line

    firstLineIndented

    indicates whether the first line is expected to be indented, too

    maxIndent

    the maximum indentation that will get dropped from the start of each line of the result

    returns

    a parser that produces the raw text of the parsed block with the indentation removed and the indentation level (number of whitespace characters removed from the text lines)

  15. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  16. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  17. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  18. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  19. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  20. def toString(): String
    Definition Classes
    AnyRef → Any
  21. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  22. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  23. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()

Inherited from AnyRef

Inherited from Any

Ungrouped