2020-06-21 18:03:45 +02:00
|
|
|
Keywords List
|
|
|
|
=============
|
|
|
|
|
|
|
|
{{#include ../links.md}}
|
|
|
|
|
2020-06-26 04:39:18 +02:00
|
|
|
| Keyword | Description | Not available 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] | [`no_function`] |
|
|
|
|
| `call` | Call a [function pointer] | [`no_function`] |
|
|
|
|
| `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 | |
|