aboutsummaryrefslogtreecommitdiff
path: root/lib/output.js
diff options
context:
space:
mode:
authorAlex Lam S.L <alexlamsl@gmail.com>2017-07-11 02:34:28 +0800
committerGitHub <noreply@github.com>2017-07-11 02:34:28 +0800
commit10a938cb79d19e1476e2744c8651011fd4d7b902 (patch)
treec92c0e4eb442dacbd9f7a55078e9c220078067b7 /lib/output.js
parent4956ad311b363374211b7767b58b80098bac1ee3 (diff)
downloadtracifyjs-10a938cb79d19e1476e2744c8651011fd4d7b902.tar.gz
tracifyjs-10a938cb79d19e1476e2744c8651011fd4d7b902.zip
enhance source mapping on IIFEs (#2224)
fixes #2213
Diffstat (limited to 'lib/output.js')
-rw-r--r--lib/output.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/output.js b/lib/output.js
index 9416583a..6ee96b31 100644
--- a/lib/output.js
+++ b/lib/output.js
@@ -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();