LSL-PyOptimizer/lslopt
Sei Lisa d70c914738 Fix wrong output leading to incorrect tokenization of minus signs
When the tree has a unary minus node (NEG) whose child is a product node (*), and the left operand of the product node starts with a minus sign but is not a NEG node, this produced at least two minus signs in sequence without any spaces.

Normally, OptSigns hides this problem, but when it is disabled, or when the left factor is a pre-decrement (--V) node, the problem is visible.

Fix by creating a function that detects all kinds of leading minus signs, and use it in place of the comparison with NEG.

Fixes #31. Reported by @KrsityKu, who also provided a repro.
2024-05-24 23:55:23 +02:00
..
__init__.py Initial commit. Status so far: 2014-07-26 02:43:44 +02:00
lslbasefuncs.py Join InternalListFindList loops into one 2024-04-28 11:06:59 +02:00
lslcommon.py New copyright year 2024-04-14 11:40:21 +02:00
lsldeadcode.py Fix invocation of PythonType2LSL 2024-05-24 20:28:26 +02:00
lslextrafuncs.py Update to kwdb 0.0.20240415000 2024-04-15 16:15:56 +02:00
lslfoldconst.py Further generalize the < operator 2024-05-11 18:32:27 +02:00
lslfuncopt.py Add getMin() and getMax(), which can detect constants 2024-05-07 00:35:47 +02:00
lslfuncs.py New copyright year 2024-04-14 11:40:21 +02:00
lslinliner.py New copyright year 2024-04-14 11:40:21 +02:00
lsljson.py New copyright year 2024-04-14 11:40:21 +02:00
lsllastpass.py New copyright year 2024-04-14 11:40:21 +02:00
lslloadlib.py New copyright year 2024-04-14 11:40:21 +02:00
lsloptimizer.py New copyright year 2024-04-14 11:40:21 +02:00
lsloutput.py Fix wrong output leading to incorrect tokenization of minus signs 2024-05-24 23:55:23 +02:00
lslparse.py New copyright year 2024-04-14 11:40:21 +02:00
lslrenamer.py New copyright year 2024-04-14 11:40:21 +02:00