mirror of
https://github.com/S2-/minifyfromhtml.git
synced 2025-08-02 20:00:05 +02:00
update node modules
This commit is contained in:
31
node_modules/acorn/dist/acorn.mjs
generated
vendored
31
node_modules/acorn/dist/acorn.mjs
generated
vendored
@@ -315,9 +315,10 @@ function getLineInfo(input, offset) {
|
||||
var defaultOptions = {
|
||||
// `ecmaVersion` indicates the ECMAScript version to parse. Must be
|
||||
// either 3, 5, 6 (or 2015), 7 (2016), 8 (2017), 9 (2018), 10
|
||||
// (2019), 11 (2020), 12 (2021), or `"latest"` (the latest version
|
||||
// the library supports). This influences support for strict mode,
|
||||
// the set of reserved words, and support for new syntax features.
|
||||
// (2019), 11 (2020), 12 (2021), 13 (2022), or `"latest"` (the
|
||||
// latest version the library supports). This influences support
|
||||
// for strict mode, the set of reserved words, and support for
|
||||
// new syntax features.
|
||||
ecmaVersion: null,
|
||||
// `sourceType` indicates the mode the code should be parsed in.
|
||||
// Can be either `"script"` or `"module"`. This influences global
|
||||
@@ -344,9 +345,13 @@ var defaultOptions = {
|
||||
// appearing at the top of the program, and an import.meta expression
|
||||
// in a script isn't considered an error.
|
||||
allowImportExportEverywhere: false,
|
||||
// By default, await identifiers are allowed to appear at the top-level scope only if ecmaVersion >= 2022.
|
||||
// When enabled, await identifiers are allowed to appear at the top-level scope,
|
||||
// but they are still not allowed in non-async functions.
|
||||
allowAwaitOutsideFunction: false,
|
||||
allowAwaitOutsideFunction: null,
|
||||
// When enabled, super identifiers are not constrained to
|
||||
// appearing in methods and do not raise an error when they appear elsewhere.
|
||||
allowSuperOutsideMethod: null,
|
||||
// When enabled, hashbang directive in the beginning of file
|
||||
// is allowed and treated as a line comment.
|
||||
allowHashBang: false,
|
||||
@@ -422,6 +427,8 @@ function getOptions(opts) {
|
||||
|
||||
if (options.allowReserved == null)
|
||||
{ options.allowReserved = options.ecmaVersion < 5; }
|
||||
if (options.allowAwaitOutsideFunction == null)
|
||||
{ options.allowAwaitOutsideFunction = options.ecmaVersion >= 13; }
|
||||
|
||||
if (isArray(options.onToken)) {
|
||||
var tokens = options.onToken;
|
||||
@@ -574,7 +581,7 @@ prototypeAccessors.allowSuper.get = function () {
|
||||
var ref = this.currentThisScope();
|
||||
var flags = ref.flags;
|
||||
var inClassFieldInit = ref.inClassFieldInit;
|
||||
return (flags & SCOPE_SUPER) > 0 || inClassFieldInit
|
||||
return (flags & SCOPE_SUPER) > 0 || inClassFieldInit || this.options.allowSuperOutsideMethod
|
||||
};
|
||||
prototypeAccessors.allowDirectSuper.get = function () { return (this.currentThisScope().flags & SCOPE_DIRECT_SUPER) > 0 };
|
||||
prototypeAccessors.treatFunctionsAsVar.get = function () { return this.treatFunctionsAsVarInScope(this.currentScope()) };
|
||||
@@ -799,13 +806,14 @@ pp$1.isLet = function(context) {
|
||||
// Statement) is allowed here. If context is not empty then only a Statement
|
||||
// is allowed. However, `let [` is an explicit negative lookahead for
|
||||
// ExpressionStatement, so special-case it first.
|
||||
if (nextCh === 91) { return true } // '['
|
||||
if (nextCh === 91 || nextCh === 92 || nextCh > 0xd7ff && nextCh < 0xdc00) { return true } // '[', '/', astral
|
||||
if (context) { return false }
|
||||
|
||||
if (nextCh === 123) { return true } // '{'
|
||||
if (isIdentifierStart(nextCh, true)) {
|
||||
var pos = next + 1;
|
||||
while (isIdentifierChar(this.input.charCodeAt(pos), true)) { ++pos; }
|
||||
while (isIdentifierChar(nextCh = this.input.charCodeAt(pos), true)) { ++pos; }
|
||||
if (nextCh === 92 || nextCh > 0xd7ff && nextCh < 0xdc00) { return true }
|
||||
var ident = this.input.slice(next, pos);
|
||||
if (!keywordRelationalOperator.test(ident)) { return true }
|
||||
}
|
||||
@@ -821,10 +829,11 @@ pp$1.isAsyncFunction = function() {
|
||||
|
||||
skipWhiteSpace.lastIndex = this.pos;
|
||||
var skip = skipWhiteSpace.exec(this.input);
|
||||
var next = this.pos + skip[0].length;
|
||||
var next = this.pos + skip[0].length, after;
|
||||
return !lineBreak.test(this.input.slice(this.pos, next)) &&
|
||||
this.input.slice(next, next + 8) === "function" &&
|
||||
(next + 8 === this.input.length || !isIdentifierChar(this.input.charAt(next + 8)))
|
||||
(next + 8 === this.input.length ||
|
||||
!(isIdentifierChar(after = this.input.charCodeAt(next + 8)) || after > 0xd7ff && after < 0xdc00))
|
||||
};
|
||||
|
||||
// Parse a single statement.
|
||||
@@ -3561,7 +3570,7 @@ var pp$8 = Parser.prototype;
|
||||
|
||||
var RegExpValidationState = function RegExpValidationState(parser) {
|
||||
this.parser = parser;
|
||||
this.validFlags = "gim" + (parser.options.ecmaVersion >= 6 ? "uy" : "") + (parser.options.ecmaVersion >= 9 ? "s" : "");
|
||||
this.validFlags = "gim" + (parser.options.ecmaVersion >= 6 ? "uy" : "") + (parser.options.ecmaVersion >= 9 ? "s" : "") + (parser.options.ecmaVersion >= 13 ? "d" : "");
|
||||
this.unicodeProperties = data[parser.options.ecmaVersion >= 12 ? 12 : parser.options.ecmaVersion];
|
||||
this.source = "";
|
||||
this.flags = "";
|
||||
@@ -5426,7 +5435,7 @@ pp$9.readWord = function() {
|
||||
|
||||
// Acorn is a tiny, fast JavaScript parser written in JavaScript.
|
||||
|
||||
var version = "8.2.4";
|
||||
var version = "8.4.0";
|
||||
|
||||
Parser.acorn = {
|
||||
Parser: Parser,
|
||||
|
Reference in New Issue
Block a user