Changelog History
Page 3
-
v1.0.5 Changes
๐ Bug fixes
FloatWrapper
is no longer erroneously exported underno_float+internals
.- The
sign
function now works properly for float values that areNaN
.
-
v1.0.4 Changes
- ๐ Fixed bug with
catch
variable used incatch
block.
- ๐ Fixed bug with
-
v1.0.2 Changes
๐ Bug fixes
- ๐ Fixed bug in method call followed by an array indexing.
-
v1.0.1 Changes
๐ Bug fixes
- ๐ Fixed bug in using indexing/dotting inside index bracket.
while
andloop
statements are no longer considered pure (since a loop can go on forever and this is a side effect).
-
v1.0.0 Changes
The official version
1.0
.๐ Almost the same version as
0.20.3
but with deprecated API's removed.๐ Bug fixes
- ๐ Fixed infinite loop in certain script optimizations.
- ๐ Building for
no-std
no longer requires patchingsmartstring
. - ๐ Parsing a lone
return
orthrow
without a semicolon at the end of a block no longer raises an error.
๐ฅ Breaking changes
- ๐ All deprecated API's (e.g. the
RegisterFn
andRegisterResultFn
traits) are removed. Module::set_id
is split intoModule::set_id
andModule::clear_id
pair.begin
,end
,each
,then
,unless
are no longer reserved keywords.
โจ Enhancements
- New methods
is_odd
,is_even
for integers, andis_zero
for all numbers. From<BTreeSet>
andFrom<HashSet>
are added forDynamic
, which create object maps with()
values.
-
v0.20.3 Changes
๐ This version adds support to index into an integer number, treating it as a bit-field.
๐ Bug fixes
- ๐ Fixed incorrect optimization regarding chain-indexing with non-numeric index.
- Variable values are checked for over-sized violations after assignments and setters.
๐ฅ Breaking changes
- 0๏ธโฃ To keep the API consistent, strings are no longer iterable by default. Use the
chars
method to iterate through the characters in a string. Dynamic::take_string
andDynamic::take_immutable_string
are renamed toDynamic::as_string
andDynamic::as_immutable_string
respectively.
๐ New features
- ๐ New syntax for
for
statement to include counter variable. - An integer value can now be indexed to get/set a single bit.
- The
bits
method of an integer can be used to iterate through its bits. - ๐ New
$bool$
,$int$
,$float$
and$string$
expression types for custom syntax. - New methods
to_hex
,to_octal
andto_binary
for integer numbers. - New methods
to_upper
,to_lower
,make_upper
,make_lower
for strings/characters.
-
v0.20.2 Changes
This version adds a number of convenience features:
๐ท Ability for a
Dynamic
to hold ani32
tag of arbitrary dataSimplifies dynamic properties access by falling back to an indexer (passing the name of the property as a string) when a property is not found.
๐ Bug fixes
- Propagation of constants held in a custom scope now works properly instead of always replacing by
()
.
๐ฅ Breaking changes
Engine::disable_doc_comments
is removed because doc-comments are now placed under themetadata
feature flag.- ๐ Registering a custom syntax now only requires specifying whether the
Scope
is adjusted (i.e. whether variables are added or removed). There is no need to specify the number of variables added/removed. - ๐ Assigning to a property of a constant is now allowed and no longer raise an
EvalAltResult::ErrorAssignmentToConstant
error. This is to facilitate the Singleton pattern. Registered setter functions are automatically guarded against setters calling on constants and will continue to raise errors unless thepure
attribute is present (for plugins). - If a property getter/setter is not found, an indexer with string index, if any, is tried.
- The indexers API (
Engine::register_indexer_XXX
andModule::set_indexer_XXX
) are now also exposed underno_index
.
๐ New features
- ๐ท Each
Dynamic
value can now contain arbitrary data (typei32
) in the form of a tag. This is to use up otherwise wasted space in theDynamic
type. - A new internal feature
no_smartstring
to turn offSmartString
for those rare cases that it is needed. DynamicReadLock
andDynamicWriteLoc
are exposed underinternals
.- ๐
From< Shared< Locked<Dynamic> > >
is added forDynamic
mapping directly to a shared value, together with support forDynamic::from
. - An indexer with string index acts as a fallback to a property getter/setter.
โจ Enhancements
- ๐ Registering a custom syntax now only requires specifying whether the
Scope
is adjusted (i.e. whether variables are added or removed). This allows more flexibility for cases where the number of new variables declared depends on internal logic. - ๐ Putting a
pure
attribute on a plugin property/index setter now enables it to be used on constants.
-
v0.20.1 Changes
This version enables functions to access constants declared at global level via the special
global
module.๐ Bug fixes
- ๐ Fixed bug when position is zero in
insert
andsplit_at
methods for arrays. - Indexing operations with pure index values are no longer considered pure due to the possibility of indexers.
๐ฅ Breaking changes
Dynamic::is_shared
andDynamic::is_locked
are removed under theno_closure
feature. They used to always returnfalse
.Engine::call_fn
now evaluates theAST
before calling the function.Engine::on_progress
is disabled withunchecked
.
โจ Enhancements
- The crate
no-std-compat
is used to compile forno-std
. This removes the need to use a specialcrate::stdlib
namespace forstd
imports.
๐ New features
- A module called
global
is automatically created to hold global-level constants, which can then be accessed from functions. - ๐ A new feature
no_position
is added to turn off position tracking during parsing to squeeze out the last drop of performance.
- ๐ Fixed bug when position is zero in
-
v0.20.0 Changes
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).
๐ Bug fixes
- Property setter op-assignments now work properly.
- ๐ Off-by-one bug in
Array::drain
method with range is fixed.
๐ฅ Breaking changes
- Negative index to an array or string yields the appropriate element/character counting from the end.
- 0๏ธโฃ The default
_
case of aswitch
statement now must be the last case, together with two new error variants:EvalAltResult::WrongSwitchDefaultCase
andEvalAltResult::WrongSwitchCaseCondition
. ModuleResolver
trait methods take an additional parametersource_path
that contains the path of the current environment. This is to facilitate loading other script files always from the current directory.FileModuleResolver
now resolves relative paths under the source path if there is no base path set.FileModuleResolver::base_path
now returnsOption<&str>
which isNone
if there is no base path set.- ๐ Doc-comments now require the
metadata
feature.
โจ Enhancements
Array::drain
andArray::retain
methods with predicate now scan the array in forward order instead of in reverse.
๐ New features
- ๐ String interpolation support is added via the
`... ${
...} ...`
syntax. FileModuleResolver
resolves 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.
switch
statement cases can now have an optionalif
clause.
-
v0.19.16 Changes
This version adds string interpolation with
`... ${
...} ...`
syntax.Negative indices for arrays and strings are allowed and now count from the end (-1 = last item/character).
๐ Bug fixes
- Property setter op-assignments now work properly.
- ๐ Off-by-one bug in
Array::drain
method with range is fixed.
๐ฅ Breaking changes
- Negative index to an array or string yields the appropriate element/character counting from the end.
ModuleResolver
trait methods take an additional parametersource_path
that contains the path of the current environment. This is to facilitate loading other script files always from the current directory.FileModuleResolver
now resolves relative paths under the source path if there is no base path set.FileModuleResolver::base_path
now returnsOption<&str>
which isNone
if there is no base path set.- ๐ Doc-comments now require the
metadata
feature.
โจ Enhancements
Array::drain
andArray::retain
methods with predicate now scan the array in forward order instead of in reverse.
๐ New features
- ๐ String interpolation support is added via the
`... ${
...} ...`
syntax. FileModuleResolver
resolves 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.