Expand description
Combinator-based parser powered by winnow, with Pratt-style operator
precedence for expressions.
Tokens produced by the MaatLexer are collected into a flat slice, then parsed
via winnow stream operations. Statement dispatch uses a two-token
lookahead match; expression parsing uses a manual Pratt loop that delegates
to winnow for individual token consumption.
§Example
use maat_lexer::MaatLexer;
use maat_parser::MaatParser;
let input = "let x = 5 + 10;";
let lexer = MaatLexer::new(input);
let mut parser = MaatParser::new(lexer);
let program = parser.parse();
assert_eq!(parser.errors().len(), 0);
assert_eq!(program.statements.len(), 1);Modules§
- reserved
- Reserved identifiers and type names. Reserved identifiers and type names for Maat.
Structs§
- Maat
Parser - A combinator-based parser that builds an AST from a token stream.