sweet-js / sweet-core

Sweeten your JavaScript.
https://www.sweetjs.org
BSD 2-Clause "Simplified" License
4.58k stars 208 forks source link

Sweet.js removes code from input #708

Closed are closed 7 years ago

are commented 7 years ago

Sweet.js without any macros inside input file removes () from this code:

var m = new _DustObject3.default();

It becomes this:

var m = new _DustObject3.default;

Is this intentional?

disnet commented 7 years ago

Yep, it's intentional. When there are no arguments new doesn't need the parens so codegen will just omit them.