ccalc_engine/lib.rs
1//! # ccalc-engine
2//!
3//! Core computation engine for [`ccalc`](https://github.com/holgertkey/ccalc).
4//!
5//! This crate provides the language pipeline:
6//!
7//! ```text
8//! input string
9//! └─► tokenizer (parser::tokenize)
10//! └─► recursive-descent parser (parser::parse) → Stmt AST
11//! └─► evaluator (eval::eval) → Value
12//! ```
13//!
14//! ## Modules
15//!
16//! - [`mod@env`] — [`Env`](env::Env) type, [`Value`](env::Value) enum, workspace save/load
17//! - [`eval`] — AST types, evaluator, number formatters, [`Base`](eval::Base)
18//! - [`parser`] — tokenizer and recursive-descent parser, [`Stmt`](parser::Stmt)
19//! - [`exec`] — block/loop/function executor, script search path
20//! - [`io`] — file descriptor table for `fopen`/`fclose`/`fgetl`/`fprintf`
21
22#![warn(missing_docs)]
23
24/// Variable environment, [`Value`](env::Value) type, and workspace persistence.
25pub mod env;
26
27/// AST node types ([`Expr`](eval::Expr), [`Op`](eval::Op)), evaluator, and number formatters.
28pub mod eval;
29
30/// Block statement executor: loops, functions, `run`/`source`, search path management.
31pub mod exec;
32
33/// File I/O context ([`IoContext`](io::IoContext)) for the REPL session.
34pub mod io;
35
36/// Tokenizer, recursive-descent parser, and [`Stmt`](parser::Stmt) AST.
37pub mod parser;
38
39#[cfg(feature = "json")]
40pub(crate) mod json;
41
42#[cfg(feature = "mat")]
43pub(crate) mod mat;