espruino / Espruino

The Espruino JavaScript interpreter - Official Repo
http://www.espruino.com/
Other
2.73k stars 741 forks source link

Compiler: The following function fails to compile #2434

Open mariusGundersen opened 7 months ago

mariusGundersen commented 7 months ago

It seems like you have to put something in the third part of a for(;;) loop. The following fails to compile:

function test(input) {
  "compiled";
  for (var i = 0; i < input.length; ) {
    i++;
  }
}
mariusGundersen commented 7 months ago

A couple of other things that don't seem to work are return; and a === b.

gfwilliams commented 7 months ago

Ok, thanks. If you want to make changes, the compiler is at https://github.com/gfwilliams/EspruinoCompiler