badness-parser 0.3.0

Lossless CST parser, semantic model, and command-signature database for LaTeX and BibTeX
Documentation
//! The lexer, the event-stream parser, and the green-tree builder.
//!
//! The pipeline follows rust-analyzer: `lex` produces a flat token
//! stream, the parser emits a flat list of [`events::Event`]s, and
//! [`tree_builder::build_tree`] replays tokens + events into a rowan green
//! tree.
//!
//! `build_tree` is a straight replay and makes no attachment decisions of its
//! own — trivia is already placed by the time it runs. Comment binding is the
//! grammar's (`grammar::trivia::binding_run`), which decides where a `%` run
//! attaches while the walk still has the context to say.

pub mod conditional;
pub mod core;
pub mod edit;
pub(crate) mod events;
pub(crate) mod grammar;
pub mod lexer;
pub mod reparse;
pub(crate) mod tree_builder;

pub use core::{
    Parse, SyntaxError, parse, parse_with_declarations, parse_with_declarations_resolved,
    parse_with_flavor, reconstruct,
};
pub use edit::{Edit, apply_edits, diff_edit, try_apply_edits};
pub use grammar::is_def_prefix_command;
pub use lexer::{LatexFlavor, LexConfig, ParseCtx, Token, lex, lex_with};
pub use reparse::{ReparseBase, ReparseTier, Reparsed, reparse, reparse_edits};

#[doc(hidden)]
pub use reparse::fingerprint;