Skip to main content

rl_lang/parser/
mod.rs

1//! The parser - transforms a flat [`Vec<Token>`] produced by the lexer into a
2//! [`Vec<Statement>`] that represents the abstract syntax tree (AST).
3//!
4//! # Pipeline position
5//! ```text
6//! source -> Lexer -> [Token] -> Parser -> [Statement] -> Checker -> Evaluator
7//! ```
8//!
9//! # Module layout
10//! - [`parser_logic`] - the [`Parser`] struct and its core cursor primitives
11//! - `expressions` - precedence-climbing expression parser
12//! - `statements` - one sub-module per statement kind
13//! - `utils` - shared helpers (type annotation parsing)
14
15mod expressions;
16pub mod parser_logic;
17mod statements;
18mod utils;