Skip to main content

Module parser

Module parser 

Source
Expand description

Parser module for Pandoc/Quarto documents.

This module implements a single-pass parser that constructs a lossless syntax tree (CST) for Quarto documents.

Re-exports§

pub use diagnostics::Diagnostics;
pub use diagnostics::SyntaxError;
pub use diagnostics::SyntaxErrorSource;

Modules§

blocks
Block-level parsing for Pandoc/Quarto documents.
diagnostics
Parser syntax-error channel.
inlines
Inline-level parsing for Pandoc/Quarto documents.
math
In-tree TeX math content parser.
utils
Shared utilities for parser implementation.
yaml
In-tree YAML parser. Produces a lossless, Panache-compatible CST that the host parser embeds directly into the document tree (frontmatter and hashpipe option bodies) and that the in-tree YAML formatter consumes.

Structs§

IncrementalParseResult
Parser

Functions§

parse
Parses a Quarto document string into a syntax tree.
parse_incremental_suffix
Incrementally update a syntax tree by reparsing either a bounded section window (between top-level headings) or from a safe restart boundary to EOF.
parse_incremental_suffix_with_refdefs
Incremental reparse with a caller-supplied refdef set.
parse_with_errors
Like parse, but also returns the syntax errors the parser found in embedded sublanguages (currently malformed frontmatter / hashpipe YAML).
parse_with_refdefs
Parse with a caller-supplied refdef set.
parse_with_refdefs_and_errors
Like parse_with_refdefs, but also returns embedded-sublanguage syntax errors (see parse_with_errors). Used by the salsa parse query, which caches the tree and the errors together from a single parse.