Skip to main content

badness_parser/
parser.rs

1//! The lexer, the event-stream parser, and the green-tree builder.
2//!
3//! The pipeline follows rust-analyzer: `lex` produces a flat token
4//! stream, the parser emits a flat list of [`events::Event`]s, and
5//! [`tree_builder::build_tree`] turns tokens + events into a rowan green tree,
6//! re-attaching trivia along the way.
7
8pub mod core;
9pub(crate) mod events;
10pub(crate) mod grammar;
11pub mod lexer;
12pub(crate) mod tree_builder;
13
14pub use core::{Parse, SyntaxError, parse, parse_with_flavor, reconstruct};
15pub use grammar::is_def_prefix_command;
16pub use lexer::{LatexFlavor, LexConfig, Token, lex};