Skip to main content

gridline_engine/engine/
mod.rs

1//! Spreadsheet engine API.
2//!
3//! This module provides the core computation engine for the spreadsheet:
4//!
5//! - [`Cell`], [`CellType`], [`Grid`] - Data structures for cell storage
6//! - [`CellRef`] - Cell reference parsing (A1 notation ↔ row/col indices)
7//! - [`detect_cycle`] - Circular dependency detection
8//! - [`extract_dependencies`] - Parse formula dependencies
9//! - [`preprocess_script`] - Transform formulas for Rhai evaluation
10//! - [`create_engine`] - Create a Rhai engine with built-in functions
11//! - [`format_dynamic`] - Format values for display
12
13mod cell;
14mod cell_ref;
15mod cycle;
16mod deps;
17mod eval;
18mod format;
19mod preprocess;
20
21pub use cell::{Cell, CellType, Grid, ValueCache};
22// Legacy exports for backward compatibility
23#[allow(unused_imports)]
24pub use cell::{ComputedMap, SpillMap};
25pub use cell_ref::CellRef;
26pub use cycle::detect_cycle;
27pub use deps::{extract_dependencies, parse_range};
28pub use eval::{
29    create_engine, create_engine_with_cache, create_engine_with_functions,
30    create_engine_with_functions_and_cache, eval_with_functions, eval_with_functions_script,
31};
32// Legacy exports for backward compatibility
33#[allow(unused_imports)]
34pub use eval::{create_engine_with_functions_and_spill, create_engine_with_spill};
35pub use format::{format_dynamic, format_number};
36pub use preprocess::{ShiftOperation, preprocess_script, preprocess_script_with_context, shift_formula_references};
37
38pub use rhai::{AST, Dynamic};