This repository has been archived on 2025-08-04. You can view files and clone it, but cannot push or open issues or pull requests.
rhaj/_archive/rhai_engine/rhaibook/ref/keywords.md
2025-04-04 08:28:07 +02:00

4.3 KiB

Keywords

The following are reserved keywords in Rhai.

Active keywords Reserved keywords Usage
true, false constants
let, const var, static variables
is_shared shared values
is type checking
if, else goto control flow
switch match, case switching and matching
do, while, loop, until, for, in, continue, break looping
fn, private, is_def_fn, this public, protected, new functions
return return values
throw, try, catch throw/catch exceptions
import, export, as use, with, module, package, super modules
global automatic global module
Fn, call, curry function pointers
spawn, thread, go, sync, async, await, yield threading/async
type_of, print, debug, eval, is_def_var special functions
default, void, null, nil special values
Keywords cannot become the name of a function or variable, even when they are disabled.