diff options
author | Araq <rumpf_a@web.de> | 2014-03-22 22:59:23 +0100 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2014-03-22 22:59:23 +0100 |
commit | b76d2eac7f551cafa0ac797330e3bd0650ab26d9 (patch) | |
tree | 2b8496ee88de8853c9ff4672c0deae1dce974c56 /doc/manual.txt | |
parent | 5f64d7a35389a5f4cac82a44a3f5f9414c2c3fbb (diff) | |
download | Nim-b76d2eac7f551cafa0ac797330e3bd0650ab26d9.tar.gz |
fixes #1006
Diffstat (limited to 'doc/manual.txt')
-rw-r--r-- | doc/manual.txt | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/doc/manual.txt b/doc/manual.txt index 5c4aa2c17..c2acd3e6a 100644 --- a/doc/manual.txt +++ b/doc/manual.txt @@ -499,18 +499,21 @@ other binary operators are left-associative. Precedence ---------- -For operators that are not keywords the precedence is determined by the -following rules: +Unary operators always bind stronger than any binary +operator: ``$a + b`` is ``($a) + b`` and not ``$(a + b)``. -If the operator ends with ``=`` and its relevant character is none of -``<``, ``>``, ``!``, ``=``, ``~``, ``?``, it is an *assignment operator* which -has the lowest precedence. - -If the operator's relevant character is ``@`` it is a `sigil-like`:idx: +If an unary operator's relevant character is ``@`` it is a `sigil-like`:idx: operator which binds stronger than a ``primarySuffix``: ``@x.abc`` is parsed as ``(@x).abc`` whereas ``$x.abc`` is parsed as ``$(x.abc)``. +For binary operators that are not keywords the precedence is determined by the +following rules: + +If the operator ends with ``=`` and its relevant character is none of +``<``, ``>``, ``!``, ``=``, ``~``, ``?``, it is an *assignment operator* which +has the lowest precedence. + Otherwise precedence is determined by the relevant character. ================ =============================================== ================== =============== |