fix end tokens in spidermonkey ast import

This commit is contained in:
Mihai Bazon
2012-10-13 11:37:58 +03:00
parent 70d205c447
commit b51fe0dcc3

View File

@@ -58,7 +58,7 @@
CatchClause : function(M) { CatchClause : function(M) {
return new AST_Catch({ return new AST_Catch({
start : my_start_token(M), start : my_start_token(M),
end : my_start_token(M), end : my_end_token(M),
argname : from_moz(M.param), argname : from_moz(M.param),
body : from_moz(M.body).body body : from_moz(M.body).body
}); });
@@ -95,7 +95,7 @@
MemberExpression : function(M) { MemberExpression : function(M) {
return new (M.computed ? AST_Sub : AST_Dot)({ return new (M.computed ? AST_Sub : AST_Dot)({
start : my_start_token(M), 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, property : M.computed ? from_moz(M.property) : M.property.name,
expression : from_moz(M.object) expression : from_moz(M.object)
}); });
@@ -103,7 +103,7 @@
SwitchCase : function(M) { SwitchCase : function(M) {
return new (M.test ? AST_Case : AST_Default)({ return new (M.test ? AST_Case : AST_Default)({
start : my_start_token(M), start : my_start_token(M),
end : my_start_token(M), end : my_end_token(M),
expression : from_moz(M.test), expression : from_moz(M.test),
body : M.consequent.map(from_moz) body : M.consequent.map(from_moz)
}); });