Raise precedence of ~ and %.
This commit is contained in:
parent
e6667a3996
commit
0b4129fb98
@ -95,7 +95,8 @@ The following _precedence table_ show the built-in precedence of standard Rhai o
|
|||||||
| Comparisons | `>`, `>=`, `<`, `<=` | 110 |
|
| Comparisons | `>`, `>=`, `<`, `<=` | 110 |
|
||||||
| | `in` | 130 |
|
| | `in` | 130 |
|
||||||
| Arithmetic | `+`, `-` | 150 |
|
| Arithmetic | `+`, `-` | 150 |
|
||||||
| Arithmetic | `*`, `/`, `~`, `%` | 180 |
|
| Arithmetic | `*`, `/` | 180 |
|
||||||
|
| Arithmetic | `~`, `%` | 190 |
|
||||||
| Bit-shifts | `<<`, `>>` | 210 |
|
| Bit-shifts | `<<`, `>>` | 210 |
|
||||||
| Object | `.` _(binds to right)_ | 240 |
|
| Object | `.` _(binds to right)_ | 240 |
|
||||||
| _Others_ | | 0 |
|
| _Others_ | | 0 |
|
||||||
|
@ -623,7 +623,9 @@ impl Token {
|
|||||||
|
|
||||||
Plus | Minus => 150,
|
Plus | Minus => 150,
|
||||||
|
|
||||||
Divide | Multiply | PowerOf | Modulo => 180,
|
Divide | Multiply => 180,
|
||||||
|
|
||||||
|
PowerOf | Modulo => 190,
|
||||||
|
|
||||||
LeftShift | RightShift => 210,
|
LeftShift | RightShift => 210,
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user