google / traceur-compiler

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

JSX: Fix assignment expression parsing in place holders #2098

Closed arv closed 8 years ago

arv commented 8 years ago

Fixes #2092

arv commented 8 years ago

@johnjbarton PTAL

Turned out to be simpler than I anticipated in the bug. The problem is that peekJsxToken treats this as a JsxIdentifier. Fortunately, the content of a jsx placeholder is a normal expression so we can use the normal peek function here.

johnjbarton commented 8 years ago

LGTM, thanks!