Releases: expr-lang/expr
v1.16.2
Expr is a Go-centric expression language designed to deliver dynamic configurations with unparalleled accuracy,
safety, and speed.
program, err := expr.Compile(`now() - created_at < duration("24h")`)
output, err := expr.Run(program, env)
In this release:
- Added spans (#584)
- Added support for chained comparison
1 < 2 < 3
(#581) - Improved builtin
int
: unwraps underlying int value (#611) - Improved builtin
min
,max
,sum
,mean
,median
(#580, #576) - Improved bools comparison to be without
reflect.DeepEqual
(#585) - Fixed case with
expr.Operator
passes beforeexpr.Env
caused error (#606) - Fixed
-1 not in []
expressions (#590)
Expr Editor
The Expr Editor is an embeddable code editor written in JavaScript with full support of Expr language.
Expr Pro
Expr Pro is a set of extensions for Expr for advanced use cases. It includes expressions explanation, performance profiling, and more.
v1.16.1
Expr is a Go-centric expression language designed to deliver dynamic configurations with unparalleled accuracy,
safety, and speed.
program, err := expr.Compile(`now() - created_at < duration("24h")`)
output, err := expr.Run(program, env)
In this release:
- Fixed recursive operator overloading bug (#548, #554)
- Fixed AST printing of
?.[
operator (ffaec9e) - Fixed string literal slicing error (#543)
- Compilation performance improvements (95084fb)
- Improved functions call performance (ed89647)
- Refactored
groupBy()
andsortBy()
builtins (#562) - Added operator overloading with
expr.Function()
(#408) - Added
concat()
builtin (#565) - Added
reverse()
builtin (#553) - Added
program.Locations()
method (e53cefe) - Added optional array access
array?.[42]
(#550) - Added compiler optimization for jump opcodes (#545)
- Added compiler optimization for boolean operations with
all
,any
,one
,none
functions (#555)
Expr Editor
The Expr Editor is an embeddable code editor written in JavaScript with
full support of Expr language.
Expr Pro
Expr Pro is a set of extensions for Expr for advanced use cases. It includes
expressions explanation, performance profiling, and more.
v1.16.0
Expr is a Go-centric expression language designed to deliver dynamic configurations with unparalleled accuracy, safety, and speed.
In this release:
- Improved VM speed by 5%-15% (#521)
- Improve AST printing for boolean operators
- Improved type checker (#527)
- Added option to override built-ins (#522)
- Added method to get AST tree from program:
.Node()
(#528) - Added new
Valuer
patcher (#525) - Added
expr.WarnOnAny()
option - Changed
expr.As*()
options behavior to acceptany
by default - Fixed type checker to visit all arguments of func even if arguments count mismatch
- Fixed type propagation in AST for
any
type in type checker - Fixed context patcher (#526)
- Fixed race condition in working with variables (#523)
- Fixed pipeline and call parsing
Addition
In addition to open-source version of Expr, we have an embeddable Expr Editor and Expr Pro packages.
v1.15.8
Expr is a Go-centric expression language designed to deliver dynamic configurations with unparalleled accuracy,
safety, and speed.
output, err := expr.Eval(`now() - created_at < duration("24h")`, env)
In this release
- Added builtin functions for bit operations. (#496)
- Added support for raw string literals. (#485)
`raw string`
- Fixed type checker panic on embedded pointer to struct field. (#500)
- Removed redundant fields from ast nodes. (#504) (#503)
- Improved Language Definition documentation.
Expr Editor
The Expr Editor is an embeddable code editor written in JavaScript with
full support of Expr language.
v1.15.7
Expr is a Go-centric expression language designed to deliver dynamic configurations with unparalleled accuracy, safety, and speed.
In this release:
- Fixed commutative property for comparison between a value and a pointer. (#490)
- Checker: forbid accessing built-ins and custom functions from
$env
. (#495) - Enhanced the number parser to include support for parsing hexadecimal, binary, and octal literals. (#483)
- Added
GetSource()
method tovm.Program
. (#491)
v1.15.6
v1.15.5
v1.15.4
- Improved type checking for
$env
- Added support for floats in
sort()
built-in - Fixed: AST printing for
??
operator - Fixed: only emit
OpEqual{Int,String}
for simple types - Fixed: fetch without
OpDeref
(#467) - Docs: categorize Language Definition functions (#452)
- Changed:
ast.Node
type now is not copied withast.Patch