ganit-core 0.4.0

Spreadsheet formula engine — parser and evaluator for Excel-compatible formulas
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use crate::eval::functions::EvalCtx;
use crate::parser::ast::Expr;
use crate::types::{ErrorKind, Value};

/// Bare LAMBDA call without immediate invocation (e.g. `=LAMBDA()` or
/// `=LAMBDA(x,x*2)` stored in a cell but not called). Returns #N/A per
/// Google Sheets / Excel semantics.
///
/// Immediately-invoked LAMBDA (`=LAMBDA(x,x*2)(5)`) is handled by
/// `eval_apply` in `eval/mod.rs` via the `Expr::Apply` AST node.
pub fn lambda_fn(args: &[Expr], _ctx: &mut EvalCtx<'_>) -> Value {
    let _ = args;
    Value::Error(ErrorKind::NA)
}

#[cfg(test)]
mod tests;