praxis_parser/lib.rs
1//! Lexer and parser for the Praxis language.
2//!
3//! - [`lex`] turns source text into a lossless token stream (including trivia)
4//! plus `T0xx` diagnostics.
5//! - [`parse`] runs the lexer and then a recursive-descent + Pratt parser
6//! (ADR-004) over the grammar, producing a rowan-backed lossless tree
7//! (ADR-003) plus `P0xx` diagnostics. The tree retains trivia, so the LSP and
8//! its code actions can rewrite a span without disturbing the comments and
9//! whitespace around it.
10
11pub mod lex;
12pub mod parse;
13
14pub use lex::{LexOutput, lex};
15pub use parse::{ParseOutput, TYPE_CONSTRUCTOR_NAMES, parse};