I decided to post here the changes I made in the standard fpexprpars.pp unit.
Why here, and not in gitlab? Because admins really don't like units, that have changed so much that it haven't .diff file.
Include:
fpexprpars2.pp - modified version of fpexprpars.pp.
testexprpars2.pp - modified version of testexprpars.pp (unit test).
fpexprpars.pp - last version from gitlab. For compare.
testexprpars.pp - last version from gitlab. For compare.
changes.txt - description of what has changed.
GuiTest.lpr - simple project for unit testing.
The number two is added to the name to avoid conflict with the existing name, and to be able to try different versions of the module in the same project.
In order not to annoy the admins, I left the testexprpars2.pp as similar as possible to the original version. That it 's easy for it to do .the diff file.
I rolled back some changes, for example, I returned the comparison of double values as it was - through the implicit conversion of double to currency.
And left "uninitialized variables", etc., which do not affect the result.
The unit testexprpars2.pp is compatible with the previous fpexprpars.pp version, except that new bugs are fixed in it. New features added via conditional compilation.
Some obvious bugs with memory leaks, etc. eliminated.
I decided to roll back some features from the fpexprpars2.pp unit as well:
Generating an error on numbers like ".E-1", which are considered valid zero by the System.Str function.
Advanced type conversion that allows you to perform such operations: sum(1, 2, '3', True). But added the ability to easily implement it.
I ask those who have used this unit in real projects to test it.
And also the admins should take a closer look, maybe it's include it in the source code.