4.3 KiB
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.