From d07442da9f4643206b7521e7a4e7dd1f6e401328 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Sat, 7 Feb 2026 09:26:41 +0100 Subject: [PATCH] Fix wrong merge --- doc/operators_precedence.rst | 114 +---------------------------------- 1 file changed, 2 insertions(+), 112 deletions(-) diff --git a/doc/operators_precedence.rst b/doc/operators_precedence.rst index 2400c181c..7333440ff 100644 --- a/doc/operators_precedence.rst +++ b/doc/operators_precedence.rst @@ -4,113 +4,6 @@ +============+==================+=========+===============+===================================================================+ | 512 | ``...`` | prefix | n/a | Spread operator | +------------+------------------+---------+---------------+-------------------------------------------------------------------+ -<<<<<<< HEAD -======= -| => 300 | ``|`` | infix | Left | Twig filter call | -+------------+------------------+---------+---------------+-------------------------------------------------------------------+ -| | ``(`` | | | Twig function call | -+------------+------------------+---------+---------------+-------------------------------------------------------------------+ -| | ``.``, ``?.`` | | | Get an attribute on a variable | -+------------+------------------+---------+---------------+-------------------------------------------------------------------+ -| | ``[`` | | | Array access | -+------------+------------------+---------+---------------+-------------------------------------------------------------------+ -| 500 | ``-`` | prefix | n/a | | -+------------+------------------+---------+---------------+-------------------------------------------------------------------+ -| | ``+`` | | | | -+------------+------------------+---------+---------------+-------------------------------------------------------------------+ -| 300 => 5 | ``??`` | infix | Right | Null coalescing operator (a ?? b) | -+------------+------------------+---------+---------------+-------------------------------------------------------------------+ -| 250 | ``=>`` | infix | Left | Arrow function (x => expr) | -+------------+------------------+---------+---------------+-------------------------------------------------------------------+ -| 200 | ``**`` | infix | Right | Exponentiation operator | -+------------+------------------+---------+---------------+-------------------------------------------------------------------+ -| 100 | ``is`` | infix | Left | Twig tests | -+------------+------------------+---------+---------------+-------------------------------------------------------------------+ -| | ``is not`` | | | Twig tests | -+------------+------------------+---------+---------------+-------------------------------------------------------------------+ -| 60 | ``*`` | infix | Left | | -+------------+------------------+---------+---------------+-------------------------------------------------------------------+ -| | ``/`` | | | | -+------------+------------------+---------+---------------+-------------------------------------------------------------------+ -| | ``//`` | | | Floor division | -+------------+------------------+---------+---------------+-------------------------------------------------------------------+ -| | ``%`` | | | | -+------------+------------------+---------+---------------+-------------------------------------------------------------------+ -| 50 => 70 | ``not`` | prefix | n/a | | -+------------+------------------+---------+---------------+-------------------------------------------------------------------+ -| 40 => 27 | ``~`` | infix | Left | | -+------------+------------------+---------+---------------+-------------------------------------------------------------------+ -| 30 | ``+`` | infix | Left | | -+------------+------------------+---------+---------------+-------------------------------------------------------------------+ -| | ``-`` | | | | -+------------+------------------+---------+---------------+-------------------------------------------------------------------+ -| 25 | ``..`` | infix | Left | | -+------------+------------------+---------+---------------+-------------------------------------------------------------------+ -| 20 | ``==`` | infix | Left | | -+------------+------------------+---------+---------------+-------------------------------------------------------------------+ -| | ``!=`` | | | | -+------------+------------------+---------+---------------+-------------------------------------------------------------------+ -| | ``<=>`` | | | | -+------------+------------------+---------+---------------+-------------------------------------------------------------------+ -| | ``<`` | | | | -+------------+------------------+---------+---------------+-------------------------------------------------------------------+ -| | ``>`` | | | | -+------------+------------------+---------+---------------+-------------------------------------------------------------------+ -| | ``>=`` | | | | -+------------+------------------+---------+---------------+-------------------------------------------------------------------+ -| | ``<=`` | | | | -+------------+------------------+---------+---------------+-------------------------------------------------------------------+ -| | ``not in`` | | | | -+------------+------------------+---------+---------------+-------------------------------------------------------------------+ -| | ``in`` | | | | -+------------+------------------+---------+---------------+-------------------------------------------------------------------+ -| | ``matches`` | | | | -+------------+------------------+---------+---------------+-------------------------------------------------------------------+ -| | ``starts with`` | | | | -+------------+------------------+---------+---------------+-------------------------------------------------------------------+ -| | ``ends with`` | | | | -+------------+------------------+---------+---------------+-------------------------------------------------------------------+ -| | ``has some`` | | | | -+------------+------------------+---------+---------------+-------------------------------------------------------------------+ -| | ``has every`` | | | | -+------------+------------------+---------+---------------+-------------------------------------------------------------------+ -| | ``===`` | | | | -+------------+------------------+---------+---------------+-------------------------------------------------------------------+ -| | ``!==`` | | | | -+------------+------------------+---------+---------------+-------------------------------------------------------------------+ -| 18 | ``b-and`` | infix | Left | | -+------------+------------------+---------+---------------+-------------------------------------------------------------------+ -| 17 | ``b-xor`` | infix | Left | | -+------------+------------------+---------+---------------+-------------------------------------------------------------------+ -| 16 | ``b-or`` | infix | Left | | -+------------+------------------+---------+---------------+-------------------------------------------------------------------+ -| 15 | ``and`` | infix | Left | | -+------------+------------------+---------+---------------+-------------------------------------------------------------------+ -| 12 | ``xor`` | infix | Left | | -+------------+------------------+---------+---------------+-------------------------------------------------------------------+ -| 10 | ``or`` | infix | Left | | -+------------+------------------+---------+---------------+-------------------------------------------------------------------+ -| 5 | ``?:``, ``? :`` | infix | Right | Elvis operator (a ?: b) | -+------------+------------------+---------+---------------+-------------------------------------------------------------------+ -| 0 | ``(`` | prefix | n/a | Explicit group expression (a) | -+------------+------------------+---------+---------------+-------------------------------------------------------------------+ -| | ``literal`` | | | A literal value (boolean, string, number, sequence, mapping, ...) | -+------------+------------------+---------+---------------+-------------------------------------------------------------------+ -| | ``?`` | infix | Left | Conditional operator (a ? b : c) | -+------------+------------------+---------+---------------+-------------------------------------------------------------------+ -| | ``=`` | | Right | Assignment operator | -+------------+------------------+---------+---------------+-------------------------------------------------------------------+ - -When a precedence will change in 4.0, the new precedence is indicated by the arrow ``=>``. - -Here is the same table for Twig 4.0 with adjusted precedences: - -+------------+------------------+---------+---------------+-------------------------------------------------------------------+ -| Precedence | Operator | Type | Associativity | Description | -+============+==================+=========+===============+===================================================================+ -| 512 | ``...`` | prefix | n/a | Spread operator | -+------------+------------------+---------+---------------+-------------------------------------------------------------------+ ->>>>>>> 3.x | | ``(`` | infix | Left | Twig function call | +------------+------------------+---------+---------------+-------------------------------------------------------------------+ | | ``.``, ``?.`` | | | Get an attribute on a variable | @@ -203,10 +96,7 @@ Here is the same table for Twig 4.0 with adjusted precedences: +------------+------------------+---------+---------------+-------------------------------------------------------------------+ | | ``?`` | infix | Left | Conditional operator (a ? b : c) | +------------+------------------+---------+---------------+-------------------------------------------------------------------+ -<<<<<<< HEAD - -When a precedence will change in the next major version, the new precedence is indicated by the arrow ``=>``. -======= | | ``=`` | | Right | Assignment operator | +------------+------------------+---------+---------------+-------------------------------------------------------------------+ ->>>>>>> 3.x + +When a precedence will change in the next major version, the new precedence is indicated by the arrow ``=>``.