google / traceur-compiler

Traceur is a JavaScript.next-to-JavaScript-of-today compiler
Apache License 2.0
8.17k stars 581 forks source link

An invalid code will cause an infinite loop #1929

Closed msmhrt closed 9 years ago

msmhrt commented 9 years ago

Hi all,

It seems that an invalid code will an infinite loop. Ver.0.0.89 is OK, I guess. Please see the following log.

$ cat a.js
(function() {
    "use strict";

    let x = function*() {
        yield ++(yield);
    };
}());
$ traceur --version
0.0.89$
$ traceur --out compile.js a.js
[ '/tmp/a.js:5:23: Unexpected token )',
  '/tmp/a.js:5:24: Unexpected token ;',
  '/tmp/a.js:6:5: Unexpected token }',
  '/tmp/a.js:6:6: Unexpected token ;',
  '/tmp/a.js:7:1: Unexpected token }',
  '/tmp/a.js:8:1: Unexpected token End of File',
  '/tmp/a.js:8:1: Unexpected token End of File',
  '/tmp/a.js:8:1: Unexpected token End of File' ]
$ ~/repository/traceur-compiler/traceur --version
0.0.90$
$ ~/repository/traceur-compiler/traceur --out compiled.js a.js
<<< No response >>>