From: Mihai Bazon Date: Sat, 13 Oct 2012 08:37:58 +0000 (+0300) Subject: fix end tokens in spidermonkey ast import X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=b51fe0dcc348fe2c3942b04c7c7d88f3fb7eaa49;p=UglifyJS.git fix end tokens in spidermonkey ast import --- diff --git a/lib/mozilla-ast.js b/lib/mozilla-ast.js index 4db8feff..982d621a 100644 --- a/lib/mozilla-ast.js +++ b/lib/mozilla-ast.js @@ -58,7 +58,7 @@ CatchClause : function(M) { return new AST_Catch({ start : my_start_token(M), - end : my_start_token(M), + end : my_end_token(M), argname : from_moz(M.param), body : from_moz(M.body).body }); @@ -95,7 +95,7 @@ MemberExpression : function(M) { return new (M.computed ? AST_Sub : AST_Dot)({ start : my_start_token(M), - end : my_start_token(M), + end : my_end_token(M), property : M.computed ? from_moz(M.property) : M.property.name, expression : from_moz(M.object) }); @@ -103,7 +103,7 @@ SwitchCase : function(M) { return new (M.test ? AST_Case : AST_Default)({ start : my_start_token(M), - end : my_start_token(M), + end : my_end_token(M), expression : from_moz(M.test), body : M.consequent.map(from_moz) });