Repository navigation
v0.20.0
This version adds string interpolation with `... ${ ... } ...` syntax.
switch statement cases can now have conditions.
Negative indices for arrays and strings are allowed and now count from the end (-1 = last item/character).
Version 0.20.0 released to crates.io.
Bug fixes
- Property setter op-assignments now work properly.
- Off-by-one bug in
Array::drainmethod with range is fixed.
Breaking changes
- Negative index to an array or string yields the appropriate element/character counting from the end.
- The default
_case of aswitchstatement now must be the last case, together with two new error variants:EvalAltResult::WrongSwitchDefaultCaseandEvalAltResult::WrongSwitchCaseCondition. ModuleResolvertrait methods take an additional parametersource_paththat contains the path of the current environment. This is to facilitate loading other script files always from the current directory.FileModuleResolvernow resolves relative paths under the source path if there is no base path set.FileModuleResolver::base_pathnow returnsOption<&str>which isNoneif there is no base path set.- Doc-comments now require the
metadatafeature.
Enhancements
Array::drainandArray::retainmethods with predicate now scan the array in forward order instead of in reverse.
New features
- String interpolation support is added via the
`... ${...} ...`syntax. FileModuleResolverresolves relative paths under the parent path (i.e. the path holding the script that does the loading). This allows seamless cross-loading of scripts from a directory hierarchy instead of having all relative paths load from the current working directory.- Negative index to an array or string yields the appropriate element/character counting from the end.
switchstatement cases can now have an optionalifclause.