2019-03-20 13:37:07 +00:00
# Change Log
2019-03-23 14:17:09 +00:00
## Unreleased
2019-03-28 08:14:37 +00:00
### Notes
2019-08-30 07:26:37 +00:00
### Added
### Removed
### Changed
### Fixed
### Deprecated
### Contributors
2019-08-30 09:51:20 +00:00
## [5.0.3](https://github.com/ISibboI/evalexpr/compare/5.0.2...5.0.3) - 2019-08-30
### Fixed
* The `!=` operator was wrongfully parsed as Token::Eq
### Contributors
* [silentgoat ](https://github.com/slientgoat )
2019-08-30 07:58:21 +00:00
## [5.0.2](https://github.com/ISibboI/evalexpr/compare/5.0.1...5.0.2) - 2019-08-30
### Changed
* Removed target.bench.dev-dependencies completely, as they can be just listed under the normal dev-dependencies
2019-08-30 07:50:45 +00:00
## [5.0.1](https://github.com/ISibboI/evalexpr/compare/5.0.0...5.0.1) - 2019-08-30
### Fixed
* Bench dependencies are now dev-dependencies so they are not listed on crates.io as normal dependencies anymore
2019-08-30 07:26:37 +00:00
## [5.0.0](https://github.com/ISibboI/evalexpr/compare/4.1.0...5.0.0) - *'Sanity'* - 2019-08-30
### Notes
Finally, 'Sanity' has been released, including a huge bunch of new features.
Notably, and providing a reason for the name of this release, function call and tuple semantics have improved a lot.
Functions now always take exactly one argument, but this can then be a tuple.
It is now possible to construct tuples of tuples, such that mode complex values can be constructed.
As of now there is no way to deconstruct them though.
A lot has been done on string processing, special thanks for that goes to [bittrance ](https://github.com/bittrance ).
Specifically, under the feature flag `regex_support` two regex functions for strings are hiding now.
Also, the operators `+` and comparison operators have been fitted to support strings.
Thanks to [lovasoa ](https://github.com/lovasoa ), we now have a nice macro for context creation.
Thanks to [Atul9 ](https://github.com/Atul9 ), the crate is now Rust 2018 compliant.
Thanks to [mestachs' ](https://github.com/mestachs ) request, we now have functions to iterate over identifiers within an expression.
Internally, the structure of the operator tree changed from being `&dyn` -based to being `enum` -based.
Also, we have benchmarks now to observe performance changes in future releases.
2019-03-28 11:12:00 +00:00
### Added
2019-04-13 16:27:53 +00:00
* Iterator over all identifiers within an expression, including duplicates
2019-04-13 18:15:26 +00:00
* Iterators over only variable or only function identifiers within an expression, including duplicates
2019-04-13 16:27:53 +00:00
* Overload the `+` operator to concatenate strings
* Overload `<` , `<=` , `>` and `>=` for strings using lexical ordering (Note: `==` and `!=` compare strings as expected)
* Add `len` , `str::regex_matches` , `str::regex_replace` , `str::to_lowercase` , `str::to_uppercase` , `str::trim` functions for strings
2019-04-16 18:41:40 +00:00
* Add a macro for more convenient definition of contexts including the direct definition of static contexts
2019-08-29 07:02:13 +00:00
* Add API for value decomposition
2019-08-29 07:53:38 +00:00
* Allow using context operations in `eval` calls without context
2019-08-29 10:21:43 +00:00
* Operator assignment operators for each binary operation (`+=`, `-=` , ...)
2019-08-29 13:27:44 +00:00
* The `Operator` enum is now public for better error types
2019-08-29 15:43:14 +00:00
* Benchmarks for observing performance of future releases
2019-03-30 10:54:19 +00:00
2019-03-28 11:12:00 +00:00
### Removed
2019-08-29 07:02:13 +00:00
* Function arguments are not decomposed anymore.
The function implementation will receive exactly one argument now.
This allows the function to be called on a tuple properly.
2019-03-28 11:12:00 +00:00
### Changed
2019-08-29 07:02:13 +00:00
* Operators are an enum now instead of trait objects
* Update to Rust 2018
2019-08-30 07:33:42 +00:00
* Updated dependencies
2019-08-29 07:02:13 +00:00
2019-03-28 11:12:00 +00:00
### Fixed
2019-08-29 07:02:13 +00:00
* Allow variable assignments in eval calls without context.
A `HashMapContext` is created automatically now.
* The error string for `ExpectedNumber` was wrong
2019-08-29 10:35:26 +00:00
* Operators panicked when adding a number to a string
2019-08-30 07:26:37 +00:00
* Some documentation was not updated for the 4.x releases
2019-03-28 11:12:00 +00:00
2019-04-16 18:41:40 +00:00
### Contributors
My warmhearted thanks goes to
* [bittrance ](https://github.com/bittrance )
* [lovasoa ](https://github.com/lovasoa )
2019-08-30 07:26:37 +00:00
* [Atul9 ](https://github.com/Atul9 )
2019-04-16 18:41:40 +00:00
* [mestachs ](https://github.com/mestachs )
2019-04-13 16:27:53 +00:00
## [4.1.0](https://github.com/ISibboI/evalexpr/compare/4.0.0...4.1.0) - 2019-03-31
### Added
* Export `expect_function_argument_amount`
## [4.0.0](https://github.com/ISibboI/evalexpr/compare/3.1.0...4.0.0) - 2019-03-30
### Added
* String constants
2019-03-28 14:42:11 +00:00
## [3.1.0](https://github.com/ISibboI/evalexpr/compare/3.0.0...3.1.0) - 2019-03-28
### Added
* Add serde support to `HashMapContext`
2019-03-28 14:44:25 +00:00
* Make `HashMapContext` derive `Default` and `Debug`
2019-03-28 14:42:11 +00:00
### Changed
* Changed name of serde feature flag to `serde_support`
2019-03-28 11:12:00 +00:00
## [3.0.0](https://github.com/ISibboI/evalexpr/compare/2.0.0...3.0.0) - 2019-03-28
### Notes
2019-03-28 10:55:27 +00:00
The 3.0.0 update transforms the expression evaluator `evalexpr` to a tiny scripting language.
It allows assignments and chaining of expressions.
Some changes in this update are breaking, hence the major release.
2019-03-28 08:14:37 +00:00
2019-03-27 18:14:24 +00:00
### Added
2019-03-28 10:55:27 +00:00
* Methods `Node::eval_<type>_with_context_mut` and crate level `eval_<type>_with_context_mut`
* Empty type and corresponding shortcut methods. The empty type is emitted by empty expressions or empty subexpressions `()` .
* The assignment operator `=`
* The expression chaining operator `;`
2019-03-28 08:14:37 +00:00
2019-03-27 18:14:24 +00:00
### Removed
2019-03-28 08:14:37 +00:00
* Generic arguments from `Context` traits are now static to allow using trait objects of `Context`
2019-03-28 10:55:27 +00:00
* `EvalexprError::EmptyExpression` is not required anymore since empty expressions now evaluate to the empty type
2019-03-28 08:14:37 +00:00
2019-03-27 18:14:24 +00:00
### Changed
2019-03-28 08:14:37 +00:00
* Merge `ContextMut` trait into `Context` trait
2019-03-28 07:48:18 +00:00
## [2.0.0](https://github.com/ISibboI/evalexpr/compare/1.2.0...2.0.0) - 2019-03-28
2019-03-27 18:14:24 +00:00
2019-03-27 18:27:44 +00:00
### Notes
The 2.0.0 update is the first step to transform evalexpr to a tiny scripting language with support of at least variable assignment.
The main change for now is that `Configuration` is called `Context` , which seems to be a more proper naming for a set of variables that can not only be read, but also manipulated via expressions.
This update includes further renamings and some inconsistencies in the API were fixed.
For more details, see the following subsections.
2019-03-23 14:17:09 +00:00
### Added
2019-03-27 17:09:20 +00:00
* Add the `ContextMut` trait, that is a manipulable configuration/context
2019-03-27 16:53:01 +00:00
* Add `ContextNotManipulable` error variant for the `EmptyContext`
2019-03-27 17:19:05 +00:00
* Make the `TupleType` alias public
* Add the `ValueType` enum that represents the type of a value for easier comparisons and matchings
* Add `EvalexprResult<T>` type that uses the `EvalexprError` type (renamed from `Error` )
2019-03-27 17:54:45 +00:00
* Add `Node::eval_number` and `Node::eval_number_with_context` to evaluate to int or float and silently converting to float
2019-03-27 17:59:06 +00:00
* Add `eval_number` and `eval_number_with_context` crate methods to evaluate to int or float and silently converting to float
2019-03-27 16:53:01 +00:00
2019-03-23 14:17:09 +00:00
### Changed
2019-03-27 15:19:56 +00:00
* Get rid of some unwraps to improve safety
2019-03-27 17:19:05 +00:00
* Rename `Error` to `EvalexprError`
2019-03-27 17:09:20 +00:00
* Rename `Configuration` to `Context`
2019-03-27 16:53:01 +00:00
* Rename `HashMapConfiguration` to `HashMapContext` and `EmptyConfiguration` to `EmptyContext`
2019-03-27 17:45:33 +00:00
* Rename `Value::as_float` to `Value::as_number` and add new `Value::as_float` that fails if value is an integer
2019-03-27 15:19:56 +00:00
2019-03-23 14:15:48 +00:00
## [1.2.0](https://github.com/ISibboI/evalexpr/compare/1.1.0...1.2.0) - 2019-03-23
2019-03-21 10:45:58 +00:00
2019-03-20 15:43:06 +00:00
### Added
2019-03-23 10:46:52 +00:00
* Add `serde` feature
2019-03-23 13:20:43 +00:00
* Implement `serde::de::Deserialize` for `Node`
* Document `serde` usage
2019-03-23 13:30:54 +00:00
* Add custom error type with a `String` message
2019-03-23 10:46:52 +00:00
2019-03-20 15:43:06 +00:00
### Changed
2019-03-23 14:15:48 +00:00
* Highlighting in documentation
2019-03-20 15:43:06 +00:00
## [1.1.0](https://github.com/ISibboI/evalexpr/compare/1.0.0...1.1.0) - 2019-03-20
2019-03-20 13:37:07 +00:00
### Added
2019-03-20 15:09:16 +00:00
* Internal aliases `IntType` and `FloatType` used by the `Value` enum are now public
2019-03-20 14:39:27 +00:00
* Type alias `TupleType` used to represent tuples was added
2019-03-20 15:09:16 +00:00
* Error types like `Error::ExpectedInt` for expecting each value type were added
* Shortcut functions like `eval_int` or `eval_int_with_configuration` to evaluate directly into a value type were added
* Documentation for the shortcut functions was added
2019-03-20 15:43:06 +00:00
* Functions to decompose `Value` s were added and documented
2019-03-20 14:18:52 +00:00
2019-03-20 13:37:07 +00:00
### Removed
2019-03-20 14:39:27 +00:00
* Integration tests were removed from shipped crate
2019-03-20 13:47:33 +00:00
2019-03-20 13:37:07 +00:00
### Fixed
2019-03-20 14:39:27 +00:00
* Wording of some documentation items was changed to improve readability
2019-03-20 13:37:07 +00:00
## [1.0.0](https://github.com/ISibboI/evalexpr/tree/1.0.0) - 2019-03-20
* First stable release