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