GulfOfMexico
GulfOfMexico copied to clipboard
Support Grammarly correct conditions
DreamBerd now supports otherwise, however, moreover, unless, until, since, because (#216):
if (human.isPlayer) {
println("He is player");
} otherwise {
println("He isn't player");
} however {
println("He is player");
} moreover {
println("He is a human");
} because (human.withEyes) {
println("He has eyes");
} since (human.ago > 10) {
println("He is more than 10 years old now");
} unless (human.ago <= 1) {
println("He is more than 1 years old now");
} until (human.ago >= 18) {
human.ago++;
}
We may also need so, thus, hence, therefore, although, once, etc.
human.isPlayer, so {
"The human is a player"?
}
Note: The comma before so is necessary.
I think certain keywords should act as an assertion and Conditional
So human.isPlayer, so { ... } means that human.isPlayer must be true before the code comtinues.
this is hilarius
Just say that any undefined identifier after an if statement is interpreted as an else if and you're done.