Rich-Harris / code-red

Experimental toolkit for writing x-to-JavaScript compilers
MIT License
333 stars 22 forks source link

'Unexpected token' check is breaking a bunch of Svelte tests #33

Closed Conduitry closed 4 years ago

Conduitry commented 4 years ago

The 'Unexpected token' check added in #32 is introducing a lot of false positives or something, because hundreds of Svelte tests are failing now. I'm not sure why.

Conduitry commented 4 years ago

It looks like this is partially the result of using the x function in Svelte on things ending in a semicolon, which I guess is technically incorrect. Some failing tests are from something else though. Continuing to investigate whether this is something that should be addressed in Svelte of code-red.

Conduitry commented 4 years ago

All failing tests can be addressed by fixing how we're calling code-red throughout the Svelte compiler - by making sure we're using b instead of x where appropriate, by making sure we're not closing expressions in extraneous parentheses, and in a couple of places by removing stray }s. Closing.

Conduitry commented 4 years ago

Issues revealed by upgrade fixed in https://github.com/sveltejs/svelte/pull/4385