2020-06-21 18:03:45 +02:00
|
|
|
Keywords List
|
|
|
|
=============
|
|
|
|
|
|
|
|
{{#include ../links.md}}
|
|
|
|
|
2020-07-31 11:07:09 +02:00
|
|
|
| Keyword | Description | Inactive under | Overloadable |
|
|
|
|
| :-------------------: | ---------------------------------------- | :-------------: | :----------: |
|
|
|
|
| `true` | Boolean true literal | | No |
|
|
|
|
| `false` | Boolean false literal | | No |
|
|
|
|
| `let` | Variable declaration | | No |
|
|
|
|
| `const` | Constant declaration | | No |
|
2020-07-31 12:43:34 +02:00
|
|
|
| `is_shared` | Is a value shared? | | No |
|
2020-07-31 11:07:09 +02:00
|
|
|
| `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 |
|
2020-07-26 15:57:30 +02:00
|
|
|
|
|
|
|
|
|
|
|
Reserved Keywords
|
|
|
|
-----------------
|
|
|
|
|
|
|
|
| Keyword | Potential usage |
|
|
|
|
| --------- | --------------------- |
|
|
|
|
| `var` | Variable declaration |
|
|
|
|
| `static` | Variable declaration |
|
2020-08-03 06:10:20 +02:00
|
|
|
| `shared` | Share value |
|
2020-07-26 15:57:30 +02:00
|
|
|
| `do` | Looping |
|
|
|
|
| `each` | Looping |
|
2020-07-26 16:25:30 +02:00
|
|
|
| `then` | Control flow |
|
|
|
|
| `goto` | Control flow |
|
|
|
|
| `exit` | Control flow |
|
2020-07-26 15:57:30 +02:00
|
|
|
| `switch` | Matching |
|
|
|
|
| `match` | Matching |
|
|
|
|
| `case` | Matching |
|
|
|
|
| `public` | Function/field access |
|
|
|
|
| `new` | Constructor |
|
|
|
|
| `try` | Trap exception |
|
|
|
|
| `catch` | Catch exception |
|
|
|
|
| `use` | Import namespace |
|
|
|
|
| `with` | Scope |
|
|
|
|
| `module` | Module |
|
|
|
|
| `package` | Package |
|
|
|
|
| `spawn` | Threading |
|
|
|
|
| `go` | Threading |
|
|
|
|
| `await` | Async |
|
|
|
|
| `async` | Async |
|
2020-07-28 04:25:26 +02:00
|
|
|
| `sync` | Async |
|
2020-07-26 15:57:30 +02:00
|
|
|
| `yield` | Async |
|
|
|
|
| `default` | Special value |
|
|
|
|
| `void` | Special value |
|
|
|
|
| `null` | Special value |
|
|
|
|
| `nil` | Special value |
|