Skip to content

Commit

Permalink
fix #13409: Document as infix operator (#13570)
Browse files Browse the repository at this point in the history
  • Loading branch information
metagn authored Mar 4, 2020
1 parent 3ca8f0b commit 34c16f5
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions doc/manual.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 34c16f5

Please sign in to comment.