|
3 | 3 | ## 6.0.0 |
4 | 4 |
|
5 | 5 | ### Features |
6 | | -* (TODO) Add support for boolean expressions everywhere |
| 6 | +* Add support for boolean expressions everywhere |
7 | 7 | * As variable output `{{ a or b }}` |
8 | 8 | * As filter argument `{{ collection | where: 'prop', a or b }}` |
9 | 9 | * As tag argument `{% render 'snip', enabled: a or b %}` |
10 | 10 | * As conditional tag argument `{% if cond %}` (extending previous behaviour) |
11 | | -* (TODO) Add support for subexpression prioritization and associativity |
| 11 | +* Add support for subexpression prioritization and associativity |
12 | 12 | * In ascending order of priority: |
13 | 13 | * Logical: `and`, `or` (right to left) |
14 | 14 | * Equality: `==`, `!=`, `<>` (left to right) |
15 | 15 | * Comparison: `>`, `>=`, `<`, `<=`, `contains` (left to right) |
| 16 | + * Groupings: `( expr )` |
16 | 17 | - For example, this is now supported |
17 | 18 | * `{{ a > b == c < d or e == f }}` which is equivalent to |
18 | 19 | * `{{ ((a > b) == (c < d)) or (e == f) }}` |
19 | | -- (TODO) Add support for parenthesized expressions |
20 | | - * e.g. `(a or b) and c` |
| 20 | +- Add support for parenthesized expressions |
| 21 | + * e.g. `(a or b) == c` |
21 | 22 |
|
22 | 23 | ### Architectural changes |
23 | 24 | * `parse_expression` and `safe_parse_expression` have been removed from `Tag` and `ParseContext` |
|
32 | 33 | * `:lax` and `lax_parse` is no longer supported |
33 | 34 | * `:strict` and `strict_parse` is no longer supported |
34 | 35 | * `strict2_parse` is renamed to `parse_markup` |
35 | | -* The `warnings` system has been removed. |
36 | | -* `Parser#expression` is renamed to `Parser#expression_string` |
37 | | -* `safe_parse_expression` methods are replaced by `Parser#expression` |
38 | | -* `parse_expression` methods are replaced by `Parser#unsafe_parse_expression` |
| 36 | +* Expressions |
| 37 | + * The `warnings` system has been removed. |
| 38 | + * `Parser#expression` is renamed to `Parser#expression_string` |
| 39 | + * `safe_parse_expression` methods are replaced by `Parser#expression` |
| 40 | + * `parse_expression` methods are replaced by `Parser#unsafe_parse_expression` |
| 41 | +* `Condition` |
| 42 | + * `new(expr)` no longer accepts an `op` or `right`. Logic moved to BinaryExpression. |
| 43 | + * `Condition#or` and `Condition#and` were replaced by `BinaryExpression`. |
| 44 | + * `Condition#child_relation` replaced by `BinaryExpression`. |
| 45 | + * `Condition.operations` was removed. |
| 46 | + * `Condtion::MethodLiteral` was moved to the `Liquid` namespace |
39 | 47 |
|
40 | 48 | ### Migrating from `^5.11.0` |
41 | 49 | - In custom tags that include `ParserSwitching`, rename `strict2_parse` to `parse_markup` |
|
0 commit comments