|
12 | 12 | <email>anton@phalcon.io</email> |
13 | 13 | <active>yes</active> |
14 | 14 | </lead> |
15 | | - <date>2026-06-01</date> |
| 15 | + <date>2026-06-04</date> |
16 | 16 | <time>10:00:00</time> |
17 | 17 | <version> |
18 | | - <release>2.0.3</release> |
19 | | - <api>2.0.3</api> |
| 18 | + <release>2.0.4</release> |
| 19 | + <api>2.0.4</api> |
20 | 20 | </version> |
21 | 21 | <stability> |
22 | 22 | <release>stable</release> |
23 | 23 | <api>stable</api> |
24 | 24 | </stability> |
25 | 25 | <license uri="https://github.com/zephir-lang/php-zephir-parser/blob/development/LICENSE">MIT</license> |
26 | 26 | <notes> |
27 | | - Mon, Jun 01, 2026 - Zephir Parser 2.0.3 |
| 27 | + Thu, Jun 04, 2026 - Zephir Parser 2.0.4 |
28 | 28 |
|
29 | 29 | = Fixed: |
30 | 30 |
|
31 | | - - `instanceof` now binds tighter than logical not, matching PHP: |
32 | | - `!a instanceof b` parses as `!(a instanceof b)` instead of |
33 | | - `(!a) instanceof b`. |
| 31 | + - A `-` glued to a digit right after a value (e.g. `len-1`, `5-1`, |
| 32 | + `arr[0]-1`, `len -1`) is now scanned as the binary subtraction |
| 33 | + operator instead of the sign of a negative literal, which previously |
| 34 | + produced a `Syntax error`. Unary negative literals (after `=`, `(`, |
| 35 | + `,`, `return`, etc.) are unchanged, so parameter defaults, constants |
| 36 | + and array keys keep their negative-literal AST. |
34 | 37 | </notes> |
35 | 38 | <contents> |
36 | 39 | <dir name="/"> |
|
169 | 172 | </dir> |
170 | 173 |
|
171 | 174 | <file name="and.phpt" role="test"/> |
| 175 | + <file name="arithmetic-unspaced.phpt" role="test"/> |
172 | 176 | <file name="bitwise.phpt" role="test"/> |
173 | 177 | <file name="bug89.phpt" role="test"/> |
174 | 178 | <file name="cast-numeric-types.phpt" role="test"/> |
|
209 | 213 | <file name="special.phpt" role="test"/> |
210 | 214 | <file name="static-constant-access.phpt" role="test"/> |
211 | 215 | <file name="static-property-access.phpt" role="test"/> |
| 216 | + <file name="sub-unspaced.phpt" role="test"/> |
212 | 217 | <file name="sub.phpt" role="test"/> |
213 | 218 | <file name="ternary.phpt" role="test"/> |
214 | 219 | </dir> |
|
0 commit comments