rhai/doc/src/language/keywords.md
2020-08-03 12:10:20 +08:00

2.6 KiB

Keywords

{{#include ../links.md}}

The following are reserved keywords in Rhai:

Active keywords Reserved keywords Usage Inactive under feature
true, false Boolean constants
let, const var, static Variable declarations
is_shared Shared values [no_closure]
if, else then, goto, exit Control flow
switch, match, case Matching
while, loop, for, in, continue, break do, each Looping
fn, private public, new Functions [no_function]
return Return values
throw try, catch Throw exceptions
import, export, as use, with, module, package Modules/packages [no_module]
Fn, call, curry Function pointers
spawn, go, sync, async, await, yield Threading/async
type_of, print, debug, eval Special functions
default, void, null, nil Special values

Keywords cannot become the name of a [function] or [variable], even when they are disabled.