- F14: compile(source) separated from evaluation so an expression can be
parsed once and evaluated many times
- F15: register user-defined C++ functions callable from expressions,
replacing the hardcoded method dispatch with a named registry
- Q1: remove redundant if-else in the eval_expr Binary case
- Q2: remove duplicate text assignment for the AtIdent token
- Q3: add break after the [[noreturn]] error() call to silence
fallthrough warnings
- Q9: convert all lexer runtime_error throws to ParseError carrying a
source location, matching the parser
- Q10: .empty on numbers returns false instead of null
- B1: malformed scientific notation (1e+, 1e-) no longer silently eats
the following operator
- B2: && and || now consistently return booleans on every path (C-style
semantics), instead of leaking the raw operand on the non-short-circuit
path
- B3: example main.cpp passes the populated context instead of an empty
object
- B4: give Expr::kind a default initializer to avoid reading an
uninitialized enum
- S4: add isfinite checks after all arithmetic ops (Add, Sub, Mul, Div,
Pow, Neg) so NaN/Infinity can never enter JSON output
- S5: fix is_integral_number INT64_MAX boundary check to eliminate
undefined behaviour from double rounding
- S6: cap string concatenation result at MAX_STRING_SIZE (1MB)
- S7: add optional max_source_length parameter to test/eval_val/eval_true
- S8: catch std::out_of_range in lexNumber() and report a descriptive
ParseError instead of a bare 'stod' message
- Cap string repeat to MAX_STRING_SIZE (1MB) to prevent DoS via integer overflow
- Consolidate duplicated string*number/number*string repeat blocks into helper
- Add parser depth counter (limit 512) to prevent stack overflow from nested parens/unary chains
- Add evaluator depth counter (limit 512) to prevent stack overflow during eval
- Add EvalError type for evaluation-time errors
- Add test cases for all security fixes