diff --git a/doc/src/engine/custom-op.md b/doc/src/engine/custom-op.md index 2e98ecc1..bc8ff83f 100644 --- a/doc/src/engine/custom-op.md +++ b/doc/src/engine/custom-op.md @@ -95,8 +95,8 @@ The following _precedence table_ show the built-in precedence of standard Rhai o | Comparisons | `>`, `>=`, `<`, `<=` | 110 | | | `in` | 130 | | Arithmetic | `+`, `-` | 150 | -| Arithmetic | `*`, `/` | 180 | -| Arithmetic | `~`, `%` | 190 | +| Arithmetic | `*`, `/`, `%` | 180 | +| Arithmetic | `~` | 190 | | Bit-shifts | `<<`, `>>` | 210 | | Object | `.` _(binds to right)_ | 240 | | _Others_ | | 0 | diff --git a/src/token.rs b/src/token.rs index fde6a703..428067ef 100644 --- a/src/token.rs +++ b/src/token.rs @@ -623,9 +623,9 @@ impl Token { Plus | Minus => 150, - Divide | Multiply => 180, + Divide | Multiply | Modulo => 180, - PowerOf | Modulo => 190, + PowerOf => 190, LeftShift | RightShift => 210,