diff options
Diffstat (limited to 'docs/precedence.md')
| -rw-r--r-- | docs/precedence.md | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/docs/precedence.md b/docs/precedence.md new file mode 100644 index 0000000..417fa45 --- /dev/null +++ b/docs/precedence.md @@ -0,0 +1,16 @@ +Operating precedence in sloth from highest to lowest. + +| Name | Operators | Associates | +| -------------- | --------- | ---------- | +| parentheses | () | Left | +| member access | . ! !! ?. | Left | +| defaulting | ?: | Right | +| unary | ! + - | Right | +| multiplicative | \* / % | Left | +| additive | + - | Left | +| bitwise shift | << >> | Left | +| comparison | < > <= >= | Left | +| equality | == != | Left | +| bitwise | & ^ \| | Left | +| logical and | && | Left | +| logical or | \|\| | Left | |
