Update readme.md

This commit is contained in:
Artemy 2023-12-26 13:30:56 +03:00
parent bb6c67333d
commit 51ee1e1c6a

View file

@ -4,16 +4,22 @@
### Operator priority ### Operator priority
| Operator/Expression | Associativity | Parser fn name | Evaluation priority | Implementation | | Operator/Expression | Associativity | Parser fn name | Impl |
| --------------------------------------- | ------------- | -------------- | ------------------- | -------------- | | -------------------------------------- | ------------- | -------------- | ---- |
| `!` `++` `--` `()` Literals Identifiers | Left to Right | factor | 1 | ✅ | | Method calls | Right to Left | call | ❌ |
| `^` | Left to Left | power | 2 | ✅ | | Function calls | Right to Left | call | ❌ |
| `*` `/` `%` | Left to Right | term | 3 | ✅ | | `!` `++` `--` `()` `~` | Left to Right | factor | ✅ |
| `+` `-` | Left to Right | add_sub | 4 | ✅ | | `^` | Left to Left | power | ✅ |
| `>>` `<<` | Left to Right | shift | 5 | ❌ | | `*` `/` `%` | Left to Right | term | ✅ |
| `<` `<=` `>` `>=` `==` `!=` | Left to Right | cmp | 6 | ❌ | | `+` `-` | Left to Right | add_sub | ✅ |
| `&` | Left to Right | bit_and | 7 | ❌ | | `>>` `<<` | Left to Right | shift | ❌ |
| <code>\|</code> | Left to Right | bit_or | 8 | ❌ | | `<` `<=` `>` `>=` `==` `!=` | Left to Right | cmp | ❌ |
| `==` `!=` `<` `<=` `>` `>=` | Left to Right | cmp | 9 | ❌ | | `&` | Left to Right | bit_and | ❌ |
| `&&` | Left to Right | logical_and | 10 | ❌ | | `bxor` | Left to Right | bit_xor | ❌ |
| <code>\|\|</code> | Left to Right | logical_or | 11 | ❌ | | <code>\|</code> | Left to Right | bit_or | ❌ |
| `==` `!=` `<` `<=` `>` `>=` | Left to Right | cmp | ❌ |
| `&&` | Left to Right | logical_and | ❌ |
| <code>\|\|</code> | Left to Right | logical_or | ❌ |
| `..` | Left to Right | range | ❌ |
| `?` `:` | Left to Right | ternary | ❌ |
| `=` `:=` `+=` `-=` `*=` `/=` `^=` `%=` | Right to Left | assign | ❌ |