# Repository Guidelines
This repository contains `pyisheval`, a Rust library for evaluating a Python-like expression subset. Use this guide when contributing changes or adding features.
## Project Structure & Module Organization
- `src/lib.rs` exposes the public API (`Interpreter`, `Value`) and holds unit tests under `#[cfg(test)]`.
- `src/ast.rs` defines the AST types used by the parser and evaluator.
- `src/parser.rs` contains the `nom`-based parser and syntax rules.
- `src/eval.rs` implements evaluation logic and built-in functions.
- `examples/example.rs` shows end-to-end usage with `cargo run --example example`.
- `Cargo.toml` tracks metadata and dependencies; `target/` is build output.
## Build, Test, and Development Commands
- `cargo build` compiles the library.
- `cargo check` runs a fast type check without producing binaries.
- `cargo test` runs unit tests in `src/lib.rs`.
- `cargo run --example example` executes the bundled example program.
## Coding Style & Naming Conventions
- Use Rust 2021 and standard `rustfmt` defaults (4-space indentation, trailing commas).
- Module and function names use `snake_case`; public types use `PascalCase` (e.g., `Interpreter`).
- Keep parser and evaluator changes localized to `src/parser.rs` and `src/eval.rs` when possible.
- Add concise comments only for non-obvious logic, especially around parsing rules or precedence.
## Testing Guidelines
- Tests use the built-in Rust test harness with `#[test]` functions.
- Add new tests in the `#[cfg(test)]` module in `src/lib.rs` unless a new module is warranted.
- Prefer `assert_eq!` for value checks and `matches!` for error cases.
- No coverage threshold is enforced; aim to cover new syntax, edge cases, and error reporting.
## Commit & Pull Request Guidelines
- Recent history shows short, descriptive commit messages and version tags like `v0.13.0`.
- Keep commits focused and include a clear summary (optionally with an issue/PR number).
- PRs should describe the behavior change, list new tests, and include examples of new expressions or outputs.
## Security & Configuration Tips
- This library evaluates user-provided expressions; document any new built-ins or syntax that affect evaluation behavior.
- Avoid introducing filesystem or network access in evaluation logic unless explicitly scoped and documented.