Add reserved symbols.

This commit is contained in:
Stephen Chung
2020-07-08 12:09:18 +08:00
parent 150f02d8b7
commit d92a514f48
3 changed files with 118 additions and 74 deletions

View File

@@ -110,5 +110,5 @@ The Rhai Scripting Language
7. [Eval Statement](language/eval.md)
9. [Appendix](appendix/index.md)
1. [Keywords](appendix/keywords.md)
2. [Operators](appendix/operators.md)
2. [Operators and Symbols](appendix/operators.md)
3. [Literals](appendix/literals.md)

View File

@@ -1,8 +1,12 @@
Operators
=========
Operators and Symbols
====================
{{#include ../links.md}}
Operators
---------
| Operator | Description | Binary? | Binding direction |
| :---------------: | ------------------------------ | :-----: | :---------------: |
| `+` | Add | Yes | Left |
@@ -28,3 +32,21 @@ Operators
| `!` | Boolean _Not_ | No | Left |
| `[` .. `]` | Indexing | Yes | Right |
| `.` | Property access, Method call | Yes | Right |
Symbols
-------
| Symbol | Description |
| ------------ | ------------------------ |
| `:` | Property value separator |
| `::` | Module path separator |
| `=>` | _Reserved_ |
| `->` | _Reserved_ |
| `<-` | _Reserved_ |
| `===` | _Reserved_ |
| `!==` | _Reserved_ |
| `:=` | _Reserved_ |
| `::<` .. `>` | _Reserved_ |
| `@` | _Reserved_ |
| `(*` .. `*)` | _Reserved_ |