Skip to main content

parse_with_dialect

Function parse_with_dialect 

Source
pub fn parse_with_dialect<D: Dialect>(input: &str, dialect: &D) -> Document
Expand description

Parse input into a lossless IR using the given dialect implementation.

Parsing is indentation-based and conservative:

  • open a block when next content line is more indented
  • close blocks on non-blank dedent
  • preserve all lines even when structure is uncertain