mirror of
https://github.com/SymboScript/Book.git
synced 2025-01-10 20:13:46 +03:00
Update readme.md
This commit is contained in:
parent
a79783cf1d
commit
b182c4502f
1 changed files with 41 additions and 21 deletions
|
@ -4,24 +4,44 @@
|
||||||
|
|
||||||
### Operator priority
|
### Operator priority
|
||||||
|
|
||||||
| Operator/Expression | Associativity | Parser fn name | Impl |
|
| Operator/Expression | Associativity | Parser fn name | Impl |
|
||||||
| -------------------------------------- | ------------- | -------------- | ---- |
|
| ------------------------------------------------ | ------------- | -------------- | ---- |
|
||||||
| Method calls, Members | Left to Right | call | ✅ |
|
| Calls, Identifiers, Literals | Left to Right | call | ✅ |
|
||||||
| Function calls | Left to Right | call | ✅ |
|
| Members | Left to Right | dot | ✅ |
|
||||||
| await | Right to Left | call | ✅ |
|
| new | Right to Left | new_expr | ✅ |
|
||||||
| `!` `++` `--` `()` `~` | Left to Right | factor | ✅ |
|
| delete | Right to Left | delete_expr | ✅ |
|
||||||
| `^` | Left to Left | power | ✅ |
|
| await | Right to Left | await_expr | ✅ |
|
||||||
| `*` `/` `%` | Left to Right | term | ✅ |
|
| `!` `++` `--` `()` `~` (unary `-` `+`) `[]` `{}` | Left to Right | factor | ✅ |
|
||||||
| `+` `-` | Left to Right | add_sub | ✅ |
|
| `^` | Left to Left | power | ✅ |
|
||||||
| `>>` `<<` | Left to Right | shift | ✅ |
|
| `*` `/` `%` | Left to Right | term | ✅ |
|
||||||
| `&` | Left to Right | bit_and | ✅ |
|
| `+` `-` | Left to Right | add_sub | ✅ |
|
||||||
| `bxor` | Left to Right | bit_xor | ✅ |
|
| `>>` `<<` | Left to Right | shift | ✅ |
|
||||||
| <code>\|</code> | Left to Right | bit_or | ✅ |
|
| `&` | Left to Right | bit_and | ✅ |
|
||||||
| `==` `!=` `<` `<=` `>` `>=` | Left to Right | cmp | ✅ |
|
| `bxor` | Left to Right | bit_xor | ✅ |
|
||||||
| `&&` | Left to Right | logical_and | ✅ |
|
| <code>\|</code> | Left to Right | bit_or | ✅ |
|
||||||
| <code>\|\|</code> | Left to Right | logical_or | ✅ |
|
| `==` `!=` `<` `<=` `>` `>=` | Left to Right | cmp | ✅ |
|
||||||
| `..` | Left to Right | range | ✅ |
|
| `&&` | Left to Right | logical_and | ✅ |
|
||||||
| `?:` | Right to Left | ternary | ✅ |
|
| <code>\|\|</code> | Left to Right | logical_or | ✅ |
|
||||||
| `=` `:=` `+=` `-=` `*=` `/=` `^=` `%=` | Right to Left | assign | ✅ |
|
| `..` | Left to Right | range | ✅ |
|
||||||
| yield | Right to Left | await_yield | ✅ |
|
| `?:` | Right to Left | ternary | ✅ |
|
||||||
| `,` | None | comma | ✅ |
|
| `=` `:=` `+=` `-=` `*=` `/=` `^=` `%=` | Right to Left | assign | ✅ |
|
||||||
|
| `,` | None | comma | ✅ |
|
||||||
|
|
||||||
|
### Statements
|
||||||
|
|
||||||
|
| Statement | Parser fn name | Trigger token | Impl |
|
||||||
|
| -------------------------- | -------------- | ------------- | ---- |
|
||||||
|
| Variable declaration | var_decl | Let | ✅ |
|
||||||
|
| Async function declaration | async_fn_decl | Async | ❌ |
|
||||||
|
| Function declaration | fn_decl | Function | ✅ |
|
||||||
|
| Return statement | return_stmt | Return | ✅ |
|
||||||
|
| Yield statement | yield_stmt | Yield | ✅ |
|
||||||
|
| Break statement | break_stmt | Break | ✅ |
|
||||||
|
| Continue statement | continue_stmt | Continue | ✅ |
|
||||||
|
| If statement | if_stmt | If | ❌ |
|
||||||
|
| While statement | while_stmt | While | ❌ |
|
||||||
|
| For statement | for_stmt | For | ❌ |
|
||||||
|
| Loop statement | loop_stmt | Loop | ❌ |
|
||||||
|
| Try statement | try_stmt | Try | ❌ |
|
||||||
|
| Throw statement | throw_stmt | Throw | ❌ |
|
||||||
|
| Expression statement | expr_stmt | Other | ✅ |
|
||||||
|
|
Loading…
Add table
Reference in a new issue