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§
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 (seeparse_with_errors). Used by the salsa parse query, which caches the tree and the errors together from a single parse.