Skip to main content

zshrs_parse/
lib.rs

1//! `zshrs-parse` — lexer + parser for zshrs.
2//!
3//! Direct port of zsh's `Src/lex.c` and `Src/parse.c`. Locked to the C
4//! source via `tests/lexer_parity.rs` (byte-equal token streams against
5//! `Src/Modules/zshrs_dump.c`'s `dumptokens` builtin) and
6//! `tests/parity_harness.rs` (byte-equal AST sexp against `.zwc` decode).
7//!
8//! Shared between:
9//! - `zshrs` (the runtime crate) — re-exports as `zsh::tokens`, `zsh::lexer`,
10//!   `zsh::parser` so existing call sites resolve unchanged.
11//! - `zshrs-daemon` — uses for static `.zshrc` analysis (catalog hydration,
12//!   plugin walk, source-following). The daemon's older `zsh_lexer.rs` /
13//!   `zsh_parser.rs` are partial reimplementations slated for replacement
14//!   by this crate once parity is proved on the daemon's call sites.
15
16#![allow(dead_code)]
17#![allow(unused_variables)]
18#![allow(unused_imports)]
19#![allow(unused_assignments)]
20#![allow(unreachable_patterns)]
21
22pub mod lexer;
23pub mod parser;
24pub mod tokens;