jlongster / es6-macros

A collection of sweet.js macros that implement ES6 features for ES5
BSD 2-Clause "Simplified" License
237 stars 18 forks source link

'var' parsing errors #16

Closed lqd closed 10 years ago

lqd commented 10 years ago

The var macro seems to cause problems with valid code.

For instance both 1) var i;

and 2) for (var i = 0; i < 5; ++i) console.log (i); throw errors: a SyntaxError in the first case, an unexpected token in the second.

jlongster commented 10 years ago

You're right! I refactored that recently and didn't it test it well enough, sorry! I'm surprised the tests didn't catch that. Just published a new version to npm that works. Try it now.

lqd commented 10 years ago

:thumbsup: works totally fine now :)

Thanks!