Skip to main content

badness_parser/
lib.rs

1//! badness-parser — the lossless CST parser, semantic model, and
2//! command-signature database behind [badness](https://badness.dev/), for
3//! LaTeX (`.tex`, `.sty`/`.cls`, `.dtx`, `.ins`) and BibTeX (`.bib`).
4//!
5//! The parser treats input as generic TeX surface syntax and always produces a
6//! lossless rowan tree: `reconstruct(text) == text`, byte for byte. Semantics
7//! (arity, verbatim-ness, sectioning) are layered on top in [`semantic`],
8//! never inside the grammar.
9
10#![deny(clippy::debug_assert_with_mut_call)]
11
12pub mod ast;
13pub mod bib;
14pub mod declarations;
15pub mod directives;
16pub mod parser;
17pub mod semantic;
18pub mod syntax;
19
20// Re-export rowan so embedders can name the exact tree types this crate is
21// built against without pinning a matching rowan version themselves.
22pub use rowan;