Archived
19 lines
560 B
Rust
19 lines
560 B
Rust
//! el-parser — Engram language recursive-descent parser.
|
|
//!
|
|
//! Converts a flat token stream into a typed [`Program`] AST.
|
|
//!
|
|
//! # Design
|
|
//! Hand-written recursive descent — no parser generator. Every parse function
|
|
//! returns `Result<T, ParseError>`, making the error path explicit.
|
|
|
|
mod ast;
|
|
mod error;
|
|
mod parser;
|
|
|
|
pub use ast::{
|
|
BinOp, Decorator, Expr, Field, Literal, MatchArm, Param, Pattern, Program, ProtocolMethod,
|
|
SeedStmt, Stmt, TestTarget, TypeExpr, Variant,
|
|
};
|
|
pub use error::{ParseError, ParseErrorKind};
|
|
pub use parser::parse;
|