aboutsummaryrefslogtreecommitdiff
path: root/lib/mozilla-ast.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/mozilla-ast.js')
-rw-r--r--lib/mozilla-ast.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/mozilla-ast.js b/lib/mozilla-ast.js
index e97d6191..7d246758 100644
--- a/lib/mozilla-ast.js
+++ b/lib/mozilla-ast.js
@@ -172,7 +172,7 @@
});
},
VariableDeclaration: function(M) {
- return new (M.kind === "const" ? AST_Const : AST_Var)({
+ return new AST_Var({
start : my_start_token(M),
end : my_end_token(M),
definitions : M.declarations.map(from_moz)
@@ -208,7 +208,7 @@
Identifier: function(M) {
var p = FROM_MOZ_STACK[FROM_MOZ_STACK.length - 2];
return new ( p.type == "LabeledStatement" ? AST_Label
- : p.type == "VariableDeclarator" && p.id === M ? (p.kind == "const" ? AST_SymbolConst : AST_SymbolVar)
+ : p.type == "VariableDeclarator" && p.id === M ? AST_SymbolVar
: p.type == "FunctionExpression" ? (p.id === M ? AST_SymbolLambda : AST_SymbolFunarg)
: p.type == "FunctionDeclaration" ? (p.id === M ? AST_SymbolDefun : AST_SymbolFunarg)
: p.type == "CatchClause" ? AST_SymbolCatch
@@ -331,7 +331,7 @@
def_to_moz(AST_Definitions, function To_Moz_VariableDeclaration(M) {
return {
type: "VariableDeclaration",
- kind: M instanceof AST_Const ? "const" : "var",
+ kind: "var",
declarations: M.definitions.map(to_moz)
};
});