DocumentParser

Responsible for creating the top level parsers for text markup and template documents, by combining the parser for the root element with a parser for an (optional) configuration header.

class Object
trait Matchable
class Any

Type members

Classlikes

case class DocumentInput(path: Path, source: SourceCursor)
Companion:
object
Companion:
class
case class InvalidDocument(errors: Either[Type[ConfigError], Type[Invalid]], path: Path) extends RuntimeException
Companion:
object
Companion:
class
case class InvalidDocuments(documents: Type[InvalidDocument]) extends RuntimeException
Companion:
object
Companion:
class
case class ParserError(message: String, path: Path) extends RuntimeException with TransformationError
Companion:
object
Companion:
class
case class RendererError(message: String, path: Path) extends RuntimeException with TransformationError
Companion:
object
Companion:
class
sealed trait TransformationError extends RuntimeException

Value members

Concrete methods

def forMarkup(markupParser: MarkupFormat, markupExtensions: MarkupExtensions, configProvider: ConfigProvider): DocumentInput => Either[ParserError, UnresolvedDocument]

Combines the specified markup parsers and extensions and the parser for (optional) configuration headers to create a parser function for an entire text markup document.

Combines the specified markup parsers and extensions and the parser for (optional) configuration headers to create a parser function for an entire text markup document.

Combines the specified parsers for the root element and for (optional) configuration headers to create a parser function for an entire text markup document.

Combines the specified parsers for the root element and for (optional) configuration headers to create a parser function for an entire text markup document.

def forParser[T](p: Path => Parser[T]): DocumentInput => Either[ParserError, T]

A document parser function for the specified parser that is expected to consume all input.

A document parser function for the specified parser that is expected to consume all input.

The specified function is invoked for each parsed document, so that a parser dependent on the input path can be created.

Builds a document parser for CSS documents based on the specified parser for style declarations.

Builds a document parser for CSS documents based on the specified parser for style declarations.

Combines the specified parsers for the root element and for (optional) configuration headers to create a parser function for an entire template document.

Combines the specified parsers for the root element and for (optional) configuration headers to create a parser function for an entire template document.