Closed gregtatum closed 6 years ago
@gregtatum Uh oh that's no good. It's probably this code that's probably causing it: https://github.com/browserify/rustify/blob/master/lib/transform.js#L82-L85
What's the resulting (incorrect) code look like? We should probably add the statement type to the whitelist so it doesn't generate it. The node type can be found by passing the ^ code into https://astexplorer.net/.
I think we may not need the semicolon code here at all. sheetify needs it because the replacement code starts with an open-paren which may trip up ASI, but rustify's starts with new
which doesn't have that issue.
I'd like to do something like this, but the semi-colon added at the beginning of the statement causes a syntax error: