Skip to main content

Crate badness_parser

Crate badness_parser 

Source
Expand description

badness-parser — the lossless CST parser, semantic model, and command-signature database behind badness, for LaTeX (.tex, .sty/.cls, .dtx, .ins) and BibTeX (.bib).

The parser treats input as generic TeX surface syntax and always produces a lossless rowan tree: reconstruct(text) == text, byte for byte. Semantics (arity, verbatim-ness, sectioning) are layered on top in semantic, never inside the grammar.

Re-exports§

pub use rowan;

Modules§

ast
A typed AST layer over the CST — thin, read-only wrappers (AstNode / AstToken) giving nodes a typed identity and named, positional accessors (reading a COMMAND’s name and its literal {…} argument text, an ENVIRONMENT’s \begin/\end, …).
bib
The BibTeX/BibLaTeX parser: lexer, event-stream parser, and green-tree builder.
declarations
Project declarations: the closed vocabulary a project uses to name constructs the parser cannot see.
directives
Comment directives that turn badness off for part of a file.
parser
The lexer, the event-stream parser, and the green-tree builder.
semantic
Single-file semantic analysis: the per-file label/reference def-use model.
syntax
SyntaxKind — the kinds of CST tokens and nodes — and the rowan Language binding for badness’s LaTeX surface CST.