Skip to content

Commit 3a94de0

Browse files
authored
Update operator precedence table (#2625)
* Update operator precedence table Updates the table to match the information per the parser. This adds entries for: * `=>` * `include`, `include_once`, `require`, `require_once` * `fn` * `throw` Ref: https://github.com/php/php-src/blob/2e2416825d2270d256f7597904e14e386cc0d854/Zend/zend_language_parser.y#L54-L82 Fixes 2622 * Operator precedence table: change links for double arrow to yield * Operator precedence table: attempt to clarify fn arrow entry * Operator precedence table: attempt to clarify fn arrow entry [2] --------- Co-authored-by: jrfnl <jrfnl@users.noreply.github.com>
1 parent 72d861d commit 3a94de0

1 file changed

Lines changed: 27 additions & 0 deletions

File tree

language/operators/precedence.xml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,13 @@
256256
<link linkend="control-structures.yield.from">yield from</link>
257257
</entry>
258258
</row>
259+
<row>
260+
<entry>(n/a)</entry>
261+
<entry><literal>=&gt;</literal></entry>
262+
<entry>
263+
<link linkend="language.generators.syntax">yield with keys</link>
264+
</entry>
265+
</row>
259266
<row>
260267
<entry>(n/a)</entry>
261268
<entry><literal>yield</literal></entry>
@@ -289,6 +296,26 @@
289296
<link linkend="language.operators.logical">logical</link>
290297
</entry>
291298
</row>
299+
<row>
300+
<entry>(n/a)</entry>
301+
<entry>
302+
<literal>include</literal>
303+
<literal>include_once</literal>
304+
<literal>require</literal>
305+
<literal>require_once</literal>
306+
</entry>
307+
<entry>
308+
<function>include</function>,
309+
<function>include_once</function>,
310+
<function>require</function>&listendand;
311+
<function>require_once</function>
312+
</entry>
313+
</row>
314+
<row>
315+
<entry>(n/a)</entry>
316+
<entry><literal>fn (...) =&gt;</literal></entry>
317+
<entry><link linkend="functions.arrow">fn arrow</link> disambiguity</entry>
318+
</row>
292319
<row>
293320
<entry>(n/a)</entry>
294321
<entry><literal>throw</literal></entry>

0 commit comments

Comments
 (0)