Skip to content

Commit

Permalink
docs(SPEC): add |> to operator precedence table (#3132)
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanielc authored Aug 19, 2020
1 parent f1399fa commit 0b17fcf
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions docs/SPEC.md
Original file line number Diff line number Diff line change
Expand Up @@ -914,19 +914,20 @@ The precedence of the operators is given in the table below. Operators with a lo
| 1 | `a()` | Function call |
| | `a[]` | Member or index access |
| | `.` | Member access |
| 2 | `^` | Exponentiation |
| 3 | `*` `/` `%` | Multiplication, division, |
| 2 | `|>` | Pipe forward |
| 3 | `^` | Exponentiation |
| 4 | `*` `/` `%` | Multiplication, division, |
| | | and modulo |
| 4 | `+` `-` | Addition and subtraction |
| 5 |`==` `!=` | Comparison operators |
| 5 | `+` `-` | Addition and subtraction |
| 6 |`==` `!=` | Comparison operators |
| | `<` `<=` | |
| | `>` `>=` | |
| |`=~` `!~` | |
| 6 | `not` | Unary logical operator |
| 7 | `not` | Unary logical operator |
| | `exists` | Null check operator |
| 7 | `and` | Logical AND |
| 8 | `or` | Logical OR |
| 9 | `if/then/else` | Conditional |
| 8 | `and` | Logical AND |
| 9 | `or` | Logical OR |
| 10 | `if/then/else` | Conditional |

The operator precedence is encoded directly into the grammar as the following.

Expand Down

0 comments on commit 0b17fcf

Please sign in to comment.