mirror of
https://github.com/crazy-max/ghaction-upx.git
synced 2025-12-13 00:10:41 -07:00
Update node_modules
This commit is contained in:
102
node_modules/@babel/parser/lib/tokenizer/context.js
generated
vendored
Normal file
102
node_modules/@babel/parser/lib/tokenizer/context.js
generated
vendored
Normal file
@@ -0,0 +1,102 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.types = exports.TokContext = void 0;
|
||||
|
||||
var _types = require("./types");
|
||||
|
||||
var _whitespace = require("../util/whitespace");
|
||||
|
||||
class TokContext {
|
||||
constructor(token, isExpr, preserveSpace, override) {
|
||||
this.token = token;
|
||||
this.isExpr = !!isExpr;
|
||||
this.preserveSpace = !!preserveSpace;
|
||||
this.override = override;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
exports.TokContext = TokContext;
|
||||
const types = {
|
||||
braceStatement: new TokContext("{", false),
|
||||
braceExpression: new TokContext("{", true),
|
||||
templateQuasi: new TokContext("${", false),
|
||||
parenStatement: new TokContext("(", false),
|
||||
parenExpression: new TokContext("(", true),
|
||||
template: new TokContext("`", true, true, p => p.readTmplToken()),
|
||||
functionExpression: new TokContext("function", true),
|
||||
functionStatement: new TokContext("function", false)
|
||||
};
|
||||
exports.types = types;
|
||||
|
||||
_types.types.parenR.updateContext = _types.types.braceR.updateContext = function () {
|
||||
if (this.state.context.length === 1) {
|
||||
this.state.exprAllowed = true;
|
||||
return;
|
||||
}
|
||||
|
||||
let out = this.state.context.pop();
|
||||
|
||||
if (out === types.braceStatement && this.curContext().token === "function") {
|
||||
out = this.state.context.pop();
|
||||
}
|
||||
|
||||
this.state.exprAllowed = !out.isExpr;
|
||||
};
|
||||
|
||||
_types.types.name.updateContext = function (prevType) {
|
||||
let allowed = false;
|
||||
|
||||
if (prevType !== _types.types.dot) {
|
||||
if (this.state.value === "of" && !this.state.exprAllowed || this.state.value === "yield" && this.scope.inGenerator) {
|
||||
allowed = true;
|
||||
}
|
||||
}
|
||||
|
||||
this.state.exprAllowed = allowed;
|
||||
|
||||
if (this.state.isIterator) {
|
||||
this.state.isIterator = false;
|
||||
}
|
||||
};
|
||||
|
||||
_types.types.braceL.updateContext = function (prevType) {
|
||||
this.state.context.push(this.braceIsBlock(prevType) ? types.braceStatement : types.braceExpression);
|
||||
this.state.exprAllowed = true;
|
||||
};
|
||||
|
||||
_types.types.dollarBraceL.updateContext = function () {
|
||||
this.state.context.push(types.templateQuasi);
|
||||
this.state.exprAllowed = true;
|
||||
};
|
||||
|
||||
_types.types.parenL.updateContext = function (prevType) {
|
||||
const statementParens = prevType === _types.types._if || prevType === _types.types._for || prevType === _types.types._with || prevType === _types.types._while;
|
||||
this.state.context.push(statementParens ? types.parenStatement : types.parenExpression);
|
||||
this.state.exprAllowed = true;
|
||||
};
|
||||
|
||||
_types.types.incDec.updateContext = function () {};
|
||||
|
||||
_types.types._function.updateContext = _types.types._class.updateContext = function (prevType) {
|
||||
if (prevType.beforeExpr && prevType !== _types.types.semi && prevType !== _types.types._else && !(prevType === _types.types._return && _whitespace.lineBreak.test(this.input.slice(this.state.lastTokEnd, this.state.start))) && !((prevType === _types.types.colon || prevType === _types.types.braceL) && this.curContext() === types.b_stat)) {
|
||||
this.state.context.push(types.functionExpression);
|
||||
} else {
|
||||
this.state.context.push(types.functionStatement);
|
||||
}
|
||||
|
||||
this.state.exprAllowed = false;
|
||||
};
|
||||
|
||||
_types.types.backQuote.updateContext = function () {
|
||||
if (this.curContext() === types.template) {
|
||||
this.state.context.pop();
|
||||
} else {
|
||||
this.state.context.push(types.template);
|
||||
}
|
||||
|
||||
this.state.exprAllowed = false;
|
||||
};
|
||||
1215
node_modules/@babel/parser/lib/tokenizer/index.js
generated
vendored
Normal file
1215
node_modules/@babel/parser/lib/tokenizer/index.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
98
node_modules/@babel/parser/lib/tokenizer/state.js
generated
vendored
Normal file
98
node_modules/@babel/parser/lib/tokenizer/state.js
generated
vendored
Normal file
@@ -0,0 +1,98 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = void 0;
|
||||
|
||||
var N = _interopRequireWildcard(require("../types"));
|
||||
|
||||
var _location = require("../util/location");
|
||||
|
||||
var _context = require("./context");
|
||||
|
||||
var _types2 = require("./types");
|
||||
|
||||
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 State {
|
||||
constructor() {
|
||||
this.errors = [];
|
||||
this.potentialArrowAt = -1;
|
||||
this.noArrowAt = [];
|
||||
this.noArrowParamsConversionAt = [];
|
||||
this.inParameters = false;
|
||||
this.maybeInArrowParameters = false;
|
||||
this.inPipeline = false;
|
||||
this.inType = false;
|
||||
this.noAnonFunctionType = false;
|
||||
this.inPropertyName = false;
|
||||
this.hasFlowComment = false;
|
||||
this.isIterator = false;
|
||||
this.topicContext = {
|
||||
maxNumOfResolvableTopics: 0,
|
||||
maxTopicIndex: null
|
||||
};
|
||||
this.soloAwait = false;
|
||||
this.inFSharpPipelineDirectBody = false;
|
||||
this.labels = [];
|
||||
this.decoratorStack = [[]];
|
||||
this.yieldPos = -1;
|
||||
this.awaitPos = -1;
|
||||
this.tokens = [];
|
||||
this.comments = [];
|
||||
this.trailingComments = [];
|
||||
this.leadingComments = [];
|
||||
this.commentStack = [];
|
||||
this.commentPreviousNode = null;
|
||||
this.pos = 0;
|
||||
this.lineStart = 0;
|
||||
this.type = _types2.types.eof;
|
||||
this.value = null;
|
||||
this.start = 0;
|
||||
this.end = 0;
|
||||
this.lastTokEndLoc = null;
|
||||
this.lastTokStartLoc = null;
|
||||
this.lastTokStart = 0;
|
||||
this.lastTokEnd = 0;
|
||||
this.context = [_context.types.braceStatement];
|
||||
this.exprAllowed = true;
|
||||
this.containsEsc = false;
|
||||
this.containsOctal = false;
|
||||
this.octalPosition = null;
|
||||
this.exportedIdentifiers = [];
|
||||
}
|
||||
|
||||
init(options) {
|
||||
this.strict = options.strictMode === false ? false : options.sourceType === "module";
|
||||
this.curLine = options.startLine;
|
||||
this.startLoc = this.endLoc = this.curPosition();
|
||||
}
|
||||
|
||||
curPosition() {
|
||||
return new _location.Position(this.curLine, this.pos - this.lineStart);
|
||||
}
|
||||
|
||||
clone(skipArrays) {
|
||||
const state = new State();
|
||||
const keys = Object.keys(this);
|
||||
|
||||
for (let i = 0, length = keys.length; i < length; i++) {
|
||||
const key = keys[i];
|
||||
let val = this[key];
|
||||
|
||||
if (!skipArrays && Array.isArray(val)) {
|
||||
val = val.slice();
|
||||
}
|
||||
|
||||
state[key] = val;
|
||||
}
|
||||
|
||||
return state;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
exports.default = State;
|
||||
267
node_modules/@babel/parser/lib/tokenizer/types.js
generated
vendored
Normal file
267
node_modules/@babel/parser/lib/tokenizer/types.js
generated
vendored
Normal file
@@ -0,0 +1,267 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.types = exports.keywords = exports.TokenType = void 0;
|
||||
const beforeExpr = true;
|
||||
const startsExpr = true;
|
||||
const isLoop = true;
|
||||
const isAssign = true;
|
||||
const prefix = true;
|
||||
const postfix = true;
|
||||
|
||||
class TokenType {
|
||||
constructor(label, conf = {}) {
|
||||
this.label = label;
|
||||
this.keyword = conf.keyword;
|
||||
this.beforeExpr = !!conf.beforeExpr;
|
||||
this.startsExpr = !!conf.startsExpr;
|
||||
this.rightAssociative = !!conf.rightAssociative;
|
||||
this.isLoop = !!conf.isLoop;
|
||||
this.isAssign = !!conf.isAssign;
|
||||
this.prefix = !!conf.prefix;
|
||||
this.postfix = !!conf.postfix;
|
||||
this.binop = conf.binop != null ? conf.binop : null;
|
||||
this.updateContext = null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
exports.TokenType = TokenType;
|
||||
const keywords = new Map();
|
||||
exports.keywords = keywords;
|
||||
|
||||
function createKeyword(name, options = {}) {
|
||||
options.keyword = name;
|
||||
const token = new TokenType(name, options);
|
||||
keywords.set(name, token);
|
||||
return token;
|
||||
}
|
||||
|
||||
function createBinop(name, binop) {
|
||||
return new TokenType(name, {
|
||||
beforeExpr,
|
||||
binop
|
||||
});
|
||||
}
|
||||
|
||||
const types = {
|
||||
num: new TokenType("num", {
|
||||
startsExpr
|
||||
}),
|
||||
bigint: new TokenType("bigint", {
|
||||
startsExpr
|
||||
}),
|
||||
regexp: new TokenType("regexp", {
|
||||
startsExpr
|
||||
}),
|
||||
string: new TokenType("string", {
|
||||
startsExpr
|
||||
}),
|
||||
name: new TokenType("name", {
|
||||
startsExpr
|
||||
}),
|
||||
eof: new TokenType("eof"),
|
||||
bracketL: new TokenType("[", {
|
||||
beforeExpr,
|
||||
startsExpr
|
||||
}),
|
||||
bracketR: new TokenType("]"),
|
||||
braceL: new TokenType("{", {
|
||||
beforeExpr,
|
||||
startsExpr
|
||||
}),
|
||||
braceBarL: new TokenType("{|", {
|
||||
beforeExpr,
|
||||
startsExpr
|
||||
}),
|
||||
braceR: new TokenType("}"),
|
||||
braceBarR: new TokenType("|}"),
|
||||
parenL: new TokenType("(", {
|
||||
beforeExpr,
|
||||
startsExpr
|
||||
}),
|
||||
parenR: new TokenType(")"),
|
||||
comma: new TokenType(",", {
|
||||
beforeExpr
|
||||
}),
|
||||
semi: new TokenType(";", {
|
||||
beforeExpr
|
||||
}),
|
||||
colon: new TokenType(":", {
|
||||
beforeExpr
|
||||
}),
|
||||
doubleColon: new TokenType("::", {
|
||||
beforeExpr
|
||||
}),
|
||||
dot: new TokenType("."),
|
||||
question: new TokenType("?", {
|
||||
beforeExpr
|
||||
}),
|
||||
questionDot: new TokenType("?."),
|
||||
arrow: new TokenType("=>", {
|
||||
beforeExpr
|
||||
}),
|
||||
template: new TokenType("template"),
|
||||
ellipsis: new TokenType("...", {
|
||||
beforeExpr
|
||||
}),
|
||||
backQuote: new TokenType("`", {
|
||||
startsExpr
|
||||
}),
|
||||
dollarBraceL: new TokenType("${", {
|
||||
beforeExpr,
|
||||
startsExpr
|
||||
}),
|
||||
at: new TokenType("@"),
|
||||
hash: new TokenType("#", {
|
||||
startsExpr
|
||||
}),
|
||||
interpreterDirective: new TokenType("#!..."),
|
||||
eq: new TokenType("=", {
|
||||
beforeExpr,
|
||||
isAssign
|
||||
}),
|
||||
assign: new TokenType("_=", {
|
||||
beforeExpr,
|
||||
isAssign
|
||||
}),
|
||||
incDec: new TokenType("++/--", {
|
||||
prefix,
|
||||
postfix,
|
||||
startsExpr
|
||||
}),
|
||||
bang: new TokenType("!", {
|
||||
beforeExpr,
|
||||
prefix,
|
||||
startsExpr
|
||||
}),
|
||||
tilde: new TokenType("~", {
|
||||
beforeExpr,
|
||||
prefix,
|
||||
startsExpr
|
||||
}),
|
||||
pipeline: createBinop("|>", 0),
|
||||
nullishCoalescing: createBinop("??", 1),
|
||||
logicalOR: createBinop("||", 2),
|
||||
logicalAND: createBinop("&&", 3),
|
||||
bitwiseOR: createBinop("|", 4),
|
||||
bitwiseXOR: createBinop("^", 5),
|
||||
bitwiseAND: createBinop("&", 6),
|
||||
equality: createBinop("==/!=/===/!==", 7),
|
||||
relational: createBinop("</>/<=/>=", 8),
|
||||
bitShift: createBinop("<</>>/>>>", 9),
|
||||
plusMin: new TokenType("+/-", {
|
||||
beforeExpr,
|
||||
binop: 10,
|
||||
prefix,
|
||||
startsExpr
|
||||
}),
|
||||
modulo: new TokenType("%", {
|
||||
beforeExpr,
|
||||
binop: 11,
|
||||
startsExpr
|
||||
}),
|
||||
star: createBinop("*", 11),
|
||||
slash: createBinop("/", 11),
|
||||
exponent: new TokenType("**", {
|
||||
beforeExpr,
|
||||
binop: 12,
|
||||
rightAssociative: true
|
||||
}),
|
||||
_break: createKeyword("break"),
|
||||
_case: createKeyword("case", {
|
||||
beforeExpr
|
||||
}),
|
||||
_catch: createKeyword("catch"),
|
||||
_continue: createKeyword("continue"),
|
||||
_debugger: createKeyword("debugger"),
|
||||
_default: createKeyword("default", {
|
||||
beforeExpr
|
||||
}),
|
||||
_do: createKeyword("do", {
|
||||
isLoop,
|
||||
beforeExpr
|
||||
}),
|
||||
_else: createKeyword("else", {
|
||||
beforeExpr
|
||||
}),
|
||||
_finally: createKeyword("finally"),
|
||||
_for: createKeyword("for", {
|
||||
isLoop
|
||||
}),
|
||||
_function: createKeyword("function", {
|
||||
startsExpr
|
||||
}),
|
||||
_if: createKeyword("if"),
|
||||
_return: createKeyword("return", {
|
||||
beforeExpr
|
||||
}),
|
||||
_switch: createKeyword("switch"),
|
||||
_throw: createKeyword("throw", {
|
||||
beforeExpr,
|
||||
prefix,
|
||||
startsExpr
|
||||
}),
|
||||
_try: createKeyword("try"),
|
||||
_var: createKeyword("var"),
|
||||
_const: createKeyword("const"),
|
||||
_while: createKeyword("while", {
|
||||
isLoop
|
||||
}),
|
||||
_with: createKeyword("with"),
|
||||
_new: createKeyword("new", {
|
||||
beforeExpr,
|
||||
startsExpr
|
||||
}),
|
||||
_this: createKeyword("this", {
|
||||
startsExpr
|
||||
}),
|
||||
_super: createKeyword("super", {
|
||||
startsExpr
|
||||
}),
|
||||
_class: createKeyword("class", {
|
||||
startsExpr
|
||||
}),
|
||||
_extends: createKeyword("extends", {
|
||||
beforeExpr
|
||||
}),
|
||||
_export: createKeyword("export"),
|
||||
_import: createKeyword("import", {
|
||||
startsExpr
|
||||
}),
|
||||
_null: createKeyword("null", {
|
||||
startsExpr
|
||||
}),
|
||||
_true: createKeyword("true", {
|
||||
startsExpr
|
||||
}),
|
||||
_false: createKeyword("false", {
|
||||
startsExpr
|
||||
}),
|
||||
_in: createKeyword("in", {
|
||||
beforeExpr,
|
||||
binop: 8
|
||||
}),
|
||||
_instanceof: createKeyword("instanceof", {
|
||||
beforeExpr,
|
||||
binop: 8
|
||||
}),
|
||||
_typeof: createKeyword("typeof", {
|
||||
beforeExpr,
|
||||
prefix,
|
||||
startsExpr
|
||||
}),
|
||||
_void: createKeyword("void", {
|
||||
beforeExpr,
|
||||
prefix,
|
||||
startsExpr
|
||||
}),
|
||||
_delete: createKeyword("delete", {
|
||||
beforeExpr,
|
||||
prefix,
|
||||
startsExpr
|
||||
})
|
||||
};
|
||||
exports.types = types;
|
||||
Reference in New Issue
Block a user