Skip to content

v.0.19.12

Compare
Choose a tag to compare
@schungx schungx released this 17 Feb 08:51
c943e22

This version is an incremental release with a number of enhancements and bug fixes.

Notice that there are a number of breaking changes, especially with regards to replacing the ~ exponential operator with **, and the addition of the decimal feature that turns on Decimal support.

Version 0.19.12 released to crates.io.

Bug fixes

  • Empty statements (i.e. statements with only one ;) now parse correctly and no longer hang.
  • continue, break and return statements no longer panic inside a try .. catch block.
  • round function for f64 is now implemented correctly.

Breaking changes

  • In order to be consistent with other scripting languages:
    • the power/exponentiation operator is changed from ~ to **; ~ is now a reserved symbol
    • the power/exponentiation operator now binds to the right
    • trigonometry functions now take radians and return radians instead of degrees
  • Dynamic::into_shared is no longer available under no_closure. It used to panic.
  • Token::is_operator is renamed to Token::is_symbol.
  • AST::clone_functions_only_filtered, AST::merge_filtered, AST::combine_filtered and AST::retain_functions now take Fn instead of FnMut as the filter predicate.

New features

  • Scientific notation is supported for floating-point number literals.
  • A new feature, decimal, enables the Decimal data type. When both no_float and decimal features are enabled, floating-point literals parse to Decimal.

Enhancements

  • Functions resolution cache is used in more cases, making repeated function calls faster.
  • Added atan(x, y) and hypot(x, y) to BasicMathPackage.
  • Added standard arithmetic operators between FLOAT/Decimal and INT.