GulfOfMexico icon indicating copy to clipboard operation
GulfOfMexico copied to clipboard

Support Grammarly correct conditions

Open fuma-nama opened this issue 2 years ago • 4 comments

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++;
}

fuma-nama avatar Jun 27 '23 10:06 fuma-nama

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.

c910335 avatar Jun 28 '23 08:06 c910335

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.

Bytestorm5 avatar Jun 29 '23 15:06 Bytestorm5

this is hilarius

jhonatan-3a avatar Jun 29 '23 17:06 jhonatan-3a

Just say that any undefined identifier after an if statement is interpreted as an else if and you're done.

stohrendorf avatar Jun 29 '23 17:06 stohrendorf