Skip to content

Commit

Permalink
update escope version for support String Template
Browse files Browse the repository at this point in the history
  • Loading branch information
枫弦 committed Jan 15, 2016
1 parent 2598633 commit 8b089dc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions lib/esshorten.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*
/*!
Copyright (C) 2013 Yusuke Suzuki <[email protected]>
Redistribution and use in source and binary forms, with or without
Expand Down Expand Up @@ -234,10 +234,10 @@

function mangleLabels(tree) {
var labelScope;

var FuncOrProgram = [Syntax.Program, Syntax.FunctionExpression, Syntax.FunctionDeclaration];
estraverse.traverse(tree, {
enter: function (node) {
if (escope.Scope.isVariableScopeRequired(node)) {
if (FuncOrProgram.indexOf(node.type) >= 0) {
labelScope = new LabelScope(labelScope);
return;
}
Expand All @@ -255,7 +255,7 @@
},
leave: function (node) {
labelScope.unregister(node);
if (escope.Scope.isVariableScopeRequired(node)) {
if (FuncOrProgram.indexOf(node.type) >= 0) {
labelScope = labelScope.close();
}
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
"url": "http://github.com/estools/esshorten.git"
},
"dependencies": {
"escope": "~3.3.0",
"estraverse": "~4.1.1",
"escope": "~1.0.1",
"esutils": "~2.0.2"
},
"devDependencies": {
Expand Down

0 comments on commit 8b089dc

Please sign in to comment.