Skip to main content

Crate panache_parser

Crate panache_parser 

Source
Expand description

panache-parser is a lossless Concrete Syntax Tree (CST) parser for Pandoc Markdown, Quarto, and R Markdown documents.

It preserves source structure and trivia (including markers and whitespace), making it suitable for editor tooling and formatting pipelines that require deterministic round-tripping.

§Quick start

use panache_parser::parse;

let tree = parse("# Heading\n\nParagraph text.", None);
println!("{:#?}", tree);

§Main entry points

  • parse: Parse input text into a SyntaxNode.
  • ParserOptions: Parser configuration and extension toggles.
  • syntax: Typed syntax wrappers and syntax kinds.
  • parser: Lower-level parser modules and incremental helpers.

Re-exports§

pub use parser::parse;
pub use syntax::SyntaxNode;

Modules§

parser
Parser module for Pandoc/Quarto documents.
range_utils
syntax
Syntax tree types and AST node wrappers for Quarto/Pandoc documents.

Structs§

Extensions
Pandoc/Markdown extensions configuration. Each field represents a specific Pandoc extension. Extensions marked with a comment indicate implementation status.
ParserOptions

Enums§

Flavor
The flavor of Markdown to parse and format. Each flavor has a different set of default extensions enabled.
PandocCompat