esjs-loader
Version:
Módulo EsJS para Node.js
1,471 lines (1,437 loc) • 5.77 MB
JavaScript
import require$$0$2 from 'tty';
import require$$1$1 from 'os';
import require$$2$1 from 'util';
import require$$1$2 from 'fs';
import require$$0$3 from 'process';
import require$$1$3 from 'path';
import require$$1$4 from 'module';
import require$$0$4 from 'node:path';
import require$$0$5 from 'events';
import { readFile } from 'fs/promises';
import { pathToFileURL, fileURLToPath } from 'url';
const keywordControl = /* @__PURE__ */ new Map([
["capturar", "catch"],
["caso", "case"],
["con", "with"],
["continuar", "continue"],
["crear", "new"],
["desde", "from"],
["elegir", "switch"],
["esperar", "await"],
["exportar", "export"],
["hacer", "do"],
["importar", "import"],
["mientras", "while"],
["para", "for"],
["retornar", "return"],
["sino", "else"],
["osi", "else if"],
["si", "if"],
["constructor", "constructor"],
["eliminar", "delete"],
["extiende", "extends"],
["finalmente", "finally"],
["instanciaDe", "instanceof"],
["intentar", "try"],
["lanzar", "throw"],
["longitud", "length"],
["romper", "break"],
["simbolo", "symbol"],
["subcad", "substr"],
["tipoDe", "typeof"],
["vacio", "void"],
["producir", "yield"]
]);
const constantLanguage = /* @__PURE__ */ new Map([
["falso", "false"],
["nulo", "null"],
["verdadero", "true"],
["indefinido", "undefined"],
["Infinito", "Infinity"],
["NuN", "NaN"],
["ambienteGlobal", "globalThis"],
["esNuN", "isNaN"]
]);
const variableLanguage = /* @__PURE__ */ new Map([
["ambiente", "this"],
["super", "super"]
]);
const storageType = /* @__PURE__ */ new Map([
["asincrono", "async"],
["clase", "class"],
["const", "const"],
["global", "var"],
["var", "var"],
["mut", "let"],
["porDefecto", "default"],
// ['obtener', 'get'],
// ['establecer', 'set'],
["funcion", "function"]
]);
const metaVariable = /* @__PURE__ */ new Map([
["de", "of"],
["en", "in"]
]);
const supportFunction = /* @__PURE__ */ new Map([
["consola", "console"],
["depurador", "debugger"],
["establecerTemporizador", "setTimeout"],
["establecerIntervalo", "setInterval"],
["Fecha", "Date"],
["Numero", "Number"],
["Mate", "Math"],
["Arreglo", "Array"],
["Matriz", "Array"],
["Booleano", "Boolean"],
["Cadena", "String"],
["Funcion", "Function"],
["Promesa", "Promise"]
]);
const promiseMethods = /* @__PURE__ */ new Map([
["todos", "all"],
["todosTerminados", "allSettled"],
["cualquiera", "any"],
["capturar", "catch"],
["finalmente", "finally"],
["carrera", "race"],
["rechaza", "reject"],
["resuelve", "resolve"],
["luego", "then"]
]);
const dateMethods = /* @__PURE__ */ new Map([
["obtenerDia", "getDate"],
["obtenerDiaSemana", "getDay"],
["obtenerAnio", "getFullYear"],
["obtenerA\xF1o", "getFullYear"],
["obtenerHoras", "getHours"],
["obtenerMilisegundos", "getMilliseconds"],
["obtenerMinutos", "getMinutes"],
["obtenerMes", "getMonth"],
["obtenerSegundos", "getSeconds"],
["obtenerTiempo", "getTime"],
["obtenerDesfaseDeZonaHoraria", "getTimezoneOffset"],
["obtenerDiaUTC", "getUTCDate"],
["obtenerDiaSemanaUTC", "getUTCDay"],
["obtenerAnioUTC", "getUTCFullYear"],
["obtenerA\xF1oUTC", "getUTCFullYear"],
["obtenerHorasUTC", "getUTCHours"],
["obtenerMilisegundosUTC", "getUTCMilliseconds"],
["obtenerMinutosUTC", "getUTCMinutes"],
["obtenerMesUTC", "getUTCMonth"],
["obtenerSegundosUTC", "getUTCSeconds"],
["ahora", "now"],
["analizar", "parse"],
["establecerFecha", "setDate"],
["establecerAnio", "setFullYear"],
["establecerA\xF1o", "setFullYear"],
["establecerHoras", "setHours"],
["establecerMilisegundos", "setMilliseconds"],
["establecerMinutos", "setMinutes"],
["establecerMes", "setMonth"],
["establecerSegundos", "setSeconds"],
["establecerTiempo", "setTime"],
["establecerFechaUTC", "setUTCDate"],
["establecerAnioUTC", "setUTCFullYear"],
["establecerA\xF1oUTC", "setUTCFullYear"],
["establecerHorasUTC", "setUTCHours"],
["establecerMilisegundosUTC", "setUTCMilliseconds"],
["establecerMinutosUTC", "setUTCMinutes"],
["establecerMesUTC", "setUTCMonth"],
["establecerSegundosUTC", "setUTCSeconds"],
["aCadenaFecha", "toDateString"],
["aCadenaISO", "toISOString"],
["aJSON", "toJSON"],
["aCadenaFechaLocale", "toLocaleDateString"],
["aCadenaLocale", "toLocaleString"],
["aCadenaTiempoLocale", "toLocaleTimeString"],
["aCadena", "toString"],
["aCadenaTiempo", "toTimeString"],
["aCadenaUTC", "toUTCString"],
["UTC", "UTC"],
["valorDe", "valueOf"]
]);
const arrayMethods = /* @__PURE__ */ new Map([
["posicion", "at"],
["concatenar", "concat"],
["copiarDentro", "copyWithin"],
["entradas", "entries"],
["cada", "every"],
["llenar", "fill"],
["filtrar", "filter"],
["buscar", "find"],
["buscarIndice", "findIndex"],
["buscarUltimo", "findLast"],
["buscarUltimoIndice", "findLastIndex"],
["plano", "flat"],
["planoMapear", "flatMap"],
["paraCada", "forEach"],
["grupo", "group"],
["grupoAMapear", "groupToMap"],
["incluye", "includes"],
["indiceDe", "indexOf"],
["juntar", "join"],
["claves", "keys"],
["ultimoIndiceDe", "lastIndexOf"],
["mapear", "map"],
["sacar", "pop"],
["agregar", "push"],
["reducir", "reduce"],
["reducirDerecha", "reduceRight"],
["reverso", "reverse"],
["sacarPrimero", "shift"],
["rodaja", "slice"],
["algun", "some"],
["ordenar", "sort"],
["empalmar", "splice"],
["aCadenaLocalizada", "toLocaleString"],
["aCadena", "toString"],
["agregarInicio", "unshift"],
["valores", "values"]
]);
const mathMethods = /* @__PURE__ */ new Map([
["absoluto", "abs"],
["arcocoseno", "acos"],
["arcocosenoHiperbolico", "acosh"],
["arcoseno", "asin"],
["arcosenoHiperbolico", "asinh"],
["arcotangente", "atan"],
["arcotangente2", "atan2"],
["arcotangenteHiperbolica", "atanh"],
["raizCubica", "cbrt"],
["redondearHaciaArriba", "ceil"],
["cerosALaIzquierdaEn32Bits", "clz32"],
["coseno", "cos"],
["cosenoHiperbolico", "cosh"],
["exponencial", "exp"],
["exponencialMenos1", "expm1"],
["redondearHaciaAbajo", "floor"],
["redondearAComaFlotante", "fround"],
["hipotenusa", "hypot"],
["multiplicacionEntera", "imul"],
["logaritmo", "log"],
["logaritmoBase10", "log10"],
["logaritmoDe1Mas", "log1p"],
["logaritmoBase2", "log2"],
["maximo", "max"],
["minimo", "min"],
["potencia", "pow"],
["aleatorio", "random"],
["redondear", "round"],
["signo", "sign"],
["seno", "sin"],
["senoHiperbolico", "sinh"],
["raizCuadrada", "sqrt"],
["tangente", "tan"],
["tangenteHiperbolica", "tanh"],
["truncar", "trunc"]
]);
const numberMethods = /* @__PURE__ */ new Map([
["esFinito", "isFinite"],
["esEntero", "isInteger"],
["esEnteroSeguro", "isSafeInteger"],
["interpretarDecimal", "parseFloat"],
["interpretarEntero", "parseInt"],
["aExponencial", "toExponential"],
["fijarDecimales", "toFixed"],
["aCadenaLocalizada", "toLocaleString"],
["aPrecision", "toPrecision"],
["aCadena", "toString"],
["valorDe", "valueOf"]
]);
const consoleMethods = /* @__PURE__ */ new Map([
["afirmar", "assert"],
["limpiar", "clear"],
["contar", "count"],
["reiniciarContador", "countReset"],
["depurar", "debug"],
["listar", "dir"],
["listarXml", "dirxml"],
["error", "error"],
["agrupar", "group"],
["agruparColapsado", "groupCollapsed"],
["finalizarAgrupacion", "groupEnd"],
["info", "info"],
["escribir", "log"],
["perfil", "profile"],
["finalizarPerfil", "profileEnd"],
["tabla", "table"],
["tiempo", "time"],
["finalizarTiempo", "timeEnd"],
["registrarTiempo", "timeLog"],
["marcaDeTiempo", "timeStamp"],
["rastrear", "trace"],
["advertencia", "warn"]
]);
const stringMethods = /* @__PURE__ */ new Map([
["enPosicion", "at"],
["caracterEn", "charAt"],
["codigoDeCaracterEn", "charCodeAt"],
["puntoDeCodigoEn", "codePointAt"],
["concatenar", "concat"],
["terminaCon", "endsWith"],
["desdeCodigoDeCaracter", "fromCharCode"],
["desdePuntoDeCodigo", "fromCodePoint"],
["incluye", "includes"],
["indiceDe", "indexOf"],
["ultimoIndiceDe", "lastIndexOf"],
["compararLocalizada", "localeCompare"],
["coincidir", "match"],
["coincidirTodo", "matchAll"],
["normalizar", "normalize"],
["rellenarAlFinal", "padEnd"],
["rellenarAlComienzo", "padStart"],
["crudo", "raw"],
["repetir", "repeat"],
["reemplazar", "replace"],
["reemplazarTodo", "replaceAll"],
["buscarRegex", "search"],
["recortar", "slice"],
["dividir", "split"],
["comienzaCon", "startsWith"],
["subcadena", "substring"],
["aMinusculasLocalizada", "toLocaleLowerCase"],
["aMayusculasLocalizada", "toLocaleUpperCase"],
["aMinusculas", "toLowerCase"],
["aMayusculas", "toUpperCase"],
["aCadena", "toString"],
["recortarEspacios", "trim"],
["recortarEspaciosAlFinal", "trimEnd"],
["recortarEspaciosAlComienzo", "trimStart"],
["valorDe", "valueOf"]
]);
const keywords$3 = new Map([
...keywordControl,
...constantLanguage,
...variableLanguage,
...storageType,
...metaVariable,
...supportFunction,
...promiseMethods,
...dateMethods,
...arrayMethods,
...mathMethods,
...numberMethods,
...consoleMethods,
...stringMethods
]);
function invertMap$1(map) {
const invertedMap = /* @__PURE__ */ new Map();
for (const [key, value] of map.entries()) {
invertedMap.set(value, key);
}
return invertedMap;
}
function getDictionary(reverse = false) {
if (reverse) {
return invertMap$1(keywords$3);
}
return keywords$3;
}
var TokenType$1 = /* @__PURE__ */ ((TokenType2) => {
TokenType2["Identifier"] = "Identifier";
TokenType2["Keyword"] = "Keyword";
TokenType2["LeftParen"] = "LeftParen";
TokenType2["RightParen"] = "RightParen";
TokenType2["LeftCurly"] = "LeftCurly";
TokenType2["RightCurly"] = "RightCurly";
TokenType2["Dot"] = "Dot";
TokenType2["Semicolon"] = "Semicolon";
TokenType2["StringLiteral"] = "StringLiteral";
TokenType2["SpecialCharacter"] = "SpecialCharacter";
TokenType2["Whitespace"] = "Whitespace";
TokenType2["Comment"] = "Comment";
return TokenType2;
})(TokenType$1 || {});
const token = {
identifier(name) {
return {
type: "Identifier" /* Identifier */,
name
};
},
keyword(name) {
return {
type: "Keyword" /* Keyword */,
name
};
},
leftParen() {
return {
type: "LeftParen" /* LeftParen */,
value: "("
};
},
rightParen() {
return {
type: "RightParen" /* RightParen */,
value: ")"
};
},
leftCurly() {
return {
type: "LeftCurly" /* LeftCurly */,
value: "{"
};
},
rightCurly() {
return {
type: "RightCurly" /* RightCurly */,
value: "}"
};
},
dot() {
return {
type: "Dot" /* Dot */,
value: "."
};
},
semicolon() {
return {
type: "Semicolon" /* Semicolon */,
value: ";"
};
},
stringLiteral(value) {
return {
type: "StringLiteral" /* StringLiteral */,
value
};
},
specialCharacter(value) {
return {
type: "SpecialCharacter" /* SpecialCharacter */,
value
};
},
whitespace(value) {
return {
type: "Whitespace" /* Whitespace */,
value
};
},
comment(value) {
return {
type: "Comment" /* Comment */,
value
};
}
};
function tokenize$3(input) {
let current = 0;
const tokens = [];
function finishIdentifier() {
let name = "";
while (!isWhitespace$1(input[current]) && !isSpecialCharacter(input[current]) && !isSingleCharacter(input[current]) && !isTick(input[current]) && !isUndefined(input[current])) {
name += input[current];
current++;
}
return token.keyword(name);
}
function finishSpecialCharacter() {
let chars = "";
while (isSpecialCharacter(input[current])) {
chars += input[current];
current++;
}
return token.specialCharacter(chars);
}
function finishStringLiteral(tick) {
let value = input[current];
current++;
while (input[current] && input[current] !== tick) {
value += input[current];
current++;
}
if (isTick(input[current])) {
value += input[current];
current++;
return token.stringLiteral(value);
}
throw new Error("Unterminated string, expected a closing ', \" or `");
}
function finishWhitespace() {
let value = "";
while (isWhitespace$1(input[current])) {
value += input[current];
current++;
}
return token.whitespace(value);
}
function finishComment(value) {
current += value.length;
return token.comment(value);
}
while (current < input.length) {
const currentChar = input[current];
const { isComment, end } = checkComment(input, current);
if (isComment) {
tokens.push(finishComment(input.slice(current, end + 1)));
continue;
}
if (isWhitespace$1(currentChar)) {
tokens.push(finishWhitespace());
continue;
}
if (isTick(currentChar)) {
tokens.push(finishStringLiteral(currentChar));
} else if (isSingleCharacter(currentChar)) {
tokens.push(getCharToken(currentChar));
current++;
} else if (isSpecialCharacter(currentChar)) {
tokens.push(finishSpecialCharacter());
} else if (isAlpha(currentChar)) {
tokens.push(finishIdentifier());
} else {
throw new Error(`Unknown character: ${currentChar}`);
}
}
return tokens;
}
function isAlpha(char) {
return /^[\p{L}\p{Nl}$_][\p{L}\p{Nl}\p{Nd}$\u200C\u200D_]*$/u.test(char);
}
function isWhitespace$1(char) {
return /\s/.test(char);
}
function isTick(char) {
return ['"', "'", "`"].includes(char);
}
function isSpecialCharacter(char) {
return !isWhitespace$1(char) && !isAlpha(char) && !isTick(char) && !isSingleCharacter(char);
}
function isUndefined(value) {
return typeof value === "undefined";
}
function checkComment(input, current) {
if (input[current] === "/" && input[current + 1] === "/") {
let end = current;
while (end < input.length && input[end] !== "\n")
end++;
return { isComment: true, end };
}
if (input[current] === "/" && input[current + 1] === "*") {
let end = current;
while (end < input.length && !(input[end] === "*" && input[end + 1] === "/"))
end++;
return { isComment: true, end };
}
return { isComment: false, end: current };
}
const knownSingleCharacters = /* @__PURE__ */ new Map([
["(", token.leftParen],
[")", token.rightParen],
["{", token.leftCurly],
["}", token.rightCurly],
[".", token.dot],
[";", token.semicolon]
]);
function isSingleCharacter(char) {
return knownSingleCharacters.has(char);
}
function getCharToken(char) {
const builder = knownSingleCharacters.get(char);
return builder();
}
function generate$7(tokens, reverse = false) {
const dictionary = getDictionary(reverse);
let output = "";
let current = 0;
function isAtEnd() {
return current >= tokens.length;
}
function peek() {
return tokens[current];
}
function advance() {
if (!isAtEnd())
current++;
return previous();
}
function previous() {
return tokens[current - 1];
}
function compileNamedToken(token) {
return dictionary.get(token.name) || token.name;
}
function compileValuedToken(token) {
return token.value;
}
function compileStatement() {
let statement = "";
const token = peek();
switch (token.type) {
case TokenType$1.Keyword:
case TokenType$1.Identifier:
statement += compileNamedToken(token);
break;
case TokenType$1.SpecialCharacter:
case TokenType$1.StringLiteral:
case TokenType$1.Whitespace:
case TokenType$1.Comment:
case TokenType$1.LeftParen:
case TokenType$1.RightParen:
case TokenType$1.LeftCurly:
case TokenType$1.RightCurly:
case TokenType$1.Dot:
case TokenType$1.Semicolon:
return compileValuedToken(token);
default:
throw new SyntaxError(`Unexpected token: ${token.type}`);
}
return statement;
}
while (!isAtEnd()) {
output += compileStatement();
advance();
}
return output;
}
function compile$1(code, reverse = false) {
const tokens = tokenize$3(code);
return generate$7(tokens, reverse);
}
class EsbabelCompiler {
compile(code, options) {
return compile$1(code, options.to === "esjs");
}
}
function invertMap(map) {
const invertedMap = /* @__PURE__ */ new Map();
for (const [key, value] of map.entries()) {
invertedMap.set(value, key);
}
return invertedMap;
}
let toEsJS = false;
function setToEsJS(value) {
toEsJS = value;
}
function replaceObjectNew({
from,
to
}) {
const a = toEsJS ? to : from;
const b = toEsJS ? from : to;
return {
[`new ${a}(__args)`]: `new ${b}(__args)`,
[`new ${a}.__a`]: `new ${b}.__a`,
[`new ${a}()`]: `new ${b}()`
};
}
function replaceObjectCall({
from,
to
}) {
const a = toEsJS ? to : from;
const b = toEsJS ? from : to;
return {
[`${a}(__args)`]: `${b}(__args)`,
[`${a}.__a`]: `${b}.__a`
};
}
function replaceObject({
from,
to
}) {
return {
...replaceObjectNew({
from,
to
}),
...replaceObjectCall({
from,
to
})
};
}
function replaceObjects({
objects
}) {
const rules = [];
for (const [from, to] of objects) {
rules.push(
replaceObject({
from,
to
})
);
}
return Object.assign({}, ...rules);
}
function replaceExpressionMethods({
methods
}) {
const dictionary = toEsJS ? invertMap(methods) : methods;
return Object.fromEntries(
[...dictionary].map(([key, value]) => {
return [`__a.${key}`, `__a.${value}`];
})
);
}
function replaceObjectStaticMethods({
from,
to,
methods
}) {
const a = toEsJS ? to : from;
const b = toEsJS ? from : to;
const dictionary = toEsJS ? invertMap(methods) : methods;
return Object.fromEntries(
[...dictionary].map(([key, value]) => {
return [`${a}.${key}`, `${b}.${value}`];
})
);
}
function replaceObjectProperties({
properties
}) {
const dictionary = toEsJS ? invertMap(properties) : properties;
return Object.fromEntries(
[...dictionary].map(([key, value]) => {
return [`__a.${key}`, `__a.${value}`];
})
);
}
function replaceGlobalMethods({
methods
}) {
const dictionary = toEsJS ? invertMap(methods) : methods;
return Object.fromEntries(
[...dictionary].map(([key, value]) => {
return [key, value];
})
);
}
function replaceInstanceof({
from,
to
}) {
const a = toEsJS ? to : from;
const b = toEsJS ? from : to;
return {
[`__a instanceof ${a}`]: `__a instanceof ${b}`
};
}
const report$a = () => "Converts Booleano methods to JavaScript";
const methods$9 = /* @__PURE__ */ new Map([]);
const objects$9 = /* @__PURE__ */ new Map([["Booleano", "Boolean"]]);
function replace$a() {
return {
...replaceInstanceof({
from: "Booleano",
to: "Boolean"
}),
...replaceObjects({
objects: objects$9
})
};
}
const booleano = {
__proto__: null,
methods: methods$9,
objects: objects$9,
replace: replace$a,
report: report$a
};
const report$9 = () => "Converts Cadena methods to JavaScript";
const methods$8 = /* @__PURE__ */ new Map([
["enPosicion", "at"],
["caracterEn", "charAt"],
["codigoDeCaracterEn", "charCodeAt"],
["puntoDeCodigoEn", "codePointAt"],
["concatenar", "concat"],
["terminaCon", "endsWith"],
["incluye", "includes"],
["indiceDe", "indexOf"],
["ultimoIndiceDe", "lastIndexOf"],
["compararLocalizada", "localeCompare"],
["coincidir", "match"],
["coincidirTodo", "matchAll"],
["normalizar", "normalize"],
["rellenarAlFinal", "padEnd"],
["rellenarAlComienzo", "padStart"],
["repetir", "repeat"],
["reemplazar", "replace"],
["reemplazarTodo", "replaceAll"],
["buscarRegex", "search"],
["recortar", "slice"],
["dividir", "split"],
["comienzaCon", "startsWith"],
["subcadena", "substring"],
["aMinusculasLocalizada", "toLocaleLowerCase"],
["aMayusculasLocalizada", "toLocaleUpperCase"],
["aMinusculas", "toLowerCase"],
["aMayusculas", "toUpperCase"],
["aCadena", "toString"],
["recortarEspacios", "trim"],
["recortarEspaciosAlFinal", "trimEnd"],
["recortarEspaciosAlComienzo", "trimStart"],
["valorDe", "valueOf"]
]);
const staticMethods$5 = /* @__PURE__ */ new Map([
["desdeCodigoDeCaracter", "fromCharCode"],
["desdePuntoDeCodigo", "fromCodePoint"],
["crudo", "raw"]
]);
const properties$1 = /* @__PURE__ */ new Map([["longitud", "length"]]);
const objects$8 = /* @__PURE__ */ new Map([["Cadena", "String"]]);
function replace$9() {
return {
...replaceObjectStaticMethods({
from: "Cadena",
to: "String",
methods: staticMethods$5
}),
...replaceExpressionMethods({
methods: methods$8
}),
...replaceObjectProperties({
properties: properties$1
}),
...replaceInstanceof({
from: "Cadena",
to: "String"
}),
...replaceObjects({
objects: objects$8
})
};
}
const cadena = {
__proto__: null,
methods: methods$8,
objects: objects$8,
properties: properties$1,
replace: replace$9,
report: report$9,
staticMethods: staticMethods$5
};
const report$8 = () => "Converts consola to console";
const methods$7 = /* @__PURE__ */ new Map([
["afirmar", "assert"],
["limpiar", "clear"],
["contar", "count"],
["reiniciarContador", "countReset"],
["depurar", "debug"],
["listar", "dir"],
["listarXml", "dirxml"],
["error", "error"],
["agrupar", "group"],
["agruparColapsado", "groupCollapsed"],
["finalizarAgrupacion", "groupEnd"],
["info", "info"],
["escribir", "log"],
["perfil", "profile"],
["finalizarPerfil", "profileEnd"],
["tabla", "table"],
["tiempo", "time"],
["finalizarTiempo", "timeEnd"],
["registrarTiempo", "timeLog"],
["marcaDeTiempo", "timeStamp"],
["rastrear", "trace"],
["advertencia", "warn"]
]);
const objects$7 = /* @__PURE__ */ new Map([["consola", "console"]]);
function replace$8() {
return {
...replaceObjectStaticMethods({
from: "consola",
to: "console",
methods: methods$7
})
};
}
const consola = {
__proto__: null,
methods: methods$7,
objects: objects$7,
replace: replace$8,
report: report$8
};
const report$7 = () => "Converts Fecha methods to JavaScript";
const methods$6 = /* @__PURE__ */ new Map([
["obtenerDia", "getDate"],
["obtenerDiaSemana", "getDay"],
["obtenerAnio", "getFullYear"],
["obtenerA\xF1o", "getFullYear"],
["obtenerHoras", "getHours"],
["obtenerMilisegundos", "getMilliseconds"],
["obtenerMinutos", "getMinutes"],
["obtenerMes", "getMonth"],
["obtenerSegundos", "getSeconds"],
["obtenerTiempo", "getTime"],
["obtenerDesfaseDeZonaHoraria", "getTimezoneOffset"],
["obtenerDiaUTC", "getUTCDate"],
["obtenerDiaSemanaUTC", "getUTCDay"],
["obtenerAnioUTC", "getUTCFullYear"],
["obtenerA\xF1oUTC", "getUTCFullYear"],
["obtenerHorasUTC", "getUTCHours"],
["obtenerMilisegundosUTC", "getUTCMilliseconds"],
["obtenerMinutosUTC", "getUTCMinutes"],
["obtenerMesUTC", "getUTCMonth"],
["obtenerSegundosUTC", "getUTCSeconds"],
["establecerFecha", "setDate"],
["establecerAnio", "setFullYear"],
["establecerA\xF1o", "setFullYear"],
["establecerHoras", "setHours"],
["establecerMilisegundos", "setMilliseconds"],
["establecerMinutos", "setMinutes"],
["establecerMes", "setMonth"],
["establecerSegundos", "setSeconds"],
["establecerTiempo", "setTime"],
["establecerFechaUTC", "setUTCDate"],
["establecerAnioUTC", "setUTCFullYear"],
["establecerA\xF1oUTC", "setUTCFullYear"],
["establecerHorasUTC", "setUTCHours"],
["establecerMilisegundosUTC", "setUTCMilliseconds"],
["establecerMinutosUTC", "setUTCMinutes"],
["establecerMesUTC", "setUTCMonth"],
["establecerSegundosUTC", "setUTCSeconds"],
["aCadenaFecha", "toDateString"],
["aCadenaISO", "toISOString"],
["aJSON", "toJSON"],
["aCadenaFechaLocale", "toLocaleDateString"],
["aCadenaLocale", "toLocaleString"],
["aCadenaTiempoLocale", "toLocaleTimeString"],
["aCadena", "toString"],
["aCadenaTiempo", "toTimeString"],
["aCadenaUTC", "toUTCString"],
["valorDe", "valueOf"]
]);
const staticMethods$4 = /* @__PURE__ */ new Map([
["ahora", "now"],
["analizar", "parse"],
["UTC", "UTC"]
]);
const objects$6 = /* @__PURE__ */ new Map([["Fecha", "Date"]]);
function replace$7() {
return {
...replaceObjectStaticMethods({
from: "Fecha",
to: "Date",
methods: staticMethods$4
}),
...replaceExpressionMethods({
methods: methods$6
}),
...replaceInstanceof({
from: "Fecha",
to: "Date"
}),
...replaceObjects({
objects: objects$6
})
};
}
const fecha = {
__proto__: null,
methods: methods$6,
objects: objects$6,
replace: replace$7,
report: report$7,
staticMethods: staticMethods$4
};
const report$6 = () => "Converts Mate methods to JavaScript";
const methods$5 = /* @__PURE__ */ new Map([
["absoluto", "abs"],
["arcocoseno", "acos"],
["arcocosenoHiperbolico", "acosh"],
["arcoseno", "asin"],
["arcosenoHiperbolico", "asinh"],
["arcotangente", "atan"],
["arcotangente2", "atan2"],
["arcotangenteHiperbolica", "atanh"],
["raizCubica", "cbrt"],
["redondearHaciaArriba", "ceil"],
["cerosALaIzquierdaEn32Bits", "clz32"],
["coseno", "cos"],
["cosenoHiperbolico", "cosh"],
["exponencial", "exp"],
["exponencialMenos1", "expm1"],
["redondearHaciaAbajo", "floor"],
["redondearAComaFlotante", "fround"],
["hipotenusa", "hypot"],
["multiplicacionEntera", "imul"],
["logaritmo", "log"],
["logaritmoBase10", "log10"],
["logaritmoDe1Mas", "log1p"],
["logaritmoBase2", "log2"],
["maximo", "max"],
["minimo", "min"],
["potencia", "pow"],
["aleatorio", "random"],
["redondear", "round"],
["signo", "sign"],
["seno", "sin"],
["senoHiperbolico", "sinh"],
["raizCuadrada", "sqrt"],
["tangente", "tan"],
["tangenteHiperbolica", "tanh"],
["truncar", "trunc"]
]);
const objects$5 = /* @__PURE__ */ new Map([["Mate", "Math"]]);
function replace$6() {
return {
...replaceObjectStaticMethods({
from: "Mate",
to: "Math",
methods: methods$5
})
};
}
const mate = {
__proto__: null,
methods: methods$5,
objects: objects$5,
replace: replace$6,
report: report$6
};
const report$5 = () => "Converts Matriz methods to JavaScript";
const methods$4 = /* @__PURE__ */ new Map([
["posicion", "at"],
["concatenar", "concat"],
["copiarDentro", "copyWithin"],
["entradas", "entries"],
["cada", "every"],
["llenar", "fill"],
["filtrar", "filter"],
["buscar", "find"],
["buscarIndice", "findIndex"],
["buscarUltimo", "findLast"],
["buscarUltimoIndice", "findLastIndex"],
["plano", "flat"],
["planoMapear", "flatMap"],
["paraCada", "forEach"],
["grupo", "group"],
["grupoAMapear", "groupToMap"],
["incluye", "includes"],
["indiceDe", "indexOf"],
["juntar", "join"],
["claves", "keys"],
["ultimoIndiceDe", "lastIndexOf"],
["mapear", "map"],
["sacar", "pop"],
["agregar", "push"],
["reducir", "reduce"],
["reducirDerecha", "reduceRight"],
["reverso", "reverse"],
["sacarPrimero", "shift"],
["rodaja", "slice"],
["algun", "some"],
["ordenar", "sort"],
["empalmar", "splice"],
["aCadenaLocalizada", "toLocaleString"],
["aCadena", "toString"],
["agregarInicio", "unshift"],
["valores", "values"]
]);
const staticMethods$3 = /* @__PURE__ */ new Map([
["desde", "from"],
["desdeAsincrono", "fromAsync"],
["esMatriz", "isArray"],
["de", "of"]
]);
const objects$4 = /* @__PURE__ */ new Map([
["Arreglo", "Array"],
["Matriz", "Array"]
]);
function replace$5() {
return {
...replaceObjectStaticMethods({
from: "Matriz",
to: "Array",
methods: staticMethods$3
}),
...replaceExpressionMethods({
methods: methods$4
}),
...replaceInstanceof({
from: "Matriz",
to: "Array"
}),
...replaceInstanceof({
from: "Arreglo",
to: "Array"
}),
...replaceObjects({
objects: objects$4
})
};
}
const matriz = {
__proto__: null,
methods: methods$4,
objects: objects$4,
replace: replace$5,
report: report$5,
staticMethods: staticMethods$3
};
const report$4 = () => "Converts Numero methods to JavaScript";
const methods$3 = /* @__PURE__ */ new Map([
["aExponencial", "toExponential"],
["fijarDecimales", "toFixed"],
["aCadenaLocalizada", "toLocaleString"],
["aPrecision", "toPrecision"],
["aCadena", "toString"],
["valorDe", "valueOf"]
]);
const staticMethods$2 = /* @__PURE__ */ new Map([
["esFinito", "isFinite"],
["esEntero", "isInteger"],
["esNan", "isNaN"],
["esEnteroSeguro", "isSafeInteger"],
["interpretarDecimal", "parseFloat"],
["interpretarEntero", "parseInt"]
]);
const objects$3 = /* @__PURE__ */ new Map([
["N\xFAmero", "Number"],
["Numero", "Number"]
]);
const globalMethods = /* @__PURE__ */ new Map([
["interpretarEntero", "parseInt"],
["interpretarDecimal", "parseFloat"]
]);
function replace$4() {
return {
...replaceObjectStaticMethods({
from: "N\xFAmero",
to: "Number",
methods: staticMethods$2
}),
...replaceObjectStaticMethods({
from: "Numero",
to: "Number",
methods: staticMethods$2
}),
...replaceExpressionMethods({
methods: methods$3
}),
...replaceInstanceof({
from: "Numero",
to: "Number"
}),
...replaceObjects({
objects: objects$3
}),
...replaceGlobalMethods({
methods: globalMethods
})
};
}
const numero = {
__proto__: null,
globalMethods: globalMethods,
methods: methods$3,
objects: objects$3,
replace: replace$4,
report: report$4,
staticMethods: staticMethods$2
};
const report$3$1 = () => "Converts Promesa methods to JavaScript";
const methods$2 = /* @__PURE__ */ new Map([
["capturar", "catch"],
["finalmente", "finally"],
["luego", "then"]
]);
const staticMethods$1 = /* @__PURE__ */ new Map([
["todos", "all"],
["todosTerminados", "allSettled"],
["cualquiera", "any"],
["carrera", "race"],
["rechaza", "reject"],
["resuelve", "resolve"]
]);
const objects$2 = /* @__PURE__ */ new Map([["Promesa", "Promise"]]);
function replace$3() {
return {
...replaceObjectStaticMethods({
from: "Promesa",
to: "Promise",
methods: staticMethods$1
}),
...replaceExpressionMethods({
methods: methods$2
}),
...replaceObjects({
objects: objects$2
})
};
}
const promesa = {
__proto__: null,
methods: methods$2,
objects: objects$2,
replace: replace$3,
report: report$3$1,
staticMethods: staticMethods$1
};
const report$2$1 = () => "Converts support functions to JavaScript";
const keywords$2 = /* @__PURE__ */ new Map([
["establecerTemporizador", "setTimeout"],
["establecerIntervalo", "setInterval"],
["esNuN", "isNaN"],
["importar.meta", "import.meta"]
// TODO: Add more support functions.
]);
function replace$2() {
return {
...Object.fromEntries(
Array.from(keywords$2).map(([from, to]) => {
return [
from,
() => {
return to;
}
];
})
)
};
}
const soporte = {
__proto__: null,
keywords: keywords$2,
replace: replace$2,
report: report$2$1
};
const report$1$1 = () => "Converts Funcion methods to JavaScript";
const methods$1 = /* @__PURE__ */ new Map([]);
const objects$1 = /* @__PURE__ */ new Map([["Funcion", "Function"]]);
function replace$1$1() {
return {
...replaceInstanceof({
from: "Funcion",
to: "Function"
}),
...replaceObjects({
objects: objects$1
})
};
}
const funcion = {
__proto__: null,
methods: methods$1,
objects: objects$1,
replace: replace$1$1,
report: report$1$1
};
const report$b = () => "Converts JSON methods to JavaScript";
const methods = /* @__PURE__ */ new Map([]);
const staticMethods = /* @__PURE__ */ new Map([
["esJSONCrudo", "isRawJSON"],
["analizar", "parse"],
["JSONCrudo", "rawJSON"],
["aTexto", "stringify"]
]);
const objects = /* @__PURE__ */ new Map([["Fecha", "Date"]]);
function replace$b() {
return {
...replaceObjectStaticMethods({
from: "JSON",
to: "JSON",
methods: staticMethods
})
};
}
const json$2 = {
__proto__: null,
methods: methods,
objects: objects,
replace: replace$b,
report: report$b,
staticMethods: staticMethods
};
const plugins$2 = [
["consola", consola],
["matriz", matriz],
["cadena", cadena],
["fecha", fecha],
["numero", numero],
["promesa", promesa],
["mate", mate],
["booleano", booleano],
["funcion", funcion],
["soporte", soporte],
["json", json$2]
];
var ContextualKeyword; (function (ContextualKeyword) {
const NONE = 0; ContextualKeyword[ContextualKeyword["NONE"] = NONE] = "NONE";
const _abstract = 1; ContextualKeyword[ContextualKeyword["_abstract"] = _abstract] = "_abstract";
const _accessor = 2; ContextualKeyword[ContextualKeyword["_accessor"] = _accessor] = "_accessor";
const _as = 3; ContextualKeyword[ContextualKeyword["_as"] = _as] = "_as";
const _assert = 4; ContextualKeyword[ContextualKeyword["_assert"] = _assert] = "_assert";
const _asserts = 5; ContextualKeyword[ContextualKeyword["_asserts"] = _asserts] = "_asserts";
const _async = 6; ContextualKeyword[ContextualKeyword["_async"] = _async] = "_async";
const _await = 7; ContextualKeyword[ContextualKeyword["_await"] = _await] = "_await";
const _checks = 8; ContextualKeyword[ContextualKeyword["_checks"] = _checks] = "_checks";
const _constructor = 9; ContextualKeyword[ContextualKeyword["_constructor"] = _constructor] = "_constructor";
const _declare = 10; ContextualKeyword[ContextualKeyword["_declare"] = _declare] = "_declare";
const _enum = 11; ContextualKeyword[ContextualKeyword["_enum"] = _enum] = "_enum";
const _exports = 12; ContextualKeyword[ContextualKeyword["_exports"] = _exports] = "_exports";
const _from = 13; ContextualKeyword[ContextualKeyword["_from"] = _from] = "_from";
const _get = 14; ContextualKeyword[ContextualKeyword["_get"] = _get] = "_get";
const _global = 15; ContextualKeyword[ContextualKeyword["_global"] = _global] = "_global";
const _implements = 16; ContextualKeyword[ContextualKeyword["_implements"] = _implements] = "_implements";
const _infer = 17; ContextualKeyword[ContextualKeyword["_infer"] = _infer] = "_infer";
const _interface = 18; ContextualKeyword[ContextualKeyword["_interface"] = _interface] = "_interface";
const _is = 19; ContextualKeyword[ContextualKeyword["_is"] = _is] = "_is";
const _keyof = 20; ContextualKeyword[ContextualKeyword["_keyof"] = _keyof] = "_keyof";
const _mixins = 21; ContextualKeyword[ContextualKeyword["_mixins"] = _mixins] = "_mixins";
const _module = 22; ContextualKeyword[ContextualKeyword["_module"] = _module] = "_module";
const _namespace = 23; ContextualKeyword[ContextualKeyword["_namespace"] = _namespace] = "_namespace";
const _of = 24; ContextualKeyword[ContextualKeyword["_of"] = _of] = "_of";
const _opaque = 25; ContextualKeyword[ContextualKeyword["_opaque"] = _opaque] = "_opaque";
const _out = 26; ContextualKeyword[ContextualKeyword["_out"] = _out] = "_out";
const _override = 27; ContextualKeyword[ContextualKeyword["_override"] = _override] = "_override";
const _private = 28; ContextualKeyword[ContextualKeyword["_private"] = _private] = "_private";
const _protected = 29; ContextualKeyword[ContextualKeyword["_protected"] = _protected] = "_protected";
const _proto = 30; ContextualKeyword[ContextualKeyword["_proto"] = _proto] = "_proto";
const _public = 31; ContextualKeyword[ContextualKeyword["_public"] = _public] = "_public";
const _readonly = 32; ContextualKeyword[ContextualKeyword["_readonly"] = _readonly] = "_readonly";
const _require = 33; ContextualKeyword[ContextualKeyword["_require"] = _require] = "_require";
const _satisfies = 34; ContextualKeyword[ContextualKeyword["_satisfies"] = _satisfies] = "_satisfies";
const _set = 35; ContextualKeyword[ContextualKeyword["_set"] = _set] = "_set";
const _static = 36; ContextualKeyword[ContextualKeyword["_static"] = _static] = "_static";
const _symbol = 37; ContextualKeyword[ContextualKeyword["_symbol"] = _symbol] = "_symbol";
const _type = 38; ContextualKeyword[ContextualKeyword["_type"] = _type] = "_type";
const _unique = 39; ContextualKeyword[ContextualKeyword["_unique"] = _unique] = "_unique";
const _using = 40; ContextualKeyword[ContextualKeyword["_using"] = _using] = "_using";
const _como = 3; ContextualKeyword[ContextualKeyword["_como"] = _como] = "_como";
const _afirmar = 4; ContextualKeyword[ContextualKeyword["_afirmar"] = _afirmar] = "_afirmar";
const _asincrono = 6; ContextualKeyword[ContextualKeyword["_asincrono"] = _asincrono] = "_asincrono";
const _esperar = 7; ContextualKeyword[ContextualKeyword["_esperar"] = _esperar] = "_esperar";
const _desde = 13; ContextualKeyword[ContextualKeyword["_desde"] = _desde] = "_desde";
const _implementa = 16; ContextualKeyword[ContextualKeyword["_implementa"] = _implementa] = "_implementa";
const _de = 24; ContextualKeyword[ContextualKeyword["_de"] = _de] = "_de";
const _simbolo = 37; ContextualKeyword[ContextualKeyword["_simbolo"] = _simbolo] = "_simbolo";
})(ContextualKeyword || (ContextualKeyword = {}));
// Generated file, do not edit! Run "yarn generate" to re-generate this file.
/* istanbul ignore file */
/**
* Enum of all token types, with bit fields to signify meaningful properties.
*/
var TokenType; (function (TokenType) {
// Precedence 0 means not an operator; otherwise it is a positive number up to 12.
const PRECEDENCE_MASK = 0xf; TokenType[TokenType["PRECEDENCE_MASK"] = PRECEDENCE_MASK] = "PRECEDENCE_MASK";
const IS_KEYWORD = 1 << 4; TokenType[TokenType["IS_KEYWORD"] = IS_KEYWORD] = "IS_KEYWORD";
const IS_ASSIGN = 1 << 5; TokenType[TokenType["IS_ASSIGN"] = IS_ASSIGN] = "IS_ASSIGN";
const IS_RIGHT_ASSOCIATIVE = 1 << 6; TokenType[TokenType["IS_RIGHT_ASSOCIATIVE"] = IS_RIGHT_ASSOCIATIVE] = "IS_RIGHT_ASSOCIATIVE";
const IS_PREFIX = 1 << 7; TokenType[TokenType["IS_PREFIX"] = IS_PREFIX] = "IS_PREFIX";
const IS_POSTFIX = 1 << 8; TokenType[TokenType["IS_POSTFIX"] = IS_POSTFIX] = "IS_POSTFIX";
const IS_EXPRESSION_START = 1 << 9; TokenType[TokenType["IS_EXPRESSION_START"] = IS_EXPRESSION_START] = "IS_EXPRESSION_START";
const num = 512; TokenType[TokenType["num"] = num] = "num"; // num startsExpr
const bigint = 1536; TokenType[TokenType["bigint"] = bigint] = "bigint"; // bigint startsExpr
const decimal = 2560; TokenType[TokenType["decimal"] = decimal] = "decimal"; // decimal startsExpr
const regexp = 3584; TokenType[TokenType["regexp"] = regexp] = "regexp"; // regexp startsExpr
const string = 4608; TokenType[TokenType["string"] = string] = "string"; // string startsExpr
const name = 5632; TokenType[TokenType["name"] = name] = "name"; // name startsExpr
const eof = 6144; TokenType[TokenType["eof"] = eof] = "eof"; // eof
const bracketL = 7680; TokenType[TokenType["bracketL"] = bracketL] = "bracketL"; // [ startsExpr
const bracketR = 8192; TokenType[TokenType["bracketR"] = bracketR] = "bracketR"; // ]
const braceL = 9728; TokenType[TokenType["braceL"] = braceL] = "braceL"; // { startsExpr
const braceBarL = 10752; TokenType[TokenType["braceBarL"] = braceBarL] = "braceBarL"; // {| startsExpr
const braceR = 11264; TokenType[TokenType["braceR"] = braceR] = "braceR"; // }
const braceBarR = 12288; TokenType[TokenType["braceBarR"] = braceBarR] = "braceBarR"; // |}
const parenL = 13824; TokenType[TokenType["parenL"] = parenL] = "parenL"; // ( startsExpr
const parenR = 14336; TokenType[TokenType["parenR"] = parenR] = "parenR"; // )
const comma = 15360; TokenType[TokenType["comma"] = comma] = "comma"; // ,
const semi = 16384; TokenType[TokenType["semi"] = semi] = "semi"; // ;
const colon = 17408; TokenType[TokenType["colon"] = colon] = "colon"; // :
const doubleColon = 18432; TokenType[TokenType["doubleColon"] = doubleColon] = "doubleColon"; // ::
const dot = 19456; TokenType[TokenType["dot"] = dot] = "dot"; // .
const question = 20480; TokenType[TokenType["question"] = question] = "question"; // ?
const questionDot = 21504; TokenType[TokenType["questionDot"] = questionDot] = "questionDot"; // ?.
const arrow = 22528; TokenType[TokenType["arrow"] = arrow] = "arrow"; // =>
const template = 23552; TokenType[TokenType["template"] = template] = "template"; // template
const ellipsis = 24576; TokenType[TokenType["ellipsis"] = ellipsis] = "ellipsis"; // ...
const backQuote = 25600; TokenType[TokenType["backQuote"] = backQuote] = "backQuote"; // `
const dollarBraceL = 27136; TokenType[TokenType["dollarBraceL"] = dollarBraceL] = "dollarBraceL"; // ${ startsExpr
const at = 27648; TokenType[TokenType["at"] = at] = "at"; // @
const hash = 29184; TokenType[TokenType["hash"] = hash] = "hash"; // # startsExpr
const eq = 29728; TokenType[TokenType["eq"] = eq] = "eq"; // = isAssign
const assign = 30752; TokenType[TokenType["assign"] = assign] = "assign"; // _= isAssign
const preIncDec = 32640; TokenType[TokenType["preIncDec"] = preIncDec] = "preIncDec"; // ++/-- prefix postfix startsExpr
const postIncDec = 33664; TokenType[TokenType["postIncDec"] = postIncDec] = "postIncDec"; // ++/-- prefix postfix startsExpr
const bang = 34432; TokenType[TokenType["bang"] = bang] = "bang"; // ! prefix startsExpr
const tilde = 35456; TokenType[TokenType["tilde"] = tilde] = "tilde"; // ~ prefix startsExpr
const pipeline = 35841; TokenType[TokenType["pipeline"] = pipeline] = "pipeline"; // |> prec:1
const nullishCoalescing = 36866; TokenType[TokenType["nullishCoalescing"] = nullishCoalescing] = "nullishCoalescing"; // ?? prec:2
const logicalOR = 37890; TokenType[TokenType["logicalOR"] = logicalOR] = "logicalOR"; // || prec:2
const logicalAND = 38915; TokenType[TokenType["logicalAND"] = logicalAND] = "logicalAND"; // && prec:3
const bitwiseOR = 39940; TokenType[TokenType["bitwiseOR"] = bitwiseOR] = "bitwiseOR"; // | prec:4
const bitwiseXOR = 40965; TokenType[TokenType["bitwiseXOR"] = bitwiseXOR] = "bitwiseXOR"; // ^ prec:5
const bitwiseAND = 41990; TokenType[TokenType["bitwiseAND"] = bitwiseAND] = "bitwiseAND"; // & prec:6
const equality = 43015; TokenType[TokenType["equality"] = equality] = "equality"; // ==/!= prec:7
const lessThan = 44040; TokenType[TokenType["lessThan"] = lessThan] = "lessThan"; // < prec:8
const greaterThan = 45064; TokenType[TokenType["greaterThan"] = greaterThan] = "greaterThan"; // > prec:8
const relationalOrEqual = 46088; TokenType[TokenType["relationalOrEqual"] = relationalOrEqual] = "relationalOrEqual"; // <=/>= prec:8
const bitShiftL = 47113; TokenType[TokenType["bitShiftL"] = bitShiftL] = "bitShiftL"; // << prec:9
const bitShiftR = 48137; TokenType[TokenType["bitShiftR"] = bitShiftR] = "bitShiftR"; // >>/>>> prec:9
const plus = 49802; TokenType[TokenType["plus"] = plus] = "plus"; // + prec:10 prefix startsExpr
const minus = 50826; TokenType[TokenType["minus"] = minus] = "minus"; // - prec:10 prefix startsExpr
const modulo = 51723; TokenType[TokenType["modulo"] = modulo] = "modulo"; // % prec:11 startsExpr
const star = 52235; TokenType[TokenType["star"] = star] = "star"; // * prec:11
const slash = 53259; TokenType[TokenType["slash"] = slash] = "slash"; // / prec:11
const exponent = 54348; TokenType[TokenType["exponent"] = exponent] = "exponent"; // ** prec:12 rightAssociative
const jsxName = 55296; TokenType[TokenType["jsxName"] = jsxName] = "jsxName"; // jsxName
const jsxText = 56320; TokenType[TokenType["jsxText"] = jsxText] = "jsxText"; // jsxText
const jsxEmptyText = 57344; TokenType[TokenType["jsxEmptyText"] = jsxEmptyText] = "jsxEmptyText"; // jsxEmptyText
const jsxTagStart = 58880; TokenType[TokenType["jsxTagStart"] = jsxTagStart] = "jsxTagStart"; // jsxTagStart startsExpr
const jsxTagEnd = 59392; TokenType[TokenType["jsxTagEnd"] = jsxTagEnd] = "jsxTagEnd"; // jsxTagEnd
const typeParameterStart = 60928; TokenType[TokenType["typeParameterStart"] = typeParameterStart] = "typeParameterStart"; // typeParameterStart startsExpr
const nonNullAssertion = 61440; TokenType[TokenType["nonNullAssertion"] = nonNullAssertion] = "nonNullAssertion"; // nonNullAssertion
const _break = 62480; TokenType[TokenType["_break"] = _break] = "_break"; // break keyword
const _case = 63504; TokenType[TokenType["_case"] = _case] = "_case"; // case keyword
const _catch = 64528; TokenType[TokenType["_catch"] = _catch] = "_catch"; // catch keyword
const _continue = 65552; TokenType[TokenType["_continue"] = _continue] = "_continue"; // continue keyword
const _debugger = 66576; TokenType[TokenType["_debugger"] = _debugger] = "_debugger"; // debugger keyword
const _default = 67600; TokenType[TokenType["_default"] = _default] = "_default"; // default keyword
const _do = 68624; TokenType[TokenType["_do"] = _do] = "_do"; // do keyword
const _else = 69648; TokenType[TokenType["_else"] = _else] = "_else"; // else keyword
const _finally = 70672; TokenType[TokenType["_finally"] = _finally] = "_finally"; // finally keyword
const _for = 71696; TokenType[TokenType["_for"] = _for] = "_for"; // for keyword
const _function = 73232; TokenType[TokenType["_function"] = _function] = "_function"; // function keyword startsExpr
const _if = 73744; TokenType[TokenType["_if"] = _if] = "_if"; // if keyword
const _return = 74768; TokenType[TokenType["_return"] = _return] = "_return"; // return keyword
const _switch = 75792; TokenType[TokenType["_switch"] = _switch] = "_switch"; // switch keyword
const _throw = 77456; TokenType[TokenType["_throw"] = _throw] = "_throw"; // throw keyword prefix startsExpr
const _try = 77840; TokenType[TokenType["_try"] = _try] = "_try"; // try keyword
const _var = 78864; TokenType[TokenType["_var"] = _var] = "_var"; // var keyword
const _let = 79888; TokenType[TokenType["_let"] = _let] = "_let"; // let keyword
const _const = 80912; TokenType[TokenType["_const"] = _const] = "_const"; // const keyword
const _while = 81936; TokenType[TokenType["_while"] = _while] = "_while"; // while keyword
const _with = 82960; TokenType[TokenType["_with"] = _with] = "_with"; // with keyword
const _new = 84496; TokenType[TokenType["_new"] = _new] = "_new"; // new keyword startsExpr
const _this = 85520; TokenType[TokenType["_this"] = _this] = "_this"; // this keyword startsExpr
const _super = 86544; TokenType[TokenType["_super"] = _super] = "_super"; // super keyword startsExpr
const _class = 87568; TokenType[TokenType["_class"] = _class] = "_class"; // class keyword startsExpr
const _extends = 88080; TokenType[TokenType["_extends"] = _extends] = "_extends"; // extends keyword
const _export = 89104; TokenType[TokenType["_export"] = _export] = "_export"; // export keyword
const _import = 90640; TokenType[TokenType["_import"] = _import] = "_import"; // import keyword startsExpr
const _yield = 91664; TokenType[TokenType["_yield"] = _yield] = "_yield"; // yield keyword startsExpr
const _null = 92688; TokenType[TokenType["_null"] = _null] = "_null"; // null keyword startsExpr
const _true = 93712; TokenType[TokenType["_true"] = _true] = "_true"; // true keyword startsExpr
const _false = 94736; TokenType[TokenType["_false"] = _false] = "_false"; // false keyword startsExpr
const _in = 95256; TokenType[TokenType["_in"] = _in] = "_in"; // in prec:8 keyword
const _instanceof = 96280; TokenType[TokenType["_instanceof"] = _instanceof] = "_instanceof"; // instanceof prec:8 keyword
const _typeof = 97936; TokenType[TokenType["_typeof"] = _typeof] = "_typeof"; // typeof keyword prefix startsExpr
const _void = 98960; TokenType[TokenType["_void"] = _void] = "_void"; // void keyword prefix startsExpr
const _delete = 99984; TokenType[TokenType["_delete"] = _delete] = "_delete"; // delete keyword prefix startsExpr
const _async = 100880; TokenType[TokenType["_async"] = _async] = "_async"; // async keyword startsExpr
const _get = 101904; TokenType[TokenType["_get"] = _get] = "_get"; // get keyword startsExpr
const _set = 102928; TokenType[TokenType["_set"] = _set] = "_set"; // set keyword startsExpr
const _declare = 103952; TokenType[TokenType["_declare"] = _declare] = "_declare"; // declare keyword startsExpr
const _readonly = 104976; TokenType[TokenType["_readonly"] = _readonly] = "_readonly"; // readonly keyword startsExpr
const _abstract = 106000; TokenType[TokenType["_abstract"] = _abstract] = "_abstract"; // abstract keyword startsExpr
const _static = 107024; TokenType[TokenType["_static"] = _static] = "_static"; // static keyword startsExpr
const _public = 107536; TokenType[TokenType["_public"] = _public] = "_public"; // public keyword
const _private = 108560; TokenType[TokenType["_private"] = _private] = "_private"; // private keyword
const _protected = 109584; TokenType[TokenType["_protected"] = _protected] = "_protected"; // protected keyword
const _override = 110608; TokenType[TokenType["_override"] = _override] = "_override"; // override keyword
const _as = 112144; TokenType[TokenType["_as"] = _as] = "_as"; // as keyword startsExpr
const _enum = 113168; TokenType[TokenType["_enum"] = _enum] = "_enum"; // enum keyword startsExpr
const _type = 114192; TokenType[TokenType["_type"] = _type] = "_type"; // type keyword startsExpr
const _implements = 115216; TokenType[TokenType["_implements"] = _implements] = "_implements"; // implements keyword startsExpr
const _romper = 62480; TokenType[TokenType["_romper"] = _romper] = "_romper"; // esjs:break
const _caso = 63504; TokenType[TokenType["_caso"] = _caso] = "_caso"; // esjs:case
const _capturar = 64528; TokenType[TokenType["_capturar"] = _capturar] = "_capturar"; // esjs:catch
const _continuar = 65552; TokenType[TokenTy