v1.8.0
This version includes a number of usability improvements, especially the Elvis operator ?. and null-coalescing operator ??.
Bug fixes
- Self-contained
ASTnow works properly withEngine::call_fn. - Missing
to_intfromDecimalis added. - Parsing of index expressions is relaxed and many cases no longer result in an index-type error to allow for custom indexers. Closes #562
- Merging or combining a self-contained
ASTinto anotherASTnow works properly. - Plugin modules/functions no longer generate errors under
#![deny(missing_docs)]. - Calling a property on a function call that returns a shared value no longer causes an error. Closes #573
- Strict Variables Mode now checks for module namespaces within functions as well. Closes #574
- Module defined via
Engine::register_static_moduleare now checked in Strict Variables Mode.
Reserved Symbols
?,??,?.,?[and!.are now reserved symbols.
Deprecated API's
FnPtr::num_curriedis deprecated in favor ofFnPtr::curry().len().
New features
- The Elvis operators (
?.and?[) are now supported for property access, method calls and indexing. - The null-coalescing operator (
??) is now supported to short-circuit()values.
Enhancements
- Indexing and property access are now faster.
EvalAltResult::IndexNotFoundis added to aid in raising errors for indexers.Engine::default_tag,Engine::default_tag_mutandEngine::set_default_tagare added to manage a default value for the custom evaluation state, accessible viaEvalState::tag()(which is the same asNativeCallContext::tag()). Closes #563- Originally, the debugger's custom state uses the same state as
EvalState::tag()(which is the same asNativeCallContext::tag()). It is now split into its own variable accessible underDebugger::state(). - Non-borrowed string keys can now be deserialized for object maps via
serde. Scope::getis added to get a reference to a variable's value.- Variable resolvers can now return a shared value which can be mutated.