CodeSpanParser

laika.parse.code.CodeSpanParser$
See theCodeSpanParser companion trait

Companion with a range of convenient constructors for creating CodeSpanParsers instances, based on existing parser instances or simple specifications of start and end delimiters.

Attributes

Companion
trait
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Value members

Concrete methods

def apply(category: CodeCategory, start: String, end: String): CodeSpanParser

Parses a single span delimited by the specified start and end strings and associates it with the given code category.

Parses a single span delimited by the specified start and end strings and associates it with the given code category.

Attributes

def apply(category: CodeCategory)(parser: PrefixedParser[String]): CodeSpanParser

Parses a single text span and associates it with the given code category.

Parses a single text span and associates it with the given code category.

Attributes

Parses a sequence of code spans.

Parses a sequence of code spans.

Attributes

Parses code spans that can only start on a new line or at the start of the input.

Parses code spans that can only start on a new line or at the start of the input.

Attributes

def onLineStart(category: CodeCategory)(parser: Parser[String]): CodeSpanParser

Parses a single code span that can only start on a new line or at the start of the input and associates it with the given code category.

Parses a single code span that can only start on a new line or at the start of the input and associates it with the given code category.

Attributes

Lazily initializes the specified parser for recursive application.

Lazily initializes the specified parser for recursive application.

Standard constructors avoid the cost of by-name arguments, but this factory method can be used for the cases where recursive embedding of a syntax needs to occur.

Attributes