Updating NPM dependencies

This commit is contained in:
Drew Heavner
2020-11-11 13:30:52 +00:00
committed by GitHub
parent 7a6fb66c63
commit bd487ef324
9068 changed files with 1400893 additions and 587661 deletions

View File

@@ -9,12 +9,15 @@ var _scopeflags = require("./scopeflags");
var N = _interopRequireWildcard(require("../types"));
var _error = require("../parser/error");
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
class Scope {
constructor(flags) {
this.flags = void 0;
this.var = [];
this.lexical = [];
this.functions = [];
@@ -38,24 +41,6 @@ class ScopeHandler {
return (this.currentVarScope().flags & _scopeflags.SCOPE_FUNCTION) > 0;
}
get inGenerator() {
return (this.currentVarScope().flags & _scopeflags.SCOPE_GENERATOR) > 0;
}
get inAsync() {
for (let i = this.scopeStack.length - 1;; i--) {
const scope = this.scopeStack[i];
const isVarScope = scope.flags & _scopeflags.SCOPE_VAR;
const isClassScope = scope.flags & _scopeflags.SCOPE_CLASS;
if (isClassScope && !isVarScope) {
return false;
} else if (isVarScope) {
return (scope.flags & _scopeflags.SCOPE_ASYNC) > 0;
}
}
}
get allowSuper() {
return (this.currentThisScope().flags & _scopeflags.SCOPE_SUPER) > 0;
}
@@ -130,7 +115,7 @@ class ScopeHandler {
checkRedeclarationInScope(scope, name, bindingType, pos) {
if (this.isRedeclaredInScope(scope, name, bindingType)) {
this.raise(pos, `Identifier '${name}' has already been declared`);
this.raise(pos, _error.Errors.VarRedeclaration, name);
}
}