Changelog
View SourceAll notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
[Unreleased]
0.2.1 - 2026-07-12
Changed
- Relaxed
decimaldependency to~> 2.0 or ~> 3.0
0.2.0 - 2026-07-12
Added
- Unary minus operator (
-x,-(1 + 2)) - Modulo operator (
%) with*-level precedence nullliteral with equality comparisons tonulland nil variables- String ordering comparisons (
<,>,<=,>=) for string operands - Short-circuit evaluation for
and,or, andif(condition, a, b) - Math functions:
abs,pow,mod,clamp,between - Variadic
minandmax(two or more arguments) - String functions:
concat,length,contains,starts_with,ends_with,lower,upper,trim coalescefunction (variadic; returns the first non-null argument)- Hexdocs guides: Getting Started, Expression Language, Functions, Ash Integration, and Advanced Topics
Changed
mod(a, b)now uses floored modulo (sign follows the divisor), distinct fromrem(a, b)and%between(x, low, high)returns an error whenlow > high, matchingclamp/3
0.1.0 - 2025-07-12
Changed
Elex.evaluate/2returns{:error, reason}for all evaluation failures, including division by zeroElex.Inverter.invert/2returns{:ok, ast}or{:error, reason}instead of raising- Updated
decimaldependency to~> 3.1andashto~> 3.22
Added
- Expression parsing, type validation, and evaluation with
Decimalarithmetic - Arithmetic, comparison, and logical operators
- Built-in functions:
ceil,floor,if,max,min,pi,rem,round,sqrt - Variable substitution and variable extraction from expressions
- Expression inversion for simple single-variable arithmetic
- Optional Ash resource validation via
Elex.AshValidation Elex.Functionbehaviour for custom functions