Add shared and take to keywords list.

This commit is contained in:
Stephen Chung
2020-07-31 17:07:09 +08:00
parent df8587ac91
commit a35155b3e9
5 changed files with 52 additions and 47 deletions

View File

@@ -3,35 +3,37 @@ Keywords List
{{#include ../links.md}}
| Keyword | Description | Inactive under |
| :-------------------: | ---------------------------------------- | :-------------: |
| `true` | Boolean true literal | |
| `false` | Boolean false literal | |
| `let` | Variable declaration | |
| `const` | Constant declaration | |
| `if` | If statement | |
| `else` | else block of if statement | |
| `while` | While loop | |
| `loop` | Infinite loop | |
| `for` | For loop | |
| `in` | Containment test, part of for loop | |
| `continue` | Continue a loop at the next iteration | |
| `break` | Loop breaking | |
| `return` | Return value | |
| `throw` | Throw exception | |
| `import` | Import module | [`no_module`] |
| `export` | Export variable | [`no_module`] |
| `as` | Alias for variable export | [`no_module`] |
| `private` | Mark function private | [`no_function`] |
| `fn` (lower-case `f`) | Function definition | [`no_function`] |
| `Fn` (capital `F`) | Function to create a [function pointer] | |
| `call` | Call a [function pointer] | |
| `curry` | Curry a [function pointer] | |
| `this` | Reference to base object for method call | [`no_function`] |
| `type_of` | Get type name of value | |
| `print` | Print value | |
| `debug` | Print value in debug format | |
| `eval` | Evaluate script | |
| Keyword | Description | Inactive under | Overloadable |
| :-------------------: | ---------------------------------------- | :-------------: | :----------: |
| `true` | Boolean true literal | | No |
| `false` | Boolean false literal | | No |
| `let` | Variable declaration | | No |
| `const` | Constant declaration | | No |
| `shared` | Share value | [`no_shared`] | No |
| `take` | Un-share value | [`no_shared`] | No |
| `if` | If statement | | No |
| `else` | else block of if statement | | No |
| `while` | While loop | | No |
| `loop` | Infinite loop | | No |
| `for` | For loop | | No |
| `in` | Containment test, part of for loop | | No |
| `continue` | Continue a loop at the next iteration | | No |
| `break` | Loop breaking | | No |
| `return` | Return value | | No |
| `throw` | Throw exception | | No |
| `import` | Import module | [`no_module`] | No |
| `export` | Export variable | [`no_module`] | No |
| `as` | Alias for variable export | [`no_module`] | No |
| `private` | Mark function private | [`no_function`] | No |
| `fn` (lower-case `f`) | Function definition | [`no_function`] | No |
| `Fn` (capital `F`) | Function to create a [function pointer] | | Yes |
| `call` | Call a [function pointer] | | No |
| `curry` | Curry a [function pointer] | | No |
| `this` | Reference to base object for method call | [`no_function`] | No |
| `type_of` | Get type name of value | | Yes |
| `print` | Print value | | Yes |
| `debug` | Print value in debug format | | Yes |
| `eval` | Evaluate script | | Yes |
Reserved Keywords
@@ -59,7 +61,6 @@ Reserved Keywords
| `package` | Package |
| `spawn` | Threading |
| `go` | Threading |
| `shared` | Threading |
| `await` | Async |
| `async` | Async |
| `sync` | Async |