Repository navigation
v.0.19.13
This version introduces functions with Dynamic parameters acting as wildcards.
Version 0.19.13 released to crates.io.
Bug fixes
- Bug in
Position::is_beginning_of_lineis fixed.
Breaking changes
- For plugin functions, constants passed to methods (i.e.
&mutparameter) now raise an error unless the functions are marked with#[rhai_fn(pure)]. - Visibility (i.e.
pubor not) for generated plugin modules now follow the visibility of the underlying module. - Comparison operators between the sames types or different numeric types now throw errors when they're not defined instead of returning the default. Only comparing between different types will return the default.
- Default stack-overflow and top-level expression nesting limits for release builds are lowered to 64 from 128.
Engine::call_fn_dynamictakes an additional parameter to optionally evaluate the givenASTbefore calling the function.
New features
- Functions are now allowed to have
Dynamicarguments. #[rhai_fn(pure)]attribute to mark a plugin function with&mutparameter as pure so constants can be passed to it. Without it, passing a constant value into the&mutparameter will now raise an error.
Enhancements
- Built-in operators between
FLOAT/DecimalandINTare now implemented for more speed under those cases. - Error position in
evalstatements is now wrapped in anEvalAltResult::ErrorInFunctionCall. Positionnow implementsAddandAddAssign.Scopenow implementsIntoIterator.- Strings now have the
-/-=operators and theremovemethod to delete a sub-string/character. - Strings now have the
split_revmethod and variations ofsplitwith maximum number of segments. - Arrays now have the
splitmethod. - Comparisons between
FLOAT/DecimalandINTare now built in. - Comparisons between string and
charare now built in. Engine::call_fn_dynamiccan now optionally evaluate the givenASTbefore calling the function.