enhance source mapping on IIFEs (#2224)

fixes #2213
This commit is contained in:
Alex Lam S.L
2017-07-11 02:34:28 +08:00
committed by GitHub
parent 4956ad311b
commit 10a938cb79
2 changed files with 5 additions and 2 deletions

View File

@@ -1104,6 +1104,9 @@ function OutputStream(options) {
self.expression.print(output);
if (self instanceof AST_New && !need_constructor_parens(self, output))
return;
if (self.expression instanceof AST_Lambda) {
output.add_mapping(self.start);
}
output.with_parens(function(){
self.args.forEach(function(expr, i){
if (i) output.comma();