mirror of
https://github.com/scratchfoundation/scratch-paint.git
synced 2025-07-12 04:54:33 -04:00
Build for c69a17302f
fix(deps): lock file maintenance (#2608)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
This commit is contained in:
parent
c49e5845e8
commit
53504d00c0
2 changed files with 93 additions and 30 deletions
121
playground.js
121
playground.js
|
@ -29177,7 +29177,7 @@ var pp$9 = Parser.prototype;
|
|||
|
||||
// ## Parser utilities
|
||||
|
||||
var literal = /^(?:'((?:\\.|[^'\\])*?)'|"((?:\\.|[^"\\])*?)")/;
|
||||
var literal = /^(?:'((?:\\.|[^'\\])*?)'|"((?:\\.|[^"\\])*?)")/s;
|
||||
pp$9.strictDirective = function(start) {
|
||||
if (this.options.ecmaVersion < 5) { return false }
|
||||
for (;;) {
|
||||
|
@ -29363,7 +29363,7 @@ pp$8.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 || nextCh === 92) { return true } // '[', '/'
|
||||
if (nextCh === 91 || nextCh === 92) { return true } // '[', '\'
|
||||
if (context) { return false }
|
||||
|
||||
if (nextCh === 123 || nextCh > 0xd7ff && nextCh < 0xdc00) { return true } // '{', astral
|
||||
|
@ -29556,13 +29556,19 @@ pp$8.parseForStatement = function(node) {
|
|||
return this.parseFor(node, init$1)
|
||||
}
|
||||
var startsWithLet = this.isContextual("let"), isForOf = false;
|
||||
var containsEsc = this.containsEsc;
|
||||
var refDestructuringErrors = new DestructuringErrors;
|
||||
var init = this.parseExpression(awaitAt > -1 ? "await" : true, refDestructuringErrors);
|
||||
var initPos = this.start;
|
||||
var init = awaitAt > -1
|
||||
? this.parseExprSubscripts(refDestructuringErrors, "await")
|
||||
: this.parseExpression(true, refDestructuringErrors);
|
||||
if (this.type === types$1._in || (isForOf = this.options.ecmaVersion >= 6 && this.isContextual("of"))) {
|
||||
if (this.options.ecmaVersion >= 9) {
|
||||
if (this.type === types$1._in) {
|
||||
if (awaitAt > -1) { this.unexpected(awaitAt); }
|
||||
} else { node.await = awaitAt > -1; }
|
||||
if (awaitAt > -1) { // implies `ecmaVersion >= 9` (see declaration of awaitAt)
|
||||
if (this.type === types$1._in) { this.unexpected(awaitAt); }
|
||||
node.await = true;
|
||||
} else if (isForOf && this.options.ecmaVersion >= 8) {
|
||||
if (init.start === initPos && !containsEsc && init.type === "Identifier" && init.name === "async") { this.unexpected(); }
|
||||
else if (this.options.ecmaVersion >= 9) { node.await = false; }
|
||||
}
|
||||
if (startsWithLet && isForOf) { this.raise(init.start, "The left-hand side of a for-of loop may not start with 'let'."); }
|
||||
this.toAssignable(init, false, refDestructuringErrors);
|
||||
|
@ -31175,8 +31181,7 @@ pp$5.parseMaybeUnary = function(refDestructuringErrors, sawUnary, incDec, forIni
|
|||
node.argument = this.parseMaybeUnary(null, true, update, forInit);
|
||||
this.checkExpressionErrors(refDestructuringErrors, true);
|
||||
if (update) { this.checkLValSimple(node.argument); }
|
||||
else if (this.strict && node.operator === "delete" &&
|
||||
node.argument.type === "Identifier")
|
||||
else if (this.strict && node.operator === "delete" && isLocalVariableAccess(node.argument))
|
||||
{ this.raiseRecoverable(node.start, "Deleting local variable in strict mode"); }
|
||||
else if (node.operator === "delete" && isPrivateFieldAccess(node.argument))
|
||||
{ this.raiseRecoverable(node.start, "Private fields can not be deleted"); }
|
||||
|
@ -31211,10 +31216,18 @@ pp$5.parseMaybeUnary = function(refDestructuringErrors, sawUnary, incDec, forIni
|
|||
}
|
||||
};
|
||||
|
||||
function isLocalVariableAccess(node) {
|
||||
return (
|
||||
node.type === "Identifier" ||
|
||||
node.type === "ParenthesizedExpression" && isLocalVariableAccess(node.expression)
|
||||
)
|
||||
}
|
||||
|
||||
function isPrivateFieldAccess(node) {
|
||||
return (
|
||||
node.type === "MemberExpression" && node.property.type === "PrivateIdentifier" ||
|
||||
node.type === "ChainExpression" && isPrivateFieldAccess(node.expression)
|
||||
node.type === "ChainExpression" && isPrivateFieldAccess(node.expression) ||
|
||||
node.type === "ParenthesizedExpression" && isPrivateFieldAccess(node.expression)
|
||||
)
|
||||
}
|
||||
|
||||
|
@ -31641,7 +31654,7 @@ pp$5.parseTemplateElement = function(ref) {
|
|||
this.raiseRecoverable(this.start, "Bad escape sequence in untagged template literal");
|
||||
}
|
||||
elem.value = {
|
||||
raw: this.value,
|
||||
raw: this.value.replace(/\r\n?/g, "\n"),
|
||||
cooked: null
|
||||
};
|
||||
} else {
|
||||
|
@ -32316,6 +32329,30 @@ for (var i = 0, list = [9, 10, 11, 12, 13, 14]; i < list.length; i += 1) {
|
|||
|
||||
var pp$1 = Parser.prototype;
|
||||
|
||||
// Track disjunction structure to determine whether a duplicate
|
||||
// capture group name is allowed because it is in a separate branch.
|
||||
var BranchID = function BranchID(parent, base) {
|
||||
// Parent disjunction branch
|
||||
this.parent = parent;
|
||||
// Identifies this set of sibling branches
|
||||
this.base = base || this;
|
||||
};
|
||||
|
||||
BranchID.prototype.separatedFrom = function separatedFrom (alt) {
|
||||
// A branch is separate from another branch if they or any of
|
||||
// their parents are siblings in a given disjunction
|
||||
for (var self = this; self; self = self.parent) {
|
||||
for (var other = alt; other; other = other.parent) {
|
||||
if (self.base === other.base && self !== other) { return true }
|
||||
}
|
||||
}
|
||||
return false
|
||||
};
|
||||
|
||||
BranchID.prototype.sibling = function sibling () {
|
||||
return new BranchID(this.parent, this.base)
|
||||
};
|
||||
|
||||
var RegExpValidationState = function RegExpValidationState(parser) {
|
||||
this.parser = parser;
|
||||
this.validFlags = "gim" + (parser.options.ecmaVersion >= 6 ? "uy" : "") + (parser.options.ecmaVersion >= 9 ? "s" : "") + (parser.options.ecmaVersion >= 13 ? "d" : "") + (parser.options.ecmaVersion >= 15 ? "v" : "");
|
||||
|
@ -32332,8 +32369,9 @@ var RegExpValidationState = function RegExpValidationState(parser) {
|
|||
this.lastAssertionIsQuantifiable = false;
|
||||
this.numCapturingParens = 0;
|
||||
this.maxBackReference = 0;
|
||||
this.groupNames = [];
|
||||
this.groupNames = Object.create(null);
|
||||
this.backReferenceNames = [];
|
||||
this.branchID = null;
|
||||
};
|
||||
|
||||
RegExpValidationState.prototype.reset = function reset (start, pattern, flags) {
|
||||
|
@ -32465,6 +32503,11 @@ pp$1.validateRegExpFlags = function(state) {
|
|||
}
|
||||
};
|
||||
|
||||
function hasProp(obj) {
|
||||
for (var _ in obj) { return true }
|
||||
return false
|
||||
}
|
||||
|
||||
/**
|
||||
* Validate the pattern part of a given RegExpLiteral.
|
||||
*
|
||||
|
@ -32479,7 +32522,7 @@ pp$1.validateRegExpPattern = function(state) {
|
|||
// |Pattern[~U, +N]| and use this result instead. Throw a *SyntaxError*
|
||||
// exception if _P_ did not conform to the grammar, if any elements of _P_
|
||||
// were not matched by the parse, or if any Early Error conditions exist.
|
||||
if (!state.switchN && this.options.ecmaVersion >= 9 && state.groupNames.length > 0) {
|
||||
if (!state.switchN && this.options.ecmaVersion >= 9 && hasProp(state.groupNames)) {
|
||||
state.switchN = true;
|
||||
this.regexp_pattern(state);
|
||||
}
|
||||
|
@ -32493,8 +32536,9 @@ pp$1.regexp_pattern = function(state) {
|
|||
state.lastAssertionIsQuantifiable = false;
|
||||
state.numCapturingParens = 0;
|
||||
state.maxBackReference = 0;
|
||||
state.groupNames.length = 0;
|
||||
state.groupNames = Object.create(null);
|
||||
state.backReferenceNames.length = 0;
|
||||
state.branchID = null;
|
||||
|
||||
this.regexp_disjunction(state);
|
||||
|
||||
|
@ -32513,7 +32557,7 @@ pp$1.regexp_pattern = function(state) {
|
|||
for (var i = 0, list = state.backReferenceNames; i < list.length; i += 1) {
|
||||
var name = list[i];
|
||||
|
||||
if (state.groupNames.indexOf(name) === -1) {
|
||||
if (!state.groupNames[name]) {
|
||||
state.raise("Invalid named capture referenced");
|
||||
}
|
||||
}
|
||||
|
@ -32521,10 +32565,14 @@ pp$1.regexp_pattern = function(state) {
|
|||
|
||||
// https://www.ecma-international.org/ecma-262/8.0/#prod-Disjunction
|
||||
pp$1.regexp_disjunction = function(state) {
|
||||
var trackDisjunction = this.options.ecmaVersion >= 16;
|
||||
if (trackDisjunction) { state.branchID = new BranchID(state.branchID, null); }
|
||||
this.regexp_alternative(state);
|
||||
while (state.eat(0x7C /* | */)) {
|
||||
if (trackDisjunction) { state.branchID = state.branchID.sibling(); }
|
||||
this.regexp_alternative(state);
|
||||
}
|
||||
if (trackDisjunction) { state.branchID = state.branchID.parent; }
|
||||
|
||||
// Make the same message as V8.
|
||||
if (this.regexp_eatQuantifier(state, true)) {
|
||||
|
@ -32537,8 +32585,7 @@ pp$1.regexp_disjunction = function(state) {
|
|||
|
||||
// https://www.ecma-international.org/ecma-262/8.0/#prod-Alternative
|
||||
pp$1.regexp_alternative = function(state) {
|
||||
while (state.pos < state.source.length && this.regexp_eatTerm(state))
|
||||
{ }
|
||||
while (state.pos < state.source.length && this.regexp_eatTerm(state)) {}
|
||||
};
|
||||
|
||||
// https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-Term
|
||||
|
@ -32776,14 +32823,26 @@ pp$1.regexp_eatExtendedPatternCharacter = function(state) {
|
|||
// `?` GroupName
|
||||
pp$1.regexp_groupSpecifier = function(state) {
|
||||
if (state.eat(0x3F /* ? */)) {
|
||||
if (this.regexp_eatGroupName(state)) {
|
||||
if (state.groupNames.indexOf(state.lastStringValue) !== -1) {
|
||||
if (!this.regexp_eatGroupName(state)) { state.raise("Invalid group"); }
|
||||
var trackDisjunction = this.options.ecmaVersion >= 16;
|
||||
var known = state.groupNames[state.lastStringValue];
|
||||
if (known) {
|
||||
if (trackDisjunction) {
|
||||
for (var i = 0, list = known; i < list.length; i += 1) {
|
||||
var altID = list[i];
|
||||
|
||||
if (!altID.separatedFrom(state.branchID))
|
||||
{ state.raise("Duplicate capture group name"); }
|
||||
}
|
||||
} else {
|
||||
state.raise("Duplicate capture group name");
|
||||
}
|
||||
state.groupNames.push(state.lastStringValue);
|
||||
return
|
||||
}
|
||||
state.raise("Invalid group");
|
||||
if (trackDisjunction) {
|
||||
(known || (state.groupNames[state.lastStringValue] = [])).push(state.branchID);
|
||||
} else {
|
||||
state.groupNames[state.lastStringValue] = true;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -34288,15 +34347,18 @@ pp.readInvalidTemplateToken = function() {
|
|||
break
|
||||
|
||||
case "$":
|
||||
if (this.input[this.pos + 1] !== "{") {
|
||||
break
|
||||
}
|
||||
|
||||
// falls through
|
||||
if (this.input[this.pos + 1] !== "{") { break }
|
||||
// fall through
|
||||
case "`":
|
||||
return this.finishToken(types$1.invalidTemplate, this.input.slice(this.start, this.pos))
|
||||
|
||||
// no default
|
||||
case "\r":
|
||||
if (this.input[this.pos + 1] === "\n") { ++this.pos; }
|
||||
// fall through
|
||||
case "\n": case "\u2028": case "\u2029":
|
||||
++this.curLine;
|
||||
this.lineStart = this.pos + 1;
|
||||
break
|
||||
}
|
||||
}
|
||||
this.raise(this.start, "Unterminated template");
|
||||
|
@ -34359,6 +34421,7 @@ pp.readEscapedChar = function(inTemplate) {
|
|||
if (isNewLine(ch)) {
|
||||
// Unicode new line characters after \ get removed from output in both
|
||||
// template literals and strings
|
||||
if (this.options.locations) { this.lineStart = this.pos; ++this.curLine; }
|
||||
return ""
|
||||
}
|
||||
return String.fromCharCode(ch)
|
||||
|
@ -34437,7 +34500,7 @@ pp.readWord = function() {
|
|||
// [walk]: util/walk.js
|
||||
|
||||
|
||||
var version = "8.11.3";
|
||||
var version = "8.12.0";
|
||||
|
||||
Parser.acorn = {
|
||||
Parser: Parser,
|
||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue