maat_parser
Combinator-based parser for the Maat programming language.
Role
maat_parser transforms the token stream produced by maat_lexer into a typed Program AST. It uses winnow combinators for statement dispatch with two-token lookahead and a manual Pratt loop for operator-precedence expression parsing. Parse errors are collected rather than aborting, enabling multi-error
reporting in a single pass.
Usage
use MaatLexer;
use MaatParser;
let source = "fn add(a: i64, b: i64) -> i64 { a + b }";
let lexer = new;
let mut parser = new;
let program = parser.parse;
if parser.errors.is_empty else
API Docs
Repository
github.com/maatlabs/maat. See the project README for an overview of the full compiler pipeline.