While blocks
The following syntax allows you to create a loop happening every time it's condition is met:
while condition {
statements
}
Note that break is NOT currently
supported nor planned, although return IS
supported.
Optimizations
When the condition of a while block is known at compile-time and it is false, said block is removed as it will never execute, for example:
| Input | Moon Script Optimization |
|
|