fix #13409: Document as infix operator (#13570)

This commit is contained in:
hlaaftana
2020-03-04 09:50:36 +03:00
committed by GitHub
parent 3ca8f0bde6
commit 34c16f5eca

View File

@@ -559,7 +559,7 @@ following characters::
defined here.)
These keywords are also operators:
``and or not xor shl shr div mod in notin is isnot of``.
``and or not xor shl shr div mod in notin is isnot of as``.
`.`:tok: `=`:tok:, `:`:tok:, `::`:tok: are not available as general operators; they
are used for other notational purposes.
@@ -632,21 +632,21 @@ has the second lowest precedence.
Otherwise precedence is determined by the first character.
================ =============================================== ================== ===============
Precedence level Operators First character Terminal symbol
================ =============================================== ================== ===============
10 (highest) ``$ ^`` OP10
9 ``* / div mod shl shr %`` ``* % \ /`` OP9
8 ``+ -`` ``+ - ~ |`` OP8
7 ``&`` ``&`` OP7
6 ``..`` ``.`` OP6
5 ``== <= < >= > != in notin is isnot not of`` ``= < > !`` OP5
4 ``and`` OP4
3 ``or xor`` OP3
2 ``@ : ?`` OP2
1 *assignment operator* (like ``+=``, ``*=``) OP1
0 (lowest) *arrow like operator* (like ``->``, ``=>``) OP0
================ =============================================== ================== ===============
================ ================================================== ================== ===============
Precedence level Operators First character Terminal symbol
================ ================================================== ================== ===============
10 (highest) ``$ ^`` OP10
9 ``* / div mod shl shr %`` ``* % \ /`` OP9
8 ``+ -`` ``+ - ~ |`` OP8
7 ``&`` ``&`` OP7
6 ``..`` ``.`` OP6
5 ``== <= < >= > != in notin is isnot not of as`` ``= < > !`` OP5
4 ``and`` OP4
3 ``or xor`` OP3
2 ``@ : ?`` OP2
1 *assignment operator* (like ``+=``, ``*=``) OP1
0 (lowest) *arrow like operator* (like ``->``, ``=>``) OP0
================ ================================================== ================== ===============
Whether an operator is used a prefix operator is also affected by preceding