RioChndr / jaksel-language

Jaksel Script, Programming language very modern and Indonesian style
MIT License
927 stars 91 forks source link

Implemented `for of loop`, `break`, and `continue` #58

Closed Andndre closed 2 years ago

Andndre commented 2 years ago

Hey, I hope this helps a little. Maybe the keyword that I chose can be changed later.

Preview

fomo semua foo dari bar
  kalo foo itu 3
    skip
  perhaps foo itu 5
    spill "Loop diakhiri"
    stop
  udahan
  spill foo
udahan

// transforms to
for (const foo of bar) {
  if (foo == 3) {
    continue;
  } else if (foo == 5) {
    console.log("Loop diakhiri");
    break;
  }
  console.log(foo);
}

Fix : Variable naming rules (commit )

RioChndr commented 2 years ago

Nice fix. I'll check it later

RioChndr commented 2 years ago

Nice fix. please add new command to Command.md

Andndre commented 2 years ago

Nice fix. please add new command to Command.md

Done