google / traceur-compiler

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

Valid regex generates parser error #1977

Closed jonoward closed 9 years ago

jonoward commented 9 years ago

The following regex, which is valid and executes in browsers correctly, causes a parser error: /=*$/

Repro: Go to: http://google.github.io/traceur-compiler/demo/repl.html

Input: "abc=".replace(/=*$/, '');

Generates error: traceured.js:1:16: Expected regular expression first char,traceured.js:1:21: Unexpected token ,,traceured.js:1:23: Unexpected token '',traceured.js:1:25: Semi-colon expected,traceured.js:1:25: Unexpected token )