Merge pull request #4586 from marijnh/master

Upgrade to Acorn 5.0.0
This commit is contained in:
Tobias Koppers 2017-03-30 19:24:57 +02:00 committed by GitHub
commit beb29d8dbd
2 changed files with 9 additions and 5 deletions

View File

@ -536,8 +536,10 @@ Parser.prototype.walkForOfStatement = function walkForOfStatement(statement) {
// Declarations
Parser.prototype.walkFunctionDeclaration = function walkFunctionDeclaration(statement) {
this.scope.renames["$" + statement.id.name] = undefined;
this.scope.definitions.push(statement.id.name);
if(statement.id) {
this.scope.renames["$" + statement.id.name] = undefined;
this.scope.definitions.push(statement.id.name);
}
this.inScope(statement.params, function() {
if(statement.body.type === "BlockStatement")
this.walkStatement(statement.body);
@ -637,8 +639,10 @@ Parser.prototype.walkVariableDeclaration = function walkVariableDeclaration(stat
};
Parser.prototype.walkClassDeclaration = function walkClassDeclaration(statement) {
this.scope.renames["$" + statement.id.name] = undefined;
this.scope.definitions.push(statement.id.name);
if(statement.id) {
this.scope.renames["$" + statement.id.name] = undefined;
this.scope.definitions.push(statement.id.name);
}
this.walkClass(statement);
};

View File

@ -4,7 +4,7 @@
"author": "Tobias Koppers @sokra",
"description": "Packs CommonJs/AMD modules for the browser. Allows to split your codebase into multiple bundles, which can be loaded on demand. Support loaders to preprocess files, i.e. json, jsx, es7, css, less, ... and your custom stuff.",
"dependencies": {
"acorn": "^4.0.4",
"acorn": "^5.0.0",
"acorn-dynamic-import": "^2.0.0",
"ajv": "^4.7.0",
"ajv-keywords": "^1.1.1",