Skip to content

v3.0.0

Compare
Choose a tag to compare
@yallie yallie released this 22 Dec 16:43
· 319 commits to master since this release

Several syntax changes to the grammar:

While these changes in themselves wouldn't introduce compatibility issues with previously valid statements, code that relies on statements with these constructs being invalid would be affected. The grammar also had to be regenerated with a new version of ANTLR with some fixes to it since it was clear that the generated source code had been modified manually. Manual review indicates that the regenerated grammar is identical, but because of both these reasons this is released as a new major version.

  • Bugfix: invalid tokens were skipped silently without any errors. Expressions like "4711" would ignore the " (since that is not the string character in the NCalc syntax) and parse it as the number 4711, but now an EvaluationException is thrown as for other syntax issues. This may affect existing expressions, but since they were always incorrect and now give an exception rather than silently getting a new value it does not merit a new major release.
  • Major bugfix: long integers are now treated as integers. Previous versions converted them to single-precision floats, which caused data loss on large numbers. Since this affects the results of existing expressions, it requires a new major release.
  • New builtin function Ln()

Credits

  • @petli — grammar improvements and most of bugfixes.
  • @Andree2 — Ln() function implementation.
  • @murksa — bugfix related to decimal/float division.
  • @martinxw — bugfix related to comparisons.