badness_parser/bib.rs
1//! The BibTeX/BibLaTeX parser: lexer, event-stream parser, and green-tree
2//! builder.
3//!
4//! A sibling of [`crate::parser`], built on the same lossless rowan CST + flat
5//! event-stream architecture but for `.bib` files, which are a distinct grammar
6//! with their own [`syntax::SyntaxKind`] and [`syntax::BibLang`] marker. The
7//! pipeline follows rust-analyzer: `lex` produces a flat token stream,
8//! the parser emits a flat list of [`events::Event`]s, and
9//! [`tree_builder::build_tree`] turns tokens + events into a rowan green tree.
10//!
11//! This is the parser layer only; the `.bib` formatter lives in the
12//! `badness-formatter` crate, and the linter and LSP integration in the
13//! `badness` crate.
14
15pub mod ast;
16pub mod core;
17pub(crate) mod events;
18pub(crate) mod grammar;
19pub mod lexer;
20pub mod semantic;
21pub mod syntax;
22pub(crate) mod tree_builder;
23
24pub use core::{Parse, SyntaxError, parse, reconstruct};
25pub use lexer::{Token, lex};