Identifiers
Identifiers can contain letters (a-z, A-Z), numbers (0-9) or underscores ("_") but they cannot begin with a number.
Special keywords and hardcoded constants:
name | type | usage |
---|---|---|
this | special identifier, read-only | method context retrieval |
_G | special identifier, read/write | global environment access |
_R | special identifier, read-only | global registry access |
_F | special identifier, read-only | current function retrieval |
_T | special identifier, read-only | current thread retrieval |
null | constant | constant |
true | constant | constant |
false | constant | constant |
var | restricted keyword | variable declaration |
global | restricted keyword | variable declaration |
class | special identifier | class declaration |
new | restricted keyword | class instantiation |
thread | restricted keyword | thread control |
subthread | restricted keyword | thread control |
sync | restricted keyword | thread control |
race | restricted keyword | thread control |
defer | restricted keyword | destruction statement helper |
function | restricted keyword | function definition |
use | restricted keyword | function definition |
if | restricted keyword | "if" statement |
else | restricted keyword | "if/else" statement |
do | restricted keyword | "do/while" statement |
while | restricted keyword | "while", "do/while" statements |
for | restricted keyword | "for" statement |
foreach | restricted keyword | "foreach" statement |
break | restricted keyword | "break" statement |
continue | restricted keyword | "continue" statement |
return | restricted keyword | "return" statement |
function command | "print" function | |
println | function command | "println" function |
yield | function command | "yield" function |
include | function command | "include" function |