diff --git a/dist/espree.cjs b/dist/espree.cjs index 437d7bf4..85b38b42 100644 --- a/dist/espree.cjs +++ b/dist/espree.cjs @@ -42,7 +42,8 @@ var visitorKeys__namespace = /*#__PURE__*/_interopNamespace(visitorKeys); /** * @local * @typedef {import('acorn')} acorn - * @typedef {import('../lib/espree').EnhancedTokTypes} EnhancedTokTypes + * @typedef {import('./espree').EnhancedTokTypes} EnhancedTokTypes + * @typedef {import('../espree').ecmaVersion} ecmaVersion */ // ---------------------------------------------------------------------------- @@ -75,23 +76,21 @@ var visitorKeys__namespace = /*#__PURE__*/_interopNamespace(visitorKeys); * }} BaseEsprimaToken * * @typedef {{ - * type: string; - * } & BaseEsprimaToken} EsprimaToken - * - * @typedef {{ - * type: string | acorn.TokenType; - * } & BaseEsprimaToken} EsprimaTokenFlexible - * - * @typedef {{ * jsxAttrValueToken: boolean; - * ecmaVersion: acorn.ecmaVersion; + * ecmaVersion: ecmaVersion; * }} ExtraNoTokens * * @typedef {{ - * tokens: EsprimaTokenFlexible[] + * tokens: EsprimaToken[] * } & ExtraNoTokens} Extra */ +/** + * @typedef {{ + * type: string; + * } & BaseEsprimaToken} EsprimaToken + */ + //------------------------------------------------------------------------------ // Requirements //------------------------------------------------------------------------------ @@ -179,7 +178,7 @@ class TokenTranslator { } /** - * Translates a single Esprima token to a single Acorn token. This may be + * Translates a single Acorn token to a single Esprima token. This may be * inaccurate due to how templates are handled differently in Esprima and * Acorn, but should be accurate for all other tokens. * @param {acorn.Token} token The Acorn token to translate. @@ -364,6 +363,7 @@ class TokenTranslator { /** * @local * @typedef {import('../espree').ParserOptions} ParserOptions + * @typedef {import('../espree').ecmaVersion} ecmaVersion */ // ---------------------------------------------------------------------------- @@ -372,7 +372,7 @@ class TokenTranslator { /** * @local * @typedef {{ - * ecmaVersion: 10 | 9 | 8 | 7 | 6 | 5 | 3 | 11 | 12 | 13 | 2015 | 2016 | 2017 | 2018 | 2019 | 2020 | 2021 | 2022 | "latest", + * ecmaVersion: ecmaVersion, * sourceType: "script"|"module", * range?: boolean, * loc?: boolean, @@ -385,7 +385,7 @@ class TokenTranslator { * ranges: boolean, * locations: boolean, * allowReturnOutsideFunction: boolean, - * tokens?: boolean | null, + * tokens?: boolean, * comment?: boolean * }} NormalizedParserOptions */ @@ -541,8 +541,9 @@ const ESPRIMA_FINISH_NODE = Symbol("espree's esprimaFinishNode"); * @local * @typedef {import('acorn')} acorn * @typedef {typeof import('acorn-jsx').tokTypes} tokTypesType - * @typedef {typeof import('acorn-jsx').AcornJsxParser} AcornJsxParser + * @typedef {import('acorn-jsx').AcornJsxParser} AcornJsxParser * @typedef {import('../espree').ParserOptions} ParserOptions + * @typedef {import('../espree').ecmaVersion} ecmaVersion */ // ---------------------------------------------------------------------------- @@ -550,9 +551,6 @@ const ESPRIMA_FINISH_NODE = Symbol("espree's esprimaFinishNode"); // ---------------------------------------------------------------------------- /** * @local - * - * @typedef {acorn.ecmaVersion} ecmaVersion - * * @typedef {{ * generator?: boolean * } & acorn.Node} EsprimaNode @@ -564,12 +562,6 @@ const ESPRIMA_FINISH_NODE = Symbol("espree's esprimaFinishNode"); */ /** - * First three properties as in `acorn.Comment`; next two as in `acorn.Comment` - * but optional. Last is different as has to allow `undefined` - */ -/** - * @local - * * @typedef {{ * type: string, * value: string, @@ -581,10 +573,16 @@ const ESPRIMA_FINISH_NODE = Symbol("espree's esprimaFinishNode"); * end: acorn.Position | undefined * } * }} EsprimaComment + */ + +/** + * First two properties as in `acorn.Comment`; next two as in `acorn.Comment` + * but optional. Last is different as has to allow `undefined` + */ +/** + * @local * - * @typedef {{ - * comments?: EsprimaComment[] - * } & acorn.Token[]} EspreeTokens + * @typedef {import('../espree').EspreeTokens} EspreeTokens * * @typedef {{ * tail?: boolean @@ -611,7 +609,7 @@ const ESPRIMA_FINISH_NODE = Symbol("espree's esprimaFinishNode"); * @typedef {{ * sourceType?: "script"|"module"|"commonjs"; * comments?: EsprimaComment[]; - * tokens?: acorn.Token[]; + * tokens?: EspreeTokens; * body: acorn.Node[]; * } & acorn.Node} EsprimaProgramNode */ @@ -1112,10 +1110,15 @@ const parsers = { */ get regular() { if (this._regular === null) { - const espreeParserFactory = espree(); + const espreeParserFactory = /** @type {unknown} */ (espree()); + + this._regular = /** @type {IEspreeParser} */ ( + acorn__namespace.Parser.extend( - // Cast the `acorn.Parser` to our own for required properties not specified in *.d.ts - this._regular = espreeParserFactory(/** @type {AcornJsxParser} */ (acorn__namespace.Parser)); + /** @type {(BaseParser: typeof acorn.Parser) => typeof acorn.Parser} */ + (espreeParserFactory) + ) + ); } return this._regular; }, @@ -1126,11 +1129,17 @@ const parsers = { */ get jsx() { if (this._jsx === null) { - const espreeParserFactory = espree(); + const espreeParserFactory = /** @type {unknown} */ (espree()); const jsxFactory = jsx__default["default"](); - // Cast the `acorn.Parser` to our own for required properties not specified in *.d.ts - this._jsx = espreeParserFactory(jsxFactory(acorn__namespace.Parser)); + this._jsx = /** @type {IEspreeParser} */ ( + acorn__namespace.Parser.extend( + jsxFactory, + + /** @type {(BaseParser: typeof acorn.Parser) => typeof acorn.Parser} */ + (espreeParserFactory) + ) + ); } return this._jsx; }, @@ -1159,7 +1168,7 @@ const parsers = { * Tokenizes the given code. * @param {string} code The code to tokenize. * @param {ParserOptions} options Options defining how to tokenize. - * @returns {acorn.Token[]|null} An array of tokens. + * @returns {EspreeTokens} An array of tokens. * @throws {EnhancedSyntaxError} If the input code is invalid. * @private */ @@ -1171,7 +1180,7 @@ function tokenize(code, options) { options = Object.assign({}, options, { tokens: true }); // eslint-disable-line no-param-reassign } - return new Parser(options, code).tokenize(); + return /** @type {EspreeTokens} */ (new Parser(options, code).tokenize()); } //------------------------------------------------------------------------------ diff --git a/dist/espree.cjs.map b/dist/espree.cjs.map index 1a034863..e6dc7834 100644 --- a/dist/espree.cjs.map +++ b/dist/espree.cjs.map @@ -1 +1 @@ -{"version":3,"file":"espree.cjs","sources":["../lib/token-translator.js","../lib/options.js","../lib/espree.js","../lib/version.js","../espree.js"],"sourcesContent":["/**\n * @fileoverview Translates tokens between Acorn format and Esprima format.\n * @author Nicholas C. Zakas\n */\n/* eslint no-underscore-dangle: 0 */\n\n// ----------------------------------------------------------------------------\n// Local type imports\n// ----------------------------------------------------------------------------\n/**\n * @local\n * @typedef {import('acorn')} acorn\n * @typedef {import('../lib/espree').EnhancedTokTypes} EnhancedTokTypes\n */\n\n// ----------------------------------------------------------------------------\n// Local types\n// ----------------------------------------------------------------------------\n/**\n * Based on the `acorn.Token` class, but without a fixed `type` (since we need\n * it to be a string). Avoiding `type` lets us make one extending interface\n * more strict and another more lax.\n *\n * We could make `value` more strict to `string` even though the original is\n * `any`.\n *\n * `start` and `end` are required in `acorn.Token`\n *\n * `loc` and `range` are from `acorn.Token`\n *\n * Adds `regex`.\n */\n/**\n * @local\n *\n * @typedef {{\n * value: any;\n * start?: number;\n * end?: number;\n * loc?: acorn.SourceLocation;\n * range?: [number, number];\n * regex?: {flags: string, pattern: string};\n * }} BaseEsprimaToken\n *\n * @typedef {{\n * type: string;\n * } & BaseEsprimaToken} EsprimaToken\n *\n * @typedef {{\n * type: string | acorn.TokenType;\n * } & BaseEsprimaToken} EsprimaTokenFlexible\n *\n * @typedef {{\n * jsxAttrValueToken: boolean;\n * ecmaVersion: acorn.ecmaVersion;\n * }} ExtraNoTokens\n *\n * @typedef {{\n * tokens: EsprimaTokenFlexible[]\n * } & ExtraNoTokens} Extra\n */\n\n//------------------------------------------------------------------------------\n// Requirements\n//------------------------------------------------------------------------------\n\n// none!\n\n//------------------------------------------------------------------------------\n// Private\n//------------------------------------------------------------------------------\n\n\n// Esprima Token Types\nconst Token = {\n Boolean: \"Boolean\",\n EOF: \"\",\n Identifier: \"Identifier\",\n PrivateIdentifier: \"PrivateIdentifier\",\n Keyword: \"Keyword\",\n Null: \"Null\",\n Numeric: \"Numeric\",\n Punctuator: \"Punctuator\",\n String: \"String\",\n RegularExpression: \"RegularExpression\",\n Template: \"Template\",\n JSXIdentifier: \"JSXIdentifier\",\n JSXText: \"JSXText\"\n};\n\n/**\n * Converts part of a template into an Esprima token.\n * @param {(acorn.Token)[]} tokens The Acorn tokens representing the template.\n * @param {string} code The source code.\n * @returns {EsprimaToken} The Esprima equivalent of the template token.\n * @private\n */\nfunction convertTemplatePart(tokens, code) {\n const firstToken = tokens[0],\n lastTemplateToken = tokens[tokens.length - 1];\n\n /** @type {EsprimaToken} */\n const token = {\n type: Token.Template,\n value: code.slice(firstToken.start, lastTemplateToken.end)\n };\n\n if (firstToken.loc && lastTemplateToken.loc) {\n token.loc = {\n start: firstToken.loc.start,\n end: lastTemplateToken.loc.end\n };\n }\n\n if (firstToken.range && lastTemplateToken.range) {\n token.start = firstToken.range[0];\n token.end = lastTemplateToken.range[1];\n token.range = [token.start, token.end];\n }\n\n return token;\n}\n\nclass TokenTranslator {\n\n /**\n * Contains logic to translate Acorn tokens into Esprima tokens.\n * @param {EnhancedTokTypes} acornTokTypes The Acorn token types.\n * @param {string} code The source code Acorn is parsing. This is necessary\n * to correct the \"value\" property of some tokens.\n */\n constructor(acornTokTypes, code) {\n\n // token types\n this._acornTokTypes = acornTokTypes;\n\n // token buffer for templates\n /** @type {(acorn.Token)[]} */\n this._tokens = [];\n\n // track the last curly brace\n this._curlyBrace = null;\n\n // the source code\n this._code = code;\n\n }\n\n /**\n * Translates a single Esprima token to a single Acorn token. This may be\n * inaccurate due to how templates are handled differently in Esprima and\n * Acorn, but should be accurate for all other tokens.\n * @param {acorn.Token} token The Acorn token to translate.\n * @param {ExtraNoTokens} extra Espree extra object.\n * @returns {EsprimaToken} The Esprima version of the token.\n */\n translate(token, extra) {\n\n const type = token.type,\n tt = this._acornTokTypes,\n\n // We use an unknown type because `acorn.Token` is a class whose\n // `type` property we cannot override to our desired `string`;\n // this also allows us to define a stricter `EsprimaToken` with\n // a string-only `type` property\n unknownType = /** @type {unknown} */ (token),\n newToken = /** @type {EsprimaToken} */ (unknownType);\n\n if (type === tt.name) {\n newToken.type = Token.Identifier;\n\n // TODO: See if this is an Acorn bug\n if (token.value === \"static\") {\n newToken.type = Token.Keyword;\n }\n\n if (extra.ecmaVersion > 5 && (token.value === \"yield\" || token.value === \"let\")) {\n newToken.type = Token.Keyword;\n }\n\n } else if (type === tt.privateId) {\n newToken.type = Token.PrivateIdentifier;\n\n } else if (type === tt.semi || type === tt.comma ||\n type === tt.parenL || type === tt.parenR ||\n type === tt.braceL || type === tt.braceR ||\n type === tt.dot || type === tt.bracketL ||\n type === tt.colon || type === tt.question ||\n type === tt.bracketR || type === tt.ellipsis ||\n type === tt.arrow || type === tt.jsxTagStart ||\n type === tt.incDec || type === tt.starstar ||\n type === tt.jsxTagEnd || type === tt.prefix ||\n type === tt.questionDot ||\n (type.binop && !type.keyword) ||\n type.isAssign) {\n\n newToken.type = Token.Punctuator;\n newToken.value = this._code.slice(token.start, token.end);\n } else if (type === tt.jsxName) {\n newToken.type = Token.JSXIdentifier;\n } else if (type.label === \"jsxText\" || type === tt.jsxAttrValueToken) {\n newToken.type = Token.JSXText;\n } else if (type.keyword) {\n if (type.keyword === \"true\" || type.keyword === \"false\") {\n newToken.type = Token.Boolean;\n } else if (type.keyword === \"null\") {\n newToken.type = Token.Null;\n } else {\n newToken.type = Token.Keyword;\n }\n } else if (type === tt.num) {\n newToken.type = Token.Numeric;\n newToken.value = this._code.slice(token.start, token.end);\n } else if (type === tt.string) {\n\n if (extra.jsxAttrValueToken) {\n extra.jsxAttrValueToken = false;\n newToken.type = Token.JSXText;\n } else {\n newToken.type = Token.String;\n }\n\n newToken.value = this._code.slice(token.start, token.end);\n } else if (type === tt.regexp) {\n newToken.type = Token.RegularExpression;\n const value = token.value;\n\n newToken.regex = {\n flags: value.flags,\n pattern: value.pattern\n };\n newToken.value = `/${value.pattern}/${value.flags}`;\n }\n\n return newToken;\n }\n\n /**\n * Function to call during Acorn's onToken handler.\n * @param {acorn.Token} token The Acorn token.\n * @param {Extra} extra The Espree extra object.\n * @returns {void}\n */\n onToken(token, extra) {\n\n const that = this,\n tt = this._acornTokTypes,\n tokens = extra.tokens,\n templateTokens = this._tokens;\n\n /**\n * Flushes the buffered template tokens and resets the template\n * tracking.\n * @returns {void}\n * @private\n */\n function translateTemplateTokens() {\n tokens.push(convertTemplatePart(that._tokens, that._code));\n that._tokens = [];\n }\n\n if (token.type === tt.eof) {\n\n // might be one last curlyBrace\n if (this._curlyBrace) {\n tokens.push(this.translate(this._curlyBrace, extra));\n }\n\n return;\n }\n\n if (token.type === tt.backQuote) {\n\n // if there's already a curly, it's not part of the template\n if (this._curlyBrace) {\n tokens.push(this.translate(this._curlyBrace, extra));\n this._curlyBrace = null;\n }\n\n templateTokens.push(token);\n\n // it's the end\n if (templateTokens.length > 1) {\n translateTemplateTokens();\n }\n\n return;\n }\n if (token.type === tt.dollarBraceL) {\n templateTokens.push(token);\n translateTemplateTokens();\n return;\n }\n if (token.type === tt.braceR) {\n\n // if there's already a curly, it's not part of the template\n if (this._curlyBrace) {\n tokens.push(this.translate(this._curlyBrace, extra));\n }\n\n // store new curly for later\n this._curlyBrace = token;\n return;\n }\n if (token.type === tt.template || token.type === tt.invalidTemplate) {\n if (this._curlyBrace) {\n templateTokens.push(this._curlyBrace);\n this._curlyBrace = null;\n }\n\n templateTokens.push(token);\n return;\n }\n\n if (this._curlyBrace) {\n tokens.push(this.translate(this._curlyBrace, extra));\n this._curlyBrace = null;\n }\n\n tokens.push(this.translate(token, extra));\n }\n}\n\n//------------------------------------------------------------------------------\n// Public\n//------------------------------------------------------------------------------\n\nexport default TokenTranslator;\n","/**\n * @fileoverview A collection of methods for processing Espree's options.\n * @author Kai Cataldo\n */\n\n// ----------------------------------------------------------------------------\n// Local type imports\n// ----------------------------------------------------------------------------\n/**\n * @local\n * @typedef {import('../espree').ParserOptions} ParserOptions\n */\n\n// ----------------------------------------------------------------------------\n// Local types\n// ----------------------------------------------------------------------------\n/**\n * @local\n * @typedef {{\n * ecmaVersion: 10 | 9 | 8 | 7 | 6 | 5 | 3 | 11 | 12 | 13 | 2015 | 2016 | 2017 | 2018 | 2019 | 2020 | 2021 | 2022 | \"latest\",\n * sourceType: \"script\"|\"module\",\n * range?: boolean,\n * loc?: boolean,\n * allowReserved: boolean | \"never\",\n * ecmaFeatures?: {\n * jsx?: boolean,\n * globalReturn?: boolean,\n * impliedStrict?: boolean\n * },\n * ranges: boolean,\n * locations: boolean,\n * allowReturnOutsideFunction: boolean,\n * tokens?: boolean | null,\n * comment?: boolean\n * }} NormalizedParserOptions\n */\n\n//------------------------------------------------------------------------------\n// Helpers\n//------------------------------------------------------------------------------\n\nconst SUPPORTED_VERSIONS = [\n 3,\n 5,\n 6,\n 7,\n 8,\n 9,\n 10,\n 11,\n 12,\n 13\n];\n\n/**\n * Get the latest ECMAScript version supported by Espree.\n * @returns {number} The latest ECMAScript version.\n */\nexport function getLatestEcmaVersion() {\n return SUPPORTED_VERSIONS[SUPPORTED_VERSIONS.length - 1];\n}\n\n/**\n * Get the list of ECMAScript versions supported by Espree.\n * @returns {number[]} An array containing the supported ECMAScript versions.\n */\nexport function getSupportedEcmaVersions() {\n return [...SUPPORTED_VERSIONS];\n}\n\n/**\n * Normalize ECMAScript version from the initial config\n * @param {number|\"latest\"} ecmaVersion ECMAScript version from the initial config\n * @throws {Error} throws an error if the ecmaVersion is invalid.\n * @returns {number} normalized ECMAScript version\n */\nfunction normalizeEcmaVersion(ecmaVersion = 5) {\n\n let version = ecmaVersion === \"latest\" ? getLatestEcmaVersion() : ecmaVersion;\n\n if (typeof version !== \"number\") {\n throw new Error(`ecmaVersion must be a number or \"latest\". Received value of type ${typeof ecmaVersion} instead.`);\n }\n\n // Calculate ECMAScript edition number from official year version starting with\n // ES2015, which corresponds with ES6 (or a difference of 2009).\n if (version >= 2015) {\n version -= 2009;\n }\n\n if (!SUPPORTED_VERSIONS.includes(version)) {\n throw new Error(\"Invalid ecmaVersion.\");\n }\n\n return version;\n}\n\n/**\n * Normalize sourceType from the initial config\n * @param {\"script\"|\"module\"|\"commonjs\"} sourceType to normalize\n * @throws {Error} throw an error if sourceType is invalid\n * @returns {\"script\"|\"module\"} normalized sourceType\n */\nfunction normalizeSourceType(sourceType = \"script\") {\n if (sourceType === \"script\" || sourceType === \"module\") {\n return sourceType;\n }\n\n if (sourceType === \"commonjs\") {\n return \"script\";\n }\n\n throw new Error(\"Invalid sourceType.\");\n}\n\n/**\n * Normalize parserOptions\n * @param {ParserOptions} options the parser options to normalize\n * @throws {Error} throw an error if found invalid option.\n * @returns {NormalizedParserOptions} normalized options\n */\nexport function normalizeOptions(options) {\n const ecmaVersion = normalizeEcmaVersion(options.ecmaVersion);\n\n /** @type {\"script\"|\"module\"} */\n const sourceType = normalizeSourceType(options.sourceType);\n const ranges = options.range === true;\n const locations = options.loc === true;\n\n if (ecmaVersion !== 3 && options.allowReserved) {\n\n // a value of `false` is intentionally allowed here, so a shared config can overwrite it when needed\n throw new Error(\"`allowReserved` is only supported when ecmaVersion is 3\");\n }\n\n // Note: value in Acorn can also be \"never\" but we throw in such a case\n if (typeof options.allowReserved !== \"undefined\" && typeof options.allowReserved !== \"boolean\") {\n throw new Error(\"`allowReserved`, when present, must be `true` or `false`\");\n }\n const allowReserved = ecmaVersion === 3 ? (options.allowReserved || \"never\") : false;\n const ecmaFeatures = options.ecmaFeatures || {};\n const allowReturnOutsideFunction = options.sourceType === \"commonjs\" ||\n Boolean(ecmaFeatures.globalReturn);\n\n if (sourceType === \"module\" && ecmaVersion < 6) {\n throw new Error(\"sourceType 'module' is not supported when ecmaVersion < 2015. Consider adding `{ ecmaVersion: 2015 }` to the parser options.\");\n }\n\n return Object.assign({}, options, {\n ecmaVersion,\n sourceType,\n ranges,\n locations,\n allowReserved,\n allowReturnOutsideFunction\n });\n}\n","/* eslint-disable no-param-reassign*/\nimport TokenTranslator from \"./token-translator.js\";\nimport { normalizeOptions } from \"./options.js\";\n\nconst STATE = Symbol(\"espree's internal state\");\nconst ESPRIMA_FINISH_NODE = Symbol(\"espree's esprimaFinishNode\");\n\n// ----------------------------------------------------------------------------\n// Types exported from file\n// ----------------------------------------------------------------------------\n/**\n * @typedef {{\n * index?: number;\n * lineNumber?: number;\n * column?: number;\n * } & SyntaxError} EnhancedSyntaxError\n */\n\n// We add `jsxAttrValueToken` ourselves.\n/**\n * @typedef {{\n * jsxAttrValueToken?: acorn.TokenType;\n * } & tokTypesType} EnhancedTokTypes\n */\n\n// ----------------------------------------------------------------------------\n// Local type imports\n// ----------------------------------------------------------------------------\n/**\n * @local\n * @typedef {import('acorn')} acorn\n * @typedef {typeof import('acorn-jsx').tokTypes} tokTypesType\n * @typedef {typeof import('acorn-jsx').AcornJsxParser} AcornJsxParser\n * @typedef {import('../espree').ParserOptions} ParserOptions\n */\n\n// ----------------------------------------------------------------------------\n// Local types\n// ----------------------------------------------------------------------------\n/**\n * @local\n *\n * @typedef {acorn.ecmaVersion} ecmaVersion\n *\n * @typedef {{\n * generator?: boolean\n * } & acorn.Node} EsprimaNode\n */\n/**\n * Suggests an integer\n * @local\n * @typedef {number} int\n */\n\n/**\n * First three properties as in `acorn.Comment`; next two as in `acorn.Comment`\n * but optional. Last is different as has to allow `undefined`\n */\n/**\n * @local\n *\n * @typedef {{\n * type: string,\n * value: string,\n * range?: [number, number],\n * start?: number,\n * end?: number,\n * loc?: {\n * start: acorn.Position | undefined,\n * end: acorn.Position | undefined\n * }\n * }} EsprimaComment\n *\n * @typedef {{\n * comments?: EsprimaComment[]\n * } & acorn.Token[]} EspreeTokens\n *\n * @typedef {{\n * tail?: boolean\n * } & acorn.Node} AcornTemplateNode\n *\n * @typedef {{\n * originalSourceType: \"script\"|\"module\"|\"commonjs\";\n * ecmaVersion: ecmaVersion;\n * comments: EsprimaComment[]|null;\n * impliedStrict: boolean;\n * lastToken: acorn.Token|null;\n * templateElements: (AcornTemplateNode)[];\n * jsxAttrValueToken: boolean;\n * }} BaseStateObject\n *\n * @typedef {{\n * tokens: null;\n * } & BaseStateObject} StateObject\n *\n * @typedef {{\n * tokens: EspreeTokens;\n * } & BaseStateObject} StateObjectWithTokens\n *\n * @typedef {{\n * sourceType?: \"script\"|\"module\"|\"commonjs\";\n * comments?: EsprimaComment[];\n * tokens?: acorn.Token[];\n * body: acorn.Node[];\n * } & acorn.Node} EsprimaProgramNode\n */\n/**\n * Converts an Acorn comment to an Esprima comment.\n *\n * - block True if it's a block comment, false if not.\n * - text The text of the comment.\n * - start The index at which the comment starts.\n * - end The index at which the comment ends.\n * - startLoc The location at which the comment starts.\n * - endLoc The location at which the comment ends.\n * @local\n * @typedef {(\n * block: boolean,\n * text: string,\n * start: int,\n * end: int,\n * startLoc: acorn.Position | undefined,\n * endLoc: acorn.Position | undefined\n * ) => EsprimaComment | void} AcornToEsprimaCommentConverter\n */\n\n// ----------------------------------------------------------------------------\n// Utilities\n// ----------------------------------------------------------------------------\n/**\n * Converts an Acorn comment to an Esprima comment.\n * @type {AcornToEsprimaCommentConverter}\n * @returns {EsprimaComment} The comment object.\n * @private\n */\nfunction convertAcornCommentToEsprimaComment(block, text, start, end, startLoc, endLoc) {\n const comment = /** @type {EsprimaComment} */ ({\n type: block ? \"Block\" : \"Line\",\n value: text\n });\n\n if (typeof start === \"number\") {\n comment.start = start;\n comment.end = end;\n comment.range = [start, end];\n }\n\n if (typeof startLoc === \"object\") {\n comment.loc = {\n start: startLoc,\n end: endLoc\n };\n }\n\n return comment;\n}\n\n// ----------------------------------------------------------------------------\n// Exports\n// ----------------------------------------------------------------------------\n/* eslint-disable arrow-body-style -- Need to supply formatted JSDoc for type info */\nexport default () => {\n\n /**\n * Returns the Espree parser.\n * @param {AcornJsxParser} Parser The Acorn parser\n * @returns {typeof EspreeParser} The Espree parser\n */\n return Parser => {\n const tokTypes = /** @type {EnhancedTokTypes} */ (Object.assign({}, Parser.acorn.tokTypes));\n\n if (Parser.acornJsx) {\n Object.assign(tokTypes, Parser.acornJsx.tokTypes);\n }\n\n /* eslint-disable no-shadow -- Using first class as type */\n /**\n * @export\n */\n return class EspreeParser extends Parser {\n /* eslint-enable no-shadow -- Using first class as type */\n /* eslint-disable jsdoc/check-types -- Allows generic object */\n /**\n * Adapted parser for Espree.\n * @param {ParserOptions|null} opts Espree options\n * @param {string|object} code The source code\n */\n constructor(opts, code) {\n /* eslint-enable jsdoc/check-types -- Allows generic object */\n\n /** @type {ParserOptions} */\n const newOpts = (typeof opts !== \"object\" || opts === null)\n ? {}\n : opts;\n\n const codeString = typeof code === \"string\"\n ? /** @type {string} */ (code)\n : String(code);\n\n // save original source type in case of commonjs\n const originalSourceType = newOpts.sourceType;\n const options = normalizeOptions(newOpts);\n const ecmaFeatures = options.ecmaFeatures || {};\n const tokenTranslator =\n options.tokens === true\n ? new TokenTranslator(tokTypes, codeString)\n : null;\n\n // Initialize acorn parser.\n super({\n\n // do not use spread, because we don't want to pass any unknown options to acorn\n ecmaVersion: options.ecmaVersion,\n sourceType: options.sourceType,\n ranges: options.ranges,\n locations: options.locations,\n allowReserved: options.allowReserved,\n\n // Truthy value is true for backward compatibility.\n allowReturnOutsideFunction: options.allowReturnOutsideFunction,\n\n // Collect tokens\n /**\n * Handler for receiving a token\n * @param {acorn.Token} token The token\n * @returns {void}\n */\n onToken: token => {\n if (tokenTranslator) {\n\n // Use `tokens`, `ecmaVersion`, and `jsxAttrValueToken` in the state.\n tokenTranslator.onToken(token, /** @type {StateObjectWithTokens} */ (this[STATE]));\n }\n if (token.type !== tokTypes.eof) {\n this[STATE].lastToken = token;\n }\n },\n\n // Collect comments\n /**\n * Converts an Acorn comment to an Esprima comment.\n * @type {AcornToEsprimaCommentConverter}\n */\n onComment: (block, text, start, end, startLoc, endLoc) => {\n if (this[STATE].comments) {\n const comment = convertAcornCommentToEsprimaComment(block, text, start, end, startLoc, endLoc);\n\n const comments = /** @type {EsprimaComment[]} */ (this[STATE].comments);\n\n comments.push(comment);\n }\n }\n }, codeString);\n\n // Force for TypeScript (indicating that `lineStart` is not undefined)\n if (!this.lineStart) {\n this.lineStart = 0;\n }\n\n /**\n * Data that is unique to Espree and is not represented internally in\n * Acorn. We put all of this data into a symbol property as a way to\n * avoid potential naming conflicts with future versions of Acorn.\n * @type {StateObjectWithTokens|StateObject}\n */\n this[STATE] = {\n originalSourceType: originalSourceType || options.sourceType,\n tokens: tokenTranslator ? /** @type {EspreeTokens} */ ([]) : null,\n comments: options.comment === true\n ? /** @type {EsprimaComment[]} */ ([])\n : null,\n impliedStrict: ecmaFeatures.impliedStrict === true && this.options.ecmaVersion >= 5,\n ecmaVersion: this.options.ecmaVersion,\n jsxAttrValueToken: false,\n\n /** @type {acorn.Token|null} */\n lastToken: null,\n\n /** @type {(AcornTemplateNode)[]} */\n templateElements: []\n };\n }\n\n /**\n * Returns Espree tokens.\n * @returns {EspreeTokens|null} Espree tokens\n */\n tokenize() {\n do {\n this.next();\n } while (this.type !== tokTypes.eof);\n\n // Consume the final eof token\n this.next();\n\n const extra = this[STATE];\n const tokens = extra.tokens;\n\n if (extra.comments && tokens) {\n tokens.comments = extra.comments;\n }\n\n return tokens;\n }\n\n /**\n * Calls parent.\n * @param {acorn.Node} node The node\n * @param {string} type The type\n * @returns {acorn.Node} The altered Node\n */\n finishNode(node, type) {\n const result = super.finishNode(node, type);\n\n return this[ESPRIMA_FINISH_NODE](result);\n }\n\n /**\n * Calls parent.\n * @param {acorn.Node} node The node\n * @param {string} type The type\n * @param {number} pos The position\n * @param {acorn.Position} loc The location\n * @returns {acorn.Node} The altered Node\n */\n finishNodeAt(node, type, pos, loc) {\n const result = super.finishNodeAt(node, type, pos, loc);\n\n return this[ESPRIMA_FINISH_NODE](result);\n }\n\n /**\n * Parses.\n * @returns {EsprimaProgramNode} The program Node\n */\n parse() {\n const extra = this[STATE];\n\n const program = /** @type {EsprimaProgramNode} */ (super.parse());\n\n program.sourceType = extra.originalSourceType;\n\n if (extra.comments) {\n program.comments = extra.comments;\n }\n if (extra.tokens) {\n program.tokens = extra.tokens;\n }\n\n /*\n * Adjust opening and closing position of program to match Esprima.\n * Acorn always starts programs at range 0 whereas Esprima starts at the\n * first AST node's start (the only real difference is when there's leading\n * whitespace or leading comments). Acorn also counts trailing whitespace\n * as part of the program whereas Esprima only counts up to the last token.\n */\n if (program.body.length) {\n const [firstNode] = program.body;\n\n if (program.range && firstNode.range) {\n program.range[0] = firstNode.range[0];\n }\n if (program.loc && firstNode.loc) {\n program.loc.start = firstNode.loc.start;\n }\n program.start = firstNode.start;\n }\n if (extra.lastToken) {\n if (program.range && extra.lastToken.range) {\n program.range[1] = extra.lastToken.range[1];\n }\n if (program.loc && extra.lastToken.loc) {\n program.loc.end = extra.lastToken.loc.end;\n }\n program.end = extra.lastToken.end;\n }\n\n\n /*\n * https://github.com/eslint/espree/issues/349\n * Ensure that template elements have correct range information.\n * This is one location where Acorn produces a different value\n * for its start and end properties vs. the values present in the\n * range property. In order to avoid confusion, we set the start\n * and end properties to the values that are present in range.\n * This is done here, instead of in finishNode(), because Acorn\n * uses the values of start and end internally while parsing, making\n * it dangerous to change those values while parsing is ongoing.\n * By waiting until the end of parsing, we can safely change these\n * values without affect any other part of the process.\n */\n this[STATE].templateElements.forEach(templateElement => {\n const startOffset = -1;\n const endOffset = templateElement.tail ? 1 : 2;\n\n templateElement.start += startOffset;\n templateElement.end += endOffset;\n\n if (templateElement.range) {\n templateElement.range[0] += startOffset;\n templateElement.range[1] += endOffset;\n }\n\n if (templateElement.loc) {\n templateElement.loc.start.column += startOffset;\n templateElement.loc.end.column += endOffset;\n }\n });\n\n return program;\n }\n\n /**\n * Parses top level.\n * @param {acorn.Node} node AST Node\n * @returns {acorn.Node} The changed node\n */\n parseTopLevel(node) {\n if (this[STATE].impliedStrict) {\n this.strict = true;\n }\n return super.parseTopLevel(node);\n }\n\n /**\n * Overwrites the default raise method to throw Esprima-style errors.\n * @param {int} pos The position of the error.\n * @param {string} message The error message.\n * @throws {EnhancedSyntaxError} A syntax error.\n * @returns {void}\n */\n raise(pos, message) {\n const loc = Parser.acorn.getLineInfo(this.input, pos);\n\n /** @type {EnhancedSyntaxError} */\n const err = new SyntaxError(message);\n\n err.index = pos;\n err.lineNumber = loc.line;\n err.column = loc.column + 1; // acorn uses 0-based columns\n throw err;\n }\n\n /**\n * Overwrites the default raise method to throw Esprima-style errors.\n * @param {int} pos The position of the error.\n * @param {string} message The error message.\n * @throws {EnhancedSyntaxError} A syntax error.\n * @returns {void}\n */\n raiseRecoverable(pos, message) {\n this.raise(pos, message);\n }\n\n /**\n * Overwrites the default unexpected method to throw Esprima-style errors.\n * @param {int} pos The position of the error.\n * @throws {EnhancedSyntaxError} A syntax error.\n * @returns {void}\n */\n unexpected(pos) {\n let message = \"Unexpected token\";\n\n if (pos !== null && pos !== void 0) {\n this.pos = pos;\n\n if (this.options.locations) {\n while (this.pos < /** @type {int} */ (this.lineStart)) {\n\n /** @type {int} */\n this.lineStart = this.input.lastIndexOf(\"\\n\", /** @type {int} */ (this.lineStart) - 2) + 1;\n --this.curLine;\n }\n }\n\n this.nextToken();\n }\n\n if (this.end > this.start) {\n message += ` ${this.input.slice(this.start, this.end)}`;\n }\n\n this.raise(this.start, message);\n }\n\n /**\n * Esprima-FB represents JSX strings as tokens called \"JSXText\", but Acorn-JSX\n * uses regular tt.string without any distinction between this and regular JS\n * strings. As such, we intercept an attempt to read a JSX string and set a flag\n * on extra so that when tokens are converted, the next token will be switched\n * to JSXText via onToken.\n * @param {number} quote A character code\n * @returns {void}\n */\n jsx_readString(quote) { // eslint-disable-line camelcase\n if (typeof super.jsx_readString === \"undefined\") {\n throw new Error(\"Not a JSX parser\");\n }\n super.jsx_readString(quote);\n\n if (this.type === tokTypes.string) {\n this[STATE].jsxAttrValueToken = true;\n }\n }\n\n /**\n * Performs last-minute Esprima-specific compatibility checks and fixes.\n * @param {acorn.Node} result The node to check.\n * @returns {EsprimaNode} The finished node.\n */\n [ESPRIMA_FINISH_NODE](result) {\n\n const esprimaResult = /** @type {EsprimaNode} */ (result);\n\n // Acorn doesn't count the opening and closing backticks as part of templates\n // so we have to adjust ranges/locations appropriately.\n if (result.type === \"TemplateElement\") {\n\n // save template element references to fix start/end later\n this[STATE].templateElements.push(result);\n }\n\n if (result.type.includes(\"Function\") && !esprimaResult.generator) {\n esprimaResult.generator = false;\n }\n\n return esprimaResult;\n }\n };\n };\n};\n","const version = \"main\";\n\nexport default version;\n","/**\n * @fileoverview Main Espree file that converts Acorn into Esprima output.\n *\n * This file contains code from the following MIT-licensed projects:\n * 1. Acorn\n * 2. Babylon\n * 3. Babel-ESLint\n *\n * This file also contains code from Esprima, which is BSD licensed.\n *\n * Acorn is Copyright 2012-2015 Acorn Contributors (https://github.com/marijnh/acorn/blob/master/AUTHORS)\n * Babylon is Copyright 2014-2015 various contributors (https://github.com/babel/babel/blob/master/packages/babylon/AUTHORS)\n * Babel-ESLint is Copyright 2014-2015 Sebastian McKenzie \n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are met:\n *\n * * Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright\n * notice, this list of conditions and the following disclaimer in the\n * documentation and/or other materials provided with the distribution.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF\n * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *\n * Esprima is Copyright (c) jQuery Foundation, Inc. and Contributors, All Rights Reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are met:\n *\n * * Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright\n * notice, this list of conditions and the following disclaimer in the\n * documentation and/or other materials provided with the distribution.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF\n * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n/* eslint no-undefined:0, no-use-before-define: 0 */\n\n// ----------------------------------------------------------------------------\n// Types exported from file\n// ----------------------------------------------------------------------------\n/**\n * `jsx.Options` gives us 2 optional properties, so extend it\n *\n * `allowReserved`, `ranges`, `locations`, `allowReturnOutsideFunction`,\n * `onToken`, and `onComment` are as in `acorn.Options`\n *\n * `ecmaVersion` as in `acorn.Options` though optional\n *\n * `sourceType` as in `acorn.Options` but also allows `commonjs`\n *\n * `ecmaFeatures`, `range`, `loc`, `tokens` are not in `acorn.Options`\n *\n * `comment` is not in `acorn.Options` and doesn't err without it, but is used\n */\n/**\n * @typedef {{\n * allowReserved?: boolean,\n * ecmaVersion?: acorn.ecmaVersion,\n * sourceType?: \"script\"|\"module\"|\"commonjs\",\n * ecmaFeatures?: {\n * jsx?: boolean,\n * globalReturn?: boolean,\n * impliedStrict?: boolean\n * },\n * range?: boolean,\n * loc?: boolean,\n * tokens?: boolean | null,\n * comment?: boolean,\n * }} ParserOptions\n */\n\n// ----------------------------------------------------------------------------\n// Local type imports\n// ----------------------------------------------------------------------------\n/**\n * @local\n * @typedef {import('acorn')} acorn\n * @typedef {typeof import('acorn-jsx').AcornJsxParser} AcornJsxParser\n * @typedef {import('./lib/espree').EnhancedSyntaxError} EnhancedSyntaxError\n * @typedef {typeof import('./lib/espree').EspreeParser} IEspreeParser\n */\n\nimport * as acorn from \"acorn\";\nimport jsx from \"acorn-jsx\";\nimport espree from \"./lib/espree.js\";\nimport espreeVersion from \"./lib/version.js\";\nimport * as visitorKeys from \"eslint-visitor-keys\";\nimport { getLatestEcmaVersion, getSupportedEcmaVersions } from \"./lib/options.js\";\n\n\n// To initialize lazily.\nconst parsers = {\n _regular: /** @type {IEspreeParser|null} */ (null),\n _jsx: /** @type {IEspreeParser|null} */ (null),\n\n /**\n * Returns regular Parser\n * @returns {IEspreeParser} Regular Acorn parser\n */\n get regular() {\n if (this._regular === null) {\n const espreeParserFactory = espree();\n\n // Cast the `acorn.Parser` to our own for required properties not specified in *.d.ts\n this._regular = espreeParserFactory(/** @type {AcornJsxParser} */ (acorn.Parser));\n }\n return this._regular;\n },\n\n /**\n * Returns JSX Parser\n * @returns {IEspreeParser} JSX Acorn parser\n */\n get jsx() {\n if (this._jsx === null) {\n const espreeParserFactory = espree();\n const jsxFactory = jsx();\n\n // Cast the `acorn.Parser` to our own for required properties not specified in *.d.ts\n this._jsx = espreeParserFactory(jsxFactory(acorn.Parser));\n }\n return this._jsx;\n },\n\n /**\n * Returns Regular or JSX Parser\n * @param {ParserOptions} options Parser options\n * @returns {IEspreeParser} Regular or JSX Acorn parser\n */\n get(options) {\n const useJsx = Boolean(\n options &&\n options.ecmaFeatures &&\n options.ecmaFeatures.jsx\n );\n\n return useJsx ? this.jsx : this.regular;\n }\n};\n\n//------------------------------------------------------------------------------\n// Tokenizer\n//------------------------------------------------------------------------------\n\n/**\n * Tokenizes the given code.\n * @param {string} code The code to tokenize.\n * @param {ParserOptions} options Options defining how to tokenize.\n * @returns {acorn.Token[]|null} An array of tokens.\n * @throws {EnhancedSyntaxError} If the input code is invalid.\n * @private\n */\nexport function tokenize(code, options) {\n const Parser = parsers.get(options);\n\n // Ensure to collect tokens.\n if (!options || options.tokens !== true) {\n options = Object.assign({}, options, { tokens: true }); // eslint-disable-line no-param-reassign\n }\n\n return new Parser(options, code).tokenize();\n}\n\n//------------------------------------------------------------------------------\n// Parser\n//------------------------------------------------------------------------------\n\n/**\n * Parses the given code.\n * @param {string} code The code to tokenize.\n * @param {ParserOptions} options Options defining how to tokenize.\n * @returns {acorn.Node} The \"Program\" AST node.\n * @throws {EnhancedSyntaxError} If the input code is invalid.\n */\nexport function parse(code, options) {\n const Parser = parsers.get(options);\n\n return new Parser(options, code).parse();\n}\n\n//------------------------------------------------------------------------------\n// Public\n//------------------------------------------------------------------------------\n\nexport const version = espreeVersion;\n\n/* istanbul ignore next */\nexport const VisitorKeys = (function() {\n return visitorKeys.KEYS;\n}());\n\n// Derive node types from VisitorKeys\n/* istanbul ignore next */\nexport const Syntax = (function() {\n let /** @type {Object} */\n types = {};\n\n if (typeof Object.create === \"function\") {\n types = Object.create(null);\n }\n\n for (const name of Object.keys(VisitorKeys)) {\n types[name] = name;\n }\n\n if (typeof Object.freeze === \"function\") {\n Object.freeze(types);\n }\n\n return types;\n}());\n\nexport const latestEcmaVersion = getLatestEcmaVersion();\n\nexport const supportedEcmaVersions = getSupportedEcmaVersions();\n"],"names":["version","acorn","jsx","espreeVersion","visitorKeys"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;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,KAAK,CAAC,IAAI,OAAO,CAAC,aAAa,IAAI,OAAO,IAAI,KAAK,CAAC;AACzF,IAAI,MAAM,YAAY,GAAG,OAAO,CAAC,YAAY,IAAI,EAAE,CAAC;AACpD,IAAI,MAAM,0BAA0B,GAAG,OAAO,CAAC,UAAU,KAAK,UAAU;AACxE,QAAQ,OAAO,CAAC,YAAY,CAAC,YAAY,CAAC,CAAC;AAC3C;AACA,IAAI,IAAI,UAAU,KAAK,QAAQ,IAAI,WAAW,GAAG,CAAC,EAAE;AACpD,QAAQ,MAAM,IAAI,KAAK,CAAC,8HAA8H,CAAC,CAAC;AACxJ,KAAK;AACL;AACA,IAAI,OAAO,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,OAAO,EAAE;AACtC,QAAQ,WAAW;AACnB,QAAQ,UAAU;AAClB,QAAQ,MAAM;AACd,QAAQ,SAAS;AACjB,QAAQ,aAAa;AACrB,QAAQ,0BAA0B;AAClC,KAAK,CAAC,CAAC;AACP;;AC5JA;AAGA;AACA,MAAM,KAAK,GAAG,MAAM,CAAC,yBAAyB,CAAC,CAAC;AAChD,MAAM,mBAAmB,GAAG,MAAM,CAAC,4BAA4B,CAAC,CAAC;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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QAAQ,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAC7B,KAAK;AACL;AACA,IAAI,OAAO,KAAK,CAAC;AACjB,CAAC,EAAE,EAAE;AACL;AACY,MAAC,iBAAiB,GAAG,oBAAoB,GAAG;AACxD;AACY,MAAC,qBAAqB,GAAG,wBAAwB;;;;;;;;;;"} \ No newline at end of file +{"version":3,"file":"espree.cjs","sources":["../lib/token-translator.js","../lib/options.js","../lib/espree.js","../lib/version.js","../espree.js"],"sourcesContent":["/**\n * @fileoverview Translates tokens between Acorn format and Esprima format.\n * @author Nicholas C. Zakas\n */\n/* eslint no-underscore-dangle: 0 */\n\n// ----------------------------------------------------------------------------\n// Local type imports\n// ----------------------------------------------------------------------------\n/**\n * @local\n * @typedef {import('acorn')} acorn\n * @typedef {import('./espree').EnhancedTokTypes} EnhancedTokTypes\n * @typedef {import('../espree').ecmaVersion} ecmaVersion\n */\n\n// ----------------------------------------------------------------------------\n// Local types\n// ----------------------------------------------------------------------------\n/**\n * Based on the `acorn.Token` class, but without a fixed `type` (since we need\n * it to be a string). Avoiding `type` lets us make one extending interface\n * more strict and another more lax.\n *\n * We could make `value` more strict to `string` even though the original is\n * `any`.\n *\n * `start` and `end` are required in `acorn.Token`\n *\n * `loc` and `range` are from `acorn.Token`\n *\n * Adds `regex`.\n */\n/**\n * @local\n *\n * @typedef {{\n * value: any;\n * start?: number;\n * end?: number;\n * loc?: acorn.SourceLocation;\n * range?: [number, number];\n * regex?: {flags: string, pattern: string};\n * }} BaseEsprimaToken\n *\n * @typedef {{\n * jsxAttrValueToken: boolean;\n * ecmaVersion: ecmaVersion;\n * }} ExtraNoTokens\n *\n * @typedef {{\n * tokens: EsprimaToken[]\n * } & ExtraNoTokens} Extra\n */\n\n/**\n * @typedef {{\n * type: string;\n * } & BaseEsprimaToken} EsprimaToken\n */\n\n//------------------------------------------------------------------------------\n// Requirements\n//------------------------------------------------------------------------------\n\n// none!\n\n//------------------------------------------------------------------------------\n// Private\n//------------------------------------------------------------------------------\n\n\n// Esprima Token Types\nconst Token = {\n Boolean: \"Boolean\",\n EOF: \"\",\n Identifier: \"Identifier\",\n PrivateIdentifier: \"PrivateIdentifier\",\n Keyword: \"Keyword\",\n Null: \"Null\",\n Numeric: \"Numeric\",\n Punctuator: \"Punctuator\",\n String: \"String\",\n RegularExpression: \"RegularExpression\",\n Template: \"Template\",\n JSXIdentifier: \"JSXIdentifier\",\n JSXText: \"JSXText\"\n};\n\n/**\n * Converts part of a template into an Esprima token.\n * @param {(acorn.Token)[]} tokens The Acorn tokens representing the template.\n * @param {string} code The source code.\n * @returns {EsprimaToken} The Esprima equivalent of the template token.\n * @private\n */\nfunction convertTemplatePart(tokens, code) {\n const firstToken = tokens[0],\n lastTemplateToken = tokens[tokens.length - 1];\n\n /** @type {EsprimaToken} */\n const token = {\n type: Token.Template,\n value: code.slice(firstToken.start, lastTemplateToken.end)\n };\n\n if (firstToken.loc && lastTemplateToken.loc) {\n token.loc = {\n start: firstToken.loc.start,\n end: lastTemplateToken.loc.end\n };\n }\n\n if (firstToken.range && lastTemplateToken.range) {\n token.start = firstToken.range[0];\n token.end = lastTemplateToken.range[1];\n token.range = [token.start, token.end];\n }\n\n return token;\n}\n\nclass TokenTranslator {\n\n /**\n * Contains logic to translate Acorn tokens into Esprima tokens.\n * @param {EnhancedTokTypes} acornTokTypes The Acorn token types.\n * @param {string} code The source code Acorn is parsing. This is necessary\n * to correct the \"value\" property of some tokens.\n */\n constructor(acornTokTypes, code) {\n\n // token types\n this._acornTokTypes = acornTokTypes;\n\n // token buffer for templates\n /** @type {(acorn.Token)[]} */\n this._tokens = [];\n\n // track the last curly brace\n this._curlyBrace = null;\n\n // the source code\n this._code = code;\n\n }\n\n /**\n * Translates a single Acorn token to a single Esprima token. This may be\n * inaccurate due to how templates are handled differently in Esprima and\n * Acorn, but should be accurate for all other tokens.\n * @param {acorn.Token} token The Acorn token to translate.\n * @param {ExtraNoTokens} extra Espree extra object.\n * @returns {EsprimaToken} The Esprima version of the token.\n */\n translate(token, extra) {\n\n const type = token.type,\n tt = this._acornTokTypes,\n\n // We use an unknown type because `acorn.Token` is a class whose\n // `type` property we cannot override to our desired `string`;\n // this also allows us to define a stricter `EsprimaToken` with\n // a string-only `type` property\n unknownType = /** @type {unknown} */ (token),\n newToken = /** @type {EsprimaToken} */ (unknownType);\n\n if (type === tt.name) {\n newToken.type = Token.Identifier;\n\n // TODO: See if this is an Acorn bug\n if (token.value === \"static\") {\n newToken.type = Token.Keyword;\n }\n\n if (extra.ecmaVersion > 5 && (token.value === \"yield\" || token.value === \"let\")) {\n newToken.type = Token.Keyword;\n }\n\n } else if (type === tt.privateId) {\n newToken.type = Token.PrivateIdentifier;\n\n } else if (type === tt.semi || type === tt.comma ||\n type === tt.parenL || type === tt.parenR ||\n type === tt.braceL || type === tt.braceR ||\n type === tt.dot || type === tt.bracketL ||\n type === tt.colon || type === tt.question ||\n type === tt.bracketR || type === tt.ellipsis ||\n type === tt.arrow || type === tt.jsxTagStart ||\n type === tt.incDec || type === tt.starstar ||\n type === tt.jsxTagEnd || type === tt.prefix ||\n type === tt.questionDot ||\n (type.binop && !type.keyword) ||\n type.isAssign) {\n\n newToken.type = Token.Punctuator;\n newToken.value = this._code.slice(token.start, token.end);\n } else if (type === tt.jsxName) {\n newToken.type = Token.JSXIdentifier;\n } else if (type.label === \"jsxText\" || type === tt.jsxAttrValueToken) {\n newToken.type = Token.JSXText;\n } else if (type.keyword) {\n if (type.keyword === \"true\" || type.keyword === \"false\") {\n newToken.type = Token.Boolean;\n } else if (type.keyword === \"null\") {\n newToken.type = Token.Null;\n } else {\n newToken.type = Token.Keyword;\n }\n } else if (type === tt.num) {\n newToken.type = Token.Numeric;\n newToken.value = this._code.slice(token.start, token.end);\n } else if (type === tt.string) {\n\n if (extra.jsxAttrValueToken) {\n extra.jsxAttrValueToken = false;\n newToken.type = Token.JSXText;\n } else {\n newToken.type = Token.String;\n }\n\n newToken.value = this._code.slice(token.start, token.end);\n } else if (type === tt.regexp) {\n newToken.type = Token.RegularExpression;\n const value = token.value;\n\n newToken.regex = {\n flags: value.flags,\n pattern: value.pattern\n };\n newToken.value = `/${value.pattern}/${value.flags}`;\n }\n\n return newToken;\n }\n\n /**\n * Function to call during Acorn's onToken handler.\n * @param {acorn.Token} token The Acorn token.\n * @param {Extra} extra The Espree extra object.\n * @returns {void}\n */\n onToken(token, extra) {\n\n const that = this,\n tt = this._acornTokTypes,\n tokens = extra.tokens,\n templateTokens = this._tokens;\n\n /**\n * Flushes the buffered template tokens and resets the template\n * tracking.\n * @returns {void}\n * @private\n */\n function translateTemplateTokens() {\n tokens.push(convertTemplatePart(that._tokens, that._code));\n that._tokens = [];\n }\n\n if (token.type === tt.eof) {\n\n // might be one last curlyBrace\n if (this._curlyBrace) {\n tokens.push(this.translate(this._curlyBrace, extra));\n }\n\n return;\n }\n\n if (token.type === tt.backQuote) {\n\n // if there's already a curly, it's not part of the template\n if (this._curlyBrace) {\n tokens.push(this.translate(this._curlyBrace, extra));\n this._curlyBrace = null;\n }\n\n templateTokens.push(token);\n\n // it's the end\n if (templateTokens.length > 1) {\n translateTemplateTokens();\n }\n\n return;\n }\n if (token.type === tt.dollarBraceL) {\n templateTokens.push(token);\n translateTemplateTokens();\n return;\n }\n if (token.type === tt.braceR) {\n\n // if there's already a curly, it's not part of the template\n if (this._curlyBrace) {\n tokens.push(this.translate(this._curlyBrace, extra));\n }\n\n // store new curly for later\n this._curlyBrace = token;\n return;\n }\n if (token.type === tt.template || token.type === tt.invalidTemplate) {\n if (this._curlyBrace) {\n templateTokens.push(this._curlyBrace);\n this._curlyBrace = null;\n }\n\n templateTokens.push(token);\n return;\n }\n\n if (this._curlyBrace) {\n tokens.push(this.translate(this._curlyBrace, extra));\n this._curlyBrace = null;\n }\n\n tokens.push(this.translate(token, extra));\n }\n}\n\n//------------------------------------------------------------------------------\n// Public\n//------------------------------------------------------------------------------\n\nexport default TokenTranslator;\n","/**\n * @fileoverview A collection of methods for processing Espree's options.\n * @author Kai Cataldo\n */\n\n// ----------------------------------------------------------------------------\n// Local type imports\n// ----------------------------------------------------------------------------\n/**\n * @local\n * @typedef {import('../espree').ParserOptions} ParserOptions\n * @typedef {import('../espree').ecmaVersion} ecmaVersion\n */\n\n// ----------------------------------------------------------------------------\n// Local types\n// ----------------------------------------------------------------------------\n/**\n * @local\n * @typedef {{\n * ecmaVersion: ecmaVersion,\n * sourceType: \"script\"|\"module\",\n * range?: boolean,\n * loc?: boolean,\n * allowReserved: boolean | \"never\",\n * ecmaFeatures?: {\n * jsx?: boolean,\n * globalReturn?: boolean,\n * impliedStrict?: boolean\n * },\n * ranges: boolean,\n * locations: boolean,\n * allowReturnOutsideFunction: boolean,\n * tokens?: boolean,\n * comment?: boolean\n * }} NormalizedParserOptions\n */\n\n//------------------------------------------------------------------------------\n// Helpers\n//------------------------------------------------------------------------------\n\nconst SUPPORTED_VERSIONS = [\n 3,\n 5,\n 6,\n 7,\n 8,\n 9,\n 10,\n 11,\n 12,\n 13\n];\n\n/**\n * Get the latest ECMAScript version supported by Espree.\n * @returns {number} The latest ECMAScript version.\n */\nexport function getLatestEcmaVersion() {\n return SUPPORTED_VERSIONS[SUPPORTED_VERSIONS.length - 1];\n}\n\n/**\n * Get the list of ECMAScript versions supported by Espree.\n * @returns {number[]} An array containing the supported ECMAScript versions.\n */\nexport function getSupportedEcmaVersions() {\n return [...SUPPORTED_VERSIONS];\n}\n\n/**\n * Normalize ECMAScript version from the initial config\n * @param {number|\"latest\"} ecmaVersion ECMAScript version from the initial config\n * @throws {Error} throws an error if the ecmaVersion is invalid.\n * @returns {number} normalized ECMAScript version\n */\nfunction normalizeEcmaVersion(ecmaVersion = 5) {\n\n let version = ecmaVersion === \"latest\" ? getLatestEcmaVersion() : ecmaVersion;\n\n if (typeof version !== \"number\") {\n throw new Error(`ecmaVersion must be a number or \"latest\". Received value of type ${typeof ecmaVersion} instead.`);\n }\n\n // Calculate ECMAScript edition number from official year version starting with\n // ES2015, which corresponds with ES6 (or a difference of 2009).\n if (version >= 2015) {\n version -= 2009;\n }\n\n if (!SUPPORTED_VERSIONS.includes(version)) {\n throw new Error(\"Invalid ecmaVersion.\");\n }\n\n return version;\n}\n\n/**\n * Normalize sourceType from the initial config\n * @param {\"script\"|\"module\"|\"commonjs\"} sourceType to normalize\n * @throws {Error} throw an error if sourceType is invalid\n * @returns {\"script\"|\"module\"} normalized sourceType\n */\nfunction normalizeSourceType(sourceType = \"script\") {\n if (sourceType === \"script\" || sourceType === \"module\") {\n return sourceType;\n }\n\n if (sourceType === \"commonjs\") {\n return \"script\";\n }\n\n throw new Error(\"Invalid sourceType.\");\n}\n\n/**\n * Normalize parserOptions\n * @param {ParserOptions} options the parser options to normalize\n * @throws {Error} throw an error if found invalid option.\n * @returns {NormalizedParserOptions} normalized options\n */\nexport function normalizeOptions(options) {\n const ecmaVersion = normalizeEcmaVersion(options.ecmaVersion);\n\n /** @type {\"script\"|\"module\"} */\n const sourceType = normalizeSourceType(options.sourceType);\n const ranges = options.range === true;\n const locations = options.loc === true;\n\n if (ecmaVersion !== 3 && options.allowReserved) {\n\n // a value of `false` is intentionally allowed here, so a shared config can overwrite it when needed\n throw new Error(\"`allowReserved` is only supported when ecmaVersion is 3\");\n }\n\n // Note: value in Acorn can also be \"never\" but we throw in such a case\n if (typeof options.allowReserved !== \"undefined\" && typeof options.allowReserved !== \"boolean\") {\n throw new Error(\"`allowReserved`, when present, must be `true` or `false`\");\n }\n const allowReserved = ecmaVersion === 3 ? (options.allowReserved || \"never\") : false;\n const ecmaFeatures = options.ecmaFeatures || {};\n const allowReturnOutsideFunction = options.sourceType === \"commonjs\" ||\n Boolean(ecmaFeatures.globalReturn);\n\n if (sourceType === \"module\" && ecmaVersion < 6) {\n throw new Error(\"sourceType 'module' is not supported when ecmaVersion < 2015. Consider adding `{ ecmaVersion: 2015 }` to the parser options.\");\n }\n\n return Object.assign({}, options, {\n ecmaVersion,\n sourceType,\n ranges,\n locations,\n allowReserved,\n allowReturnOutsideFunction\n });\n}\n","/* eslint-disable no-param-reassign*/\nimport TokenTranslator from \"./token-translator.js\";\nimport { normalizeOptions } from \"./options.js\";\n\nconst STATE = Symbol(\"espree's internal state\");\nconst ESPRIMA_FINISH_NODE = Symbol(\"espree's esprimaFinishNode\");\n\n// ----------------------------------------------------------------------------\n// Types exported from file\n// ----------------------------------------------------------------------------\n/**\n * @typedef {{\n * index?: number;\n * lineNumber?: number;\n * column?: number;\n * } & SyntaxError} EnhancedSyntaxError\n */\n\n// We add `jsxAttrValueToken` ourselves.\n/**\n * @typedef {{\n * jsxAttrValueToken?: acorn.TokenType;\n * } & tokTypesType} EnhancedTokTypes\n */\n\n// ----------------------------------------------------------------------------\n// Local type imports\n// ----------------------------------------------------------------------------\n/**\n * @local\n * @typedef {import('acorn')} acorn\n * @typedef {typeof import('acorn-jsx').tokTypes} tokTypesType\n * @typedef {import('acorn-jsx').AcornJsxParser} AcornJsxParser\n * @typedef {import('../espree').ParserOptions} ParserOptions\n * @typedef {import('../espree').ecmaVersion} ecmaVersion\n */\n\n// ----------------------------------------------------------------------------\n// Local types\n// ----------------------------------------------------------------------------\n/**\n * @local\n * @typedef {{\n * generator?: boolean\n * } & acorn.Node} EsprimaNode\n */\n/**\n * Suggests an integer\n * @local\n * @typedef {number} int\n */\n\n/**\n * @typedef {{\n * type: string,\n * value: string,\n * range?: [number, number],\n * start?: number,\n * end?: number,\n * loc?: {\n * start: acorn.Position | undefined,\n * end: acorn.Position | undefined\n * }\n * }} EsprimaComment\n */\n\n/**\n * First two properties as in `acorn.Comment`; next two as in `acorn.Comment`\n * but optional. Last is different as has to allow `undefined`\n */\n/**\n * @local\n *\n * @typedef {import('../espree').EspreeTokens} EspreeTokens\n *\n * @typedef {{\n * tail?: boolean\n * } & acorn.Node} AcornTemplateNode\n *\n * @typedef {{\n * originalSourceType: \"script\"|\"module\"|\"commonjs\";\n * ecmaVersion: ecmaVersion;\n * comments: EsprimaComment[]|null;\n * impliedStrict: boolean;\n * lastToken: acorn.Token|null;\n * templateElements: (AcornTemplateNode)[];\n * jsxAttrValueToken: boolean;\n * }} BaseStateObject\n *\n * @typedef {{\n * tokens: null;\n * } & BaseStateObject} StateObject\n *\n * @typedef {{\n * tokens: EspreeTokens;\n * } & BaseStateObject} StateObjectWithTokens\n *\n * @typedef {{\n * sourceType?: \"script\"|\"module\"|\"commonjs\";\n * comments?: EsprimaComment[];\n * tokens?: EspreeTokens;\n * body: acorn.Node[];\n * } & acorn.Node} EsprimaProgramNode\n */\n/**\n * Converts an Acorn comment to an Esprima comment.\n *\n * - block True if it's a block comment, false if not.\n * - text The text of the comment.\n * - start The index at which the comment starts.\n * - end The index at which the comment ends.\n * - startLoc The location at which the comment starts.\n * - endLoc The location at which the comment ends.\n * @local\n * @typedef {(\n * block: boolean,\n * text: string,\n * start: int,\n * end: int,\n * startLoc: acorn.Position | undefined,\n * endLoc: acorn.Position | undefined\n * ) => EsprimaComment | void} AcornToEsprimaCommentConverter\n */\n\n// ----------------------------------------------------------------------------\n// Utilities\n// ----------------------------------------------------------------------------\n/**\n * Converts an Acorn comment to an Esprima comment.\n * @type {AcornToEsprimaCommentConverter}\n * @returns {EsprimaComment} The comment object.\n * @private\n */\nfunction convertAcornCommentToEsprimaComment(block, text, start, end, startLoc, endLoc) {\n const comment = /** @type {EsprimaComment} */ ({\n type: block ? \"Block\" : \"Line\",\n value: text\n });\n\n if (typeof start === \"number\") {\n comment.start = start;\n comment.end = end;\n comment.range = [start, end];\n }\n\n if (typeof startLoc === \"object\") {\n comment.loc = {\n start: startLoc,\n end: endLoc\n };\n }\n\n return comment;\n}\n\n// ----------------------------------------------------------------------------\n// Exports\n// ----------------------------------------------------------------------------\n/* eslint-disable arrow-body-style -- Need to supply formatted JSDoc for type info */\nexport default () => {\n\n /**\n * Returns the Espree parser.\n * @param {AcornJsxParser} Parser The Acorn parser\n * @returns {typeof EspreeParser} The Espree parser\n */\n return Parser => {\n const tokTypes = /** @type {EnhancedTokTypes} */ (Object.assign({}, Parser.acorn.tokTypes));\n\n if (Parser.acornJsx) {\n Object.assign(tokTypes, Parser.acornJsx.tokTypes);\n }\n\n /* eslint-disable no-shadow -- Using first class as type */\n /**\n * @export\n */\n return class EspreeParser extends Parser {\n /* eslint-enable no-shadow -- Using first class as type */\n /* eslint-disable jsdoc/check-types -- Allows generic object */\n /**\n * Adapted parser for Espree.\n * @param {ParserOptions|null} opts Espree options\n * @param {string|object} code The source code\n */\n constructor(opts, code) {\n /* eslint-enable jsdoc/check-types -- Allows generic object */\n\n /** @type {ParserOptions} */\n const newOpts = (typeof opts !== \"object\" || opts === null)\n ? {}\n : opts;\n\n const codeString = typeof code === \"string\"\n ? /** @type {string} */ (code)\n : String(code);\n\n // save original source type in case of commonjs\n const originalSourceType = newOpts.sourceType;\n const options = normalizeOptions(newOpts);\n const ecmaFeatures = options.ecmaFeatures || {};\n const tokenTranslator =\n options.tokens === true\n ? new TokenTranslator(tokTypes, codeString)\n : null;\n\n // Initialize acorn parser.\n super({\n\n // do not use spread, because we don't want to pass any unknown options to acorn\n ecmaVersion: options.ecmaVersion,\n sourceType: options.sourceType,\n ranges: options.ranges,\n locations: options.locations,\n allowReserved: options.allowReserved,\n\n // Truthy value is true for backward compatibility.\n allowReturnOutsideFunction: options.allowReturnOutsideFunction,\n\n // Collect tokens\n /**\n * Handler for receiving a token\n * @param {acorn.Token} token The token\n * @returns {void}\n */\n onToken: token => {\n if (tokenTranslator) {\n\n // Use `tokens`, `ecmaVersion`, and `jsxAttrValueToken` in the state.\n tokenTranslator.onToken(token, /** @type {StateObjectWithTokens} */ (this[STATE]));\n }\n if (token.type !== tokTypes.eof) {\n this[STATE].lastToken = token;\n }\n },\n\n // Collect comments\n /**\n * Converts an Acorn comment to an Esprima comment.\n * @type {AcornToEsprimaCommentConverter}\n */\n onComment: (block, text, start, end, startLoc, endLoc) => {\n if (this[STATE].comments) {\n const comment = convertAcornCommentToEsprimaComment(block, text, start, end, startLoc, endLoc);\n\n const comments = /** @type {EsprimaComment[]} */ (this[STATE].comments);\n\n comments.push(comment);\n }\n }\n }, codeString);\n\n // Force for TypeScript (indicating that `lineStart` is not undefined)\n if (!this.lineStart) {\n this.lineStart = 0;\n }\n\n /**\n * Data that is unique to Espree and is not represented internally in\n * Acorn. We put all of this data into a symbol property as a way to\n * avoid potential naming conflicts with future versions of Acorn.\n * @type {StateObjectWithTokens|StateObject}\n */\n this[STATE] = {\n originalSourceType: originalSourceType || options.sourceType,\n tokens: tokenTranslator ? /** @type {EspreeTokens} */ ([]) : null,\n comments: options.comment === true\n ? /** @type {EsprimaComment[]} */ ([])\n : null,\n impliedStrict: ecmaFeatures.impliedStrict === true && this.options.ecmaVersion >= 5,\n ecmaVersion: this.options.ecmaVersion,\n jsxAttrValueToken: false,\n\n /** @type {acorn.Token|null} */\n lastToken: null,\n\n /** @type {(AcornTemplateNode)[]} */\n templateElements: []\n };\n }\n\n /**\n * Returns Espree tokens.\n * @returns {EspreeTokens|null} Espree tokens\n */\n tokenize() {\n do {\n this.next();\n } while (this.type !== tokTypes.eof);\n\n // Consume the final eof token\n this.next();\n\n const extra = this[STATE];\n const tokens = extra.tokens;\n\n if (extra.comments && tokens) {\n tokens.comments = extra.comments;\n }\n\n return tokens;\n }\n\n /**\n * Calls parent.\n * @param {acorn.Node} node The node\n * @param {string} type The type\n * @returns {acorn.Node} The altered Node\n */\n finishNode(node, type) {\n const result = super.finishNode(node, type);\n\n return this[ESPRIMA_FINISH_NODE](result);\n }\n\n /**\n * Calls parent.\n * @param {acorn.Node} node The node\n * @param {string} type The type\n * @param {number} pos The position\n * @param {acorn.Position} loc The location\n * @returns {acorn.Node} The altered Node\n */\n finishNodeAt(node, type, pos, loc) {\n const result = super.finishNodeAt(node, type, pos, loc);\n\n return this[ESPRIMA_FINISH_NODE](result);\n }\n\n /**\n * Parses.\n * @returns {EsprimaProgramNode} The program Node\n */\n parse() {\n const extra = this[STATE];\n\n const program = /** @type {EsprimaProgramNode} */ (super.parse());\n\n program.sourceType = extra.originalSourceType;\n\n if (extra.comments) {\n program.comments = extra.comments;\n }\n if (extra.tokens) {\n program.tokens = extra.tokens;\n }\n\n /*\n * Adjust opening and closing position of program to match Esprima.\n * Acorn always starts programs at range 0 whereas Esprima starts at the\n * first AST node's start (the only real difference is when there's leading\n * whitespace or leading comments). Acorn also counts trailing whitespace\n * as part of the program whereas Esprima only counts up to the last token.\n */\n if (program.body.length) {\n const [firstNode] = program.body;\n\n if (program.range && firstNode.range) {\n program.range[0] = firstNode.range[0];\n }\n if (program.loc && firstNode.loc) {\n program.loc.start = firstNode.loc.start;\n }\n program.start = firstNode.start;\n }\n if (extra.lastToken) {\n if (program.range && extra.lastToken.range) {\n program.range[1] = extra.lastToken.range[1];\n }\n if (program.loc && extra.lastToken.loc) {\n program.loc.end = extra.lastToken.loc.end;\n }\n program.end = extra.lastToken.end;\n }\n\n\n /*\n * https://github.com/eslint/espree/issues/349\n * Ensure that template elements have correct range information.\n * This is one location where Acorn produces a different value\n * for its start and end properties vs. the values present in the\n * range property. In order to avoid confusion, we set the start\n * and end properties to the values that are present in range.\n * This is done here, instead of in finishNode(), because Acorn\n * uses the values of start and end internally while parsing, making\n * it dangerous to change those values while parsing is ongoing.\n * By waiting until the end of parsing, we can safely change these\n * values without affect any other part of the process.\n */\n this[STATE].templateElements.forEach(templateElement => {\n const startOffset = -1;\n const endOffset = templateElement.tail ? 1 : 2;\n\n templateElement.start += startOffset;\n templateElement.end += endOffset;\n\n if (templateElement.range) {\n templateElement.range[0] += startOffset;\n templateElement.range[1] += endOffset;\n }\n\n if (templateElement.loc) {\n templateElement.loc.start.column += startOffset;\n templateElement.loc.end.column += endOffset;\n }\n });\n\n return program;\n }\n\n /**\n * Parses top level.\n * @param {acorn.Node} node AST Node\n * @returns {acorn.Node} The changed node\n */\n parseTopLevel(node) {\n if (this[STATE].impliedStrict) {\n this.strict = true;\n }\n return super.parseTopLevel(node);\n }\n\n /**\n * Overwrites the default raise method to throw Esprima-style errors.\n * @param {int} pos The position of the error.\n * @param {string} message The error message.\n * @throws {EnhancedSyntaxError} A syntax error.\n * @returns {void}\n */\n raise(pos, message) {\n const loc = Parser.acorn.getLineInfo(this.input, pos);\n\n /** @type {EnhancedSyntaxError} */\n const err = new SyntaxError(message);\n\n err.index = pos;\n err.lineNumber = loc.line;\n err.column = loc.column + 1; // acorn uses 0-based columns\n throw err;\n }\n\n /**\n * Overwrites the default raise method to throw Esprima-style errors.\n * @param {int} pos The position of the error.\n * @param {string} message The error message.\n * @throws {EnhancedSyntaxError} A syntax error.\n * @returns {void}\n */\n raiseRecoverable(pos, message) {\n this.raise(pos, message);\n }\n\n /**\n * Overwrites the default unexpected method to throw Esprima-style errors.\n * @param {int} pos The position of the error.\n * @throws {EnhancedSyntaxError} A syntax error.\n * @returns {void}\n */\n unexpected(pos) {\n let message = \"Unexpected token\";\n\n if (pos !== null && pos !== void 0) {\n this.pos = pos;\n\n if (this.options.locations) {\n while (this.pos < /** @type {int} */ (this.lineStart)) {\n\n /** @type {int} */\n this.lineStart = this.input.lastIndexOf(\"\\n\", /** @type {int} */ (this.lineStart) - 2) + 1;\n --this.curLine;\n }\n }\n\n this.nextToken();\n }\n\n if (this.end > this.start) {\n message += ` ${this.input.slice(this.start, this.end)}`;\n }\n\n this.raise(this.start, message);\n }\n\n /**\n * Esprima-FB represents JSX strings as tokens called \"JSXText\", but Acorn-JSX\n * uses regular tt.string without any distinction between this and regular JS\n * strings. As such, we intercept an attempt to read a JSX string and set a flag\n * on extra so that when tokens are converted, the next token will be switched\n * to JSXText via onToken.\n * @param {number} quote A character code\n * @returns {void}\n */\n jsx_readString(quote) { // eslint-disable-line camelcase\n if (typeof super.jsx_readString === \"undefined\") {\n throw new Error(\"Not a JSX parser\");\n }\n super.jsx_readString(quote);\n\n if (this.type === tokTypes.string) {\n this[STATE].jsxAttrValueToken = true;\n }\n }\n\n /**\n * Performs last-minute Esprima-specific compatibility checks and fixes.\n * @param {acorn.Node} result The node to check.\n * @returns {EsprimaNode} The finished node.\n */\n [ESPRIMA_FINISH_NODE](result) {\n\n const esprimaResult = /** @type {EsprimaNode} */ (result);\n\n // Acorn doesn't count the opening and closing backticks as part of templates\n // so we have to adjust ranges/locations appropriately.\n if (result.type === \"TemplateElement\") {\n\n // save template element references to fix start/end later\n this[STATE].templateElements.push(result);\n }\n\n if (result.type.includes(\"Function\") && !esprimaResult.generator) {\n esprimaResult.generator = false;\n }\n\n return esprimaResult;\n }\n };\n };\n};\n","const version = \"main\";\n\nexport default version;\n","/**\n * @fileoverview Main Espree file that converts Acorn into Esprima output.\n *\n * This file contains code from the following MIT-licensed projects:\n * 1. Acorn\n * 2. Babylon\n * 3. Babel-ESLint\n *\n * This file also contains code from Esprima, which is BSD licensed.\n *\n * Acorn is Copyright 2012-2015 Acorn Contributors (https://github.com/marijnh/acorn/blob/master/AUTHORS)\n * Babylon is Copyright 2014-2015 various contributors (https://github.com/babel/babel/blob/master/packages/babylon/AUTHORS)\n * Babel-ESLint is Copyright 2014-2015 Sebastian McKenzie \n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are met:\n *\n * * Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright\n * notice, this list of conditions and the following disclaimer in the\n * documentation and/or other materials provided with the distribution.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF\n * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *\n * Esprima is Copyright (c) jQuery Foundation, Inc. and Contributors, All Rights Reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are met:\n *\n * * Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright\n * notice, this list of conditions and the following disclaimer in the\n * documentation and/or other materials provided with the distribution.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF\n * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n/* eslint no-undefined:0, no-use-before-define: 0 */\n\n// ----------------------------------------------------------------------------\n// Types exported from file\n// ----------------------------------------------------------------------------\n/**\n * @typedef {3|5|6|7|8|9|10|11|12|13|2015|2016|2017|2018|2019|2020|2021|2022|'latest'} ecmaVersion\n */\n\n/**\n * @typedef {import('./lib/token-translator').EsprimaToken} EspreeToken\n */\n\n/**\n * @typedef {import('./lib/espree').EsprimaComment} EspreeComment\n */\n\n/**\n * @typedef {{\n * comments?: EspreeComment[]\n * } & EspreeToken[]} EspreeTokens\n */\n\n/**\n * `jsx.Options` gives us 2 optional properties, so extend it\n *\n * `allowReserved`, `ranges`, `locations`, `allowReturnOutsideFunction`,\n * `onToken`, and `onComment` are as in `acorn.Options`\n *\n * `ecmaVersion` currently as in `acorn.Options` though optional\n *\n * `sourceType` as in `acorn.Options` but also allows `commonjs`\n *\n * `ecmaFeatures`, `range`, `loc`, `tokens` are not in `acorn.Options`\n *\n * `comment` is not in `acorn.Options` and doesn't err without it, but is used\n */\n/**\n * @typedef {{\n * allowReserved?: boolean,\n * ecmaVersion?: ecmaVersion,\n * sourceType?: \"script\"|\"module\"|\"commonjs\",\n * ecmaFeatures?: {\n * jsx?: boolean,\n * globalReturn?: boolean,\n * impliedStrict?: boolean\n * },\n * range?: boolean,\n * loc?: boolean,\n * tokens?: boolean,\n * comment?: boolean,\n * }} ParserOptions\n */\n\n// ----------------------------------------------------------------------------\n// Local type imports\n// ----------------------------------------------------------------------------\n/**\n * @local\n * @typedef {import('acorn')} acorn\n * @typedef {import('acorn-jsx').AcornJsxParser} AcornJsxParser\n * @typedef {import('./lib/espree').EnhancedSyntaxError} EnhancedSyntaxError\n * @typedef {typeof import('./lib/espree').EspreeParser} IEspreeParser\n */\n\nimport * as acorn from \"acorn\";\nimport jsx from \"acorn-jsx\";\nimport espree from \"./lib/espree.js\";\nimport espreeVersion from \"./lib/version.js\";\nimport * as visitorKeys from \"eslint-visitor-keys\";\nimport { getLatestEcmaVersion, getSupportedEcmaVersions } from \"./lib/options.js\";\n\n\n// To initialize lazily.\nconst parsers = {\n _regular: /** @type {IEspreeParser|null} */ (null),\n _jsx: /** @type {IEspreeParser|null} */ (null),\n\n /**\n * Returns regular Parser\n * @returns {IEspreeParser} Regular Acorn parser\n */\n get regular() {\n if (this._regular === null) {\n const espreeParserFactory = /** @type {unknown} */ (espree());\n\n this._regular = /** @type {IEspreeParser} */ (\n acorn.Parser.extend(\n\n /** @type {(BaseParser: typeof acorn.Parser) => typeof acorn.Parser} */\n (espreeParserFactory)\n )\n );\n }\n return this._regular;\n },\n\n /**\n * Returns JSX Parser\n * @returns {IEspreeParser} JSX Acorn parser\n */\n get jsx() {\n if (this._jsx === null) {\n const espreeParserFactory = /** @type {unknown} */ (espree());\n const jsxFactory = jsx();\n\n this._jsx = /** @type {IEspreeParser} */ (\n acorn.Parser.extend(\n jsxFactory,\n\n /** @type {(BaseParser: typeof acorn.Parser) => typeof acorn.Parser} */\n (espreeParserFactory)\n )\n );\n }\n return this._jsx;\n },\n\n /**\n * Returns Regular or JSX Parser\n * @param {ParserOptions} options Parser options\n * @returns {IEspreeParser} Regular or JSX Acorn parser\n */\n get(options) {\n const useJsx = Boolean(\n options &&\n options.ecmaFeatures &&\n options.ecmaFeatures.jsx\n );\n\n return useJsx ? this.jsx : this.regular;\n }\n};\n\n//------------------------------------------------------------------------------\n// Tokenizer\n//------------------------------------------------------------------------------\n\n/**\n * Tokenizes the given code.\n * @param {string} code The code to tokenize.\n * @param {ParserOptions} options Options defining how to tokenize.\n * @returns {EspreeTokens} An array of tokens.\n * @throws {EnhancedSyntaxError} If the input code is invalid.\n * @private\n */\nexport function tokenize(code, options) {\n const Parser = parsers.get(options);\n\n // Ensure to collect tokens.\n if (!options || options.tokens !== true) {\n options = Object.assign({}, options, { tokens: true }); // eslint-disable-line no-param-reassign\n }\n\n return /** @type {EspreeTokens} */ (new Parser(options, code).tokenize());\n}\n\n//------------------------------------------------------------------------------\n// Parser\n//------------------------------------------------------------------------------\n\n/**\n * Parses the given code.\n * @param {string} code The code to tokenize.\n * @param {ParserOptions} options Options defining how to tokenize.\n * @returns {acorn.Node} The \"Program\" AST node.\n * @throws {EnhancedSyntaxError} If the input code is invalid.\n */\nexport function parse(code, options) {\n const Parser = parsers.get(options);\n\n return new Parser(options, code).parse();\n}\n\n//------------------------------------------------------------------------------\n// Public\n//------------------------------------------------------------------------------\n\nexport const version = espreeVersion;\n\n/* istanbul ignore next */\nexport const VisitorKeys = (function() {\n return visitorKeys.KEYS;\n}());\n\n// Derive node types from VisitorKeys\n/* istanbul ignore next */\nexport const Syntax = (function() {\n let /** @type {Object} */\n types = {};\n\n if (typeof Object.create === \"function\") {\n types = Object.create(null);\n }\n\n for (const name of Object.keys(VisitorKeys)) {\n types[name] = name;\n }\n\n if (typeof Object.freeze === \"function\") {\n Object.freeze(types);\n }\n\n return types;\n}());\n\nexport const latestEcmaVersion = getLatestEcmaVersion();\n\nexport const supportedEcmaVersions = getSupportedEcmaVersions();\n"],"names":["version","acorn","jsx","espreeVersion","visitorKeys"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,KAAK,GAAG;AACd,IAAI,OAAO,EAAE,SAAS;AACtB,IAAI,GAAG,EAAE,OAAO;AAChB,IAAI,UAAU,EAAE,YAAY;AAC5B,IAAI,iBAAiB,EAAE,mBAAmB;AAC1C,IAAI,OAAO,EAAE,SAAS;AACtB,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,SAAS;AACtB,IAAI,UAAU,EAAE,YAAY;AAC5B,IAAI,MAAM,EAAE,QAAQ;AACpB,IAAI,iBAAiB,EA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MAAM,mBAAmB,GAAG,MAAM,CAAC,4BAA4B,CAAC,CAAC;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,mCAAmC,CAAC,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,EAAE,QAAQ,EAAE,MAAM,EAAE;AACxF,IAAI,MAAM,OAAO,kCAAkC;AACnD,QAAQ,IAAI,EAAE,KAAK,GAAG,OAAO,GAAG,MAAM;AACtC,QAAQ,KAAK,EAAE,IAAI;AACnB,KAAK,CAAC,CAAC;AACP;AACA,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;AACnC,QAAQ,OAAO,CAAC,KAAK,GAAG,KAAK,CAAC;AAC9B,QAAQ,OAAO,CAAC,GAAG,GAAG,GAAG,CAAC;AAC1B,QAAQ,OAAO,CAAC,KAAK,GAAG,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;AACrC,KAAK;AACL;AACA,IAAI,IAAI,OAAO,QAAQ,KAAK,QAAQ,EAAE;AACtC,QAAQ,OAAO,CAAC,GAAG,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AAC,CAAC,KAAK,EAAE,CAAC;AAC7C,CAAC;AACD;AACA;AACA;AACA;AACA;AACY,MAAC,OAAO,GAAGE,UAAc;AACrC;AACA;AACY,MAAC,WAAW,IAAI,WAAW;AACvC,IAAI,OAAOC,sBAAW,CAAC,IAAI,CAAC;AAC5B,CAAC,EAAE,EAAE;AACL;AACA;AACA;AACY,MAAC,MAAM,IAAI,WAAW;AAClC,IAAI;AACJ,QAAQ,KAAK,GAAG,EAAE,CAAC;AACnB;AACA,IAAI,IAAI,OAAO,MAAM,CAAC,MAAM,KAAK,UAAU,EAAE;AAC7C,QAAQ,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;AACpC,KAAK;AACL;AACA,IAAI,KAAK,MAAM,IAAI,IAAI,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE;AACjD,QAAQ,KAAK,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;AAC3B,KAAK;AACL;AACA,IAAI,IAAI,OAAO,MAAM,CAAC,MAAM,KAAK,UAAU,EAAE;AAC7C,QAAQ,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAC7B,KAAK;AACL;AACA,IAAI,OAAO,KAAK,CAAC;AACjB,CAAC,EAAE,EAAE;AACL;AACY,MAAC,iBAAiB,GAAG,oBAAoB,GAAG;AACxD;AACY,MAAC,qBAAqB,GAAG,wBAAwB;;;;;;;;;;"} \ No newline at end of file diff --git a/dist/espree.d.ts b/dist/espree.d.ts index b6ff73ad..31af4994 100644 --- a/dist/espree.d.ts +++ b/dist/espree.d.ts @@ -2,11 +2,11 @@ * Tokenizes the given code. * @param {string} code The code to tokenize. * @param {ParserOptions} options Options defining how to tokenize. - * @returns {import('acorn').Token[]} An array of tokens. + * @returns {EspreeTokens} An array of tokens. * @throws {import('./lib/espree').EnhancedSyntaxError} If the input code is invalid. * @private */ -export function tokenize(code: string, options: ParserOptions): import('acorn').Token[]; +export function tokenize(code: string, options: ParserOptions): EspreeTokens; /** * Parses the given code. * @param {string} code The code to tokenize. @@ -23,6 +23,11 @@ export const Syntax: { export const latestEcmaVersion: number; export const supportedEcmaVersions: number[]; export type ecmaVersion = 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 2015 | 2016 | 2017 | 2018 | 2019 | 2020 | 2021 | 2022 | 'latest'; +export type EspreeToken = import('./lib/token-translator').EsprimaToken; +export type EspreeComment = import('./lib/espree').EsprimaComment; +export type EspreeTokens = { + comments?: EspreeComment[]; +} & EspreeToken[]; export type ParserOptions = { allowReserved?: boolean; ecmaVersion?: ecmaVersion; diff --git a/dist/espree.d.ts.map b/dist/espree.d.ts.map index e12a2969..b09fe0c2 100644 --- a/dist/espree.d.ts.map +++ b/dist/espree.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"espree.d.ts","sourceRoot":"","sources":["../tmp/espree.js"],"names":[],"mappings":"AAoHA;;;;;;;GAOG;AACH,+BANW,MAAM,WACN,aAAa,GACX,OAAO,OAAO,EAAE,KAAK,EAAE,CAUnC;AAED;;;;;;GAMG;AACH,4BALW,MAAM,WACN,aAAa,GACX,OAAO,OAAO,EAAE,IAAI,CAMhC;AACD,6BAAqC;AACrC,kDAEI;AACJ;;EAYI;AACJ,uCAAwD;AACxD,6CAAgE;0BAhHnD,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,QAAQ;4BAc5G;IAAC,aAAa,CAAC,EAAE,OAAO,CAAC;IAAC,WAAW,CAAC,EAAE,WAAW,CAAC;IAAC,UAAU,CAAC,EAAE,QAAQ,GAAG,QAAQ,GAAG,UAAU,CAAC;IAAC,YAAY,CAAC,EAAE;QAAC,GAAG,CAAC,EAAE,OAAO,CAAC;Q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GAAG,CAAC,EAAE,OAAO,CAAC;IAAC,MAAM,CAAC,EAAE,OAAO,CAAC;IAAC,OAAO,CAAC,EAAE,OAAO,CAAA;CAAC"} \ No newline at end of file diff --git a/dist/lib/espree.d.ts b/dist/lib/espree.d.ts index 8e0a977b..8fc305d9 100644 --- a/dist/lib/espree.d.ts +++ b/dist/lib/espree.d.ts @@ -9,39 +9,17 @@ export class EspreeParser extends acorn.Parser { constructor(opts: import('../espree').ParserOptions | null, code: string | object); /** * Returns Espree tokens. - * @returns {{comments?: {type: string; value: string; range?: [number, number]; start?: number; end?: number; loc?: {start: import('acorn').Position | undefined; end: import('acorn').Position | undefined}}[]} & import('acorn').Token[] | null} Espree tokens + * @returns {import('../espree').EspreeTokens | null} Espree tokens */ - tokenize(): { - comments?: { - type: string; - value: string; - range?: [number, number]; - start?: number; - end?: number; - loc?: { - start: import('acorn').Position | undefined; - end: import('acorn').Position | undefined; - }; - }[]; - } & import('acorn').Token[] | null; + tokenize(): import('../espree').EspreeTokens | null; /** * Parses. - * @returns {{sourceType?: "script" | "module" | "commonjs"; comments?: {type: string; value: string; range?: [number, number]; start?: number; end?: number; loc?: {start: import('acorn').Position | undefined; end: import('acorn').Position | undefined}}[]; tokens?: import('acorn').Token[]; body: import('acorn').Node[]} & import('acorn').Node} The program Node + * @returns {{sourceType?: "script" | "module" | "commonjs"; comments?: EsprimaComment[]; tokens?: import('../espree').EspreeTokens; body: import('acorn').Node[]} & import('acorn').Node} The program Node */ parse(): { sourceType?: "script" | "module" | "commonjs"; - comments?: { - type: string; - value: string; - range?: [number, number]; - start?: number; - end?: number; - loc?: { - start: import('acorn').Position | undefined; - end: import('acorn').Position | undefined; - }; - }[]; - tokens?: import('acorn').Token[]; + comments?: EsprimaComment[]; + tokens?: import('../espree').EspreeTokens; body: import('acorn').Node[]; } & import('acorn').Node; /** @@ -71,5 +49,16 @@ export type EnhancedSyntaxError = { export type EnhancedTokTypes = { jsxAttrValueToken?: import('acorn').TokenType; } & typeof import('acorn-jsx').tokTypes; +export type EsprimaComment = { + type: string; + value: string; + range?: [number, number]; + start?: number; + end?: number; + loc?: { + start: import('acorn').Position | undefined; + end: import('acorn').Position | undefined; + }; +}; import * as acorn from "acorn"; //# sourceMappingURL=espree.d.ts.map \ No newline at end of file diff --git a/dist/lib/espree.d.ts.map b/dist/lib/espree.d.ts.map index 50e3cc78..c4cf4532 100644 --- a/dist/lib/espree.d.ts.map +++ b/dist/lib/espree.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"espree.d.ts","sourceRoot":"","sources":["../../tmp/lib/espree.js"],"names":[],"mappings":"AAgDe,sCAIA,OAAO,WAAW,EAAE,cAAc,KAChC,mBAAmB,CA+QnC;;AACD;IAEY;;;;OAIG;IACH,kBAHW,OAAO,WAAW,EAAE,aAAa,GAAG,IAAI,QACxC,MAAM,GAAG,MAAM,EAIjC;IAEO;;;OAGG;IACH,YAFa;QAAC,QAAQ,CAAC,EAAE;YAAC,IAAI,EAAE,MAAM,CAAC;YAAC,KAAK,EAAE,MAAM,CAAC;YAAC,KAAK,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;YAAC,KAAK,CAAC,EAAE,MAAM,CAAC;YAAC,GAAG,CAAC,EAAE,MAAM,CAAC;YAAC,GAAG,CAAC,EAAE;gBAAC,KAAK,EAAE,OAAO,OAAO,EAAE,QAAQ,GAAG,SAAS,CAAC;gBAAC,GAAG,EAAE,OAAO,OAAO,EAAE,QAAQ,GAAG,SAAS,CAAA;aAAC,CAAA;SAAC,EAAE,CAAA;KAAC,GAAG,OAAO,OAAO,EAAE,KAAK,EAAE,GAAG,IAAI,CAIzP;IAwBO;;;OAGG;IACH,SAFa;QAAC,UAAU,CAAC,EAAE,QAAQ,GAAG,QAAQ,GAAG,UAAU,CAAC;QAAC,QAAQ,CAAC,EAAE;YAAC,IAAI,EAAE,MAAM,CAAC;YAAC,KAAK,EAAE,MAAM,CAAC;YAAC,KAAK,CAAC,EAAE,CAAC,MAAM,EA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EAAE,CAAC;QAAC,MAAM,CAAC,EAAE,OAAO,WAAW,EAAE,YAAY,CAAC;QAAC,IAAI,EAAE,OAAO,OAAO,EAAE,IAAI,EAAE,CAAA;KAAC,GAAG,OAAO,OAAO,EAAE,IAAI,CAIhM;IAsBO;;;;;;OAMG;IACH,sBALW,MAAM,WACN,MAAM,GAEJ,IAAI,CAIxB;IAYO;;;;;;;;OAQG;IACH,sBAHW,MAAM,GACJ,IAAI,CAIxB;CACJ;kCA7aY;IAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAC,GAAG,WAAW;+BAIpE;IAAC,iBAAiB,CAAC,EAAE,OAAO,OAAO,EAAE,SAAS,CAAA;CAAC,GAAG,cAAc,WAAW,EAAE,QAAQ;6BAIrF;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,GAAG,CAAC,EAAE,MAAM,CAAC;IAAC,GAAG,CAAC,EAAE;QAAC,KAAK,EAAE,OAAO,OAAO,EAAE,QAAQ,GAAG,SAAS,CAAC;QAAC,GAAG,EAAE,OAAO,OAAO,EAAE,QAAQ,GAAG,SAAS,CAAA;KAAC,CAAA;CAAC"} \ No newline at end of file diff --git a/dist/lib/token-translator.d.ts.map b/dist/lib/token-translator.d.ts.map index 4cffda18..3c683e38 100644 --- a/dist/lib/token-translator.d.ts.map +++ b/dist/lib/token-translator.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"token-translator.d.ts","sourceRoot":"","sources":["../../tmp/lib/token-translator.js"],"names":[],"mappings":";AA+DA;IAEI;;;;;OAKG;IACH,2BAJW,OAAO,UAAU,EAAE,gBAAgB,QACnC,MAAM,EAQhB;IAJG,oDAAmC;IAC3B,wCAAwC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AC,KAAK,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAC,CAAA;CAAC;AAiDlL;IAEI;;;;;OAKG;IACH,2BAJW,OAAO,UAAU,EAAE,gBAAgB,QACnC,MAAM,EAQhB;IAJG,oDAAmC;IAC3B,wCAAwC,CAAC,SAA9B,CAAC,OAAO,OAAO,EAAE,KAAK,CAAC,EAAE,CAAsB;IAClE,0CAAuB;IACvB,cAAiB;IAGrB;;;;;;;OAOG;IACH,iBAJW,OAAO,OAAO,EAAE,KAAK,SACrB;QAAC,iBAAiB,EAAE,OAAO,CAAC;QAAC,WAAW,EAAE,OAAO,WAAW,EAAE,WAAW,CAAA;KAAC,GACxE,YAAY,CAkDxB;IAED;;;;;OAKG;IACH,eAJW,OAAO,OAAO,EAAE,KAAK;gBACZ,YAAY,EAAE;;2BAAwB,OAAO;qBAAe,OAAO,WAAW,EAAE,WAAW;QAClG,IAAI,CAyDhB;CACJ"} \ No newline at end of file diff --git a/espree.js b/espree.js index 94c997cc..db4f0452 100644 --- a/espree.js +++ b/espree.js @@ -63,6 +63,20 @@ * @typedef {3|5|6|7|8|9|10|11|12|13|2015|2016|2017|2018|2019|2020|2021|2022|'latest'} ecmaVersion */ +/** + * @typedef {import('./lib/token-translator').EsprimaToken} EspreeToken + */ + +/** + * @typedef {import('./lib/espree').EsprimaComment} EspreeComment + */ + +/** + * @typedef {{ + * comments?: EspreeComment[] + * } & EspreeToken[]} EspreeTokens + */ + /** * `jsx.Options` gives us 2 optional properties, so extend it * @@ -182,7 +196,7 @@ const parsers = { * Tokenizes the given code. * @param {string} code The code to tokenize. * @param {ParserOptions} options Options defining how to tokenize. - * @returns {acorn.Token[]} An array of tokens. + * @returns {EspreeTokens} An array of tokens. * @throws {EnhancedSyntaxError} If the input code is invalid. * @private */ @@ -194,7 +208,7 @@ export function tokenize(code, options) { options = Object.assign({}, options, { tokens: true }); // eslint-disable-line no-param-reassign } - return /** @type {acorn.Token[]} */ (new Parser(options, code).tokenize()); + return /** @type {EspreeTokens} */ (new Parser(options, code).tokenize()); } //------------------------------------------------------------------------------ diff --git a/lib/espree.js b/lib/espree.js index 5848bd50..9e506568 100644 --- a/lib/espree.js +++ b/lib/espree.js @@ -51,12 +51,6 @@ const ESPRIMA_FINISH_NODE = Symbol("espree's esprimaFinishNode"); */ /** - * First three properties as in `acorn.Comment`; next two as in `acorn.Comment` - * but optional. Last is different as has to allow `undefined` - */ -/** - * @local - * * @typedef {{ * type: string, * value: string, @@ -68,10 +62,16 @@ const ESPRIMA_FINISH_NODE = Symbol("espree's esprimaFinishNode"); * end: acorn.Position | undefined * } * }} EsprimaComment + */ + +/** + * First two properties as in `acorn.Comment`; next two as in `acorn.Comment` + * but optional. Last is different as has to allow `undefined` + */ +/** + * @local * - * @typedef {{ - * comments?: EsprimaComment[] - * } & acorn.Token[]} EspreeTokens + * @typedef {import('../espree').EspreeTokens} EspreeTokens * * @typedef {{ * tail?: boolean @@ -98,7 +98,7 @@ const ESPRIMA_FINISH_NODE = Symbol("espree's esprimaFinishNode"); * @typedef {{ * sourceType?: "script"|"module"|"commonjs"; * comments?: EsprimaComment[]; - * tokens?: acorn.Token[]; + * tokens?: EspreeTokens; * body: acorn.Node[]; * } & acorn.Node} EsprimaProgramNode */ diff --git a/lib/token-translator.js b/lib/token-translator.js index 062986e4..561acfbf 100644 --- a/lib/token-translator.js +++ b/lib/token-translator.js @@ -44,23 +44,21 @@ * }} BaseEsprimaToken * * @typedef {{ - * type: string; - * } & BaseEsprimaToken} EsprimaToken - * - * @typedef {{ - * type: string | acorn.TokenType; - * } & BaseEsprimaToken} EsprimaTokenFlexible - * - * @typedef {{ * jsxAttrValueToken: boolean; * ecmaVersion: ecmaVersion; * }} ExtraNoTokens * * @typedef {{ - * tokens: EsprimaTokenFlexible[] + * tokens: EsprimaToken[] * } & ExtraNoTokens} Extra */ +/** + * @typedef {{ + * type: string; + * } & BaseEsprimaToken} EsprimaToken + */ + //------------------------------------------------------------------------------ // Requirements //------------------------------------------------------------------------------ @@ -148,7 +146,7 @@ class TokenTranslator { } /** - * Translates a single Esprima token to a single Acorn token. This may be + * Translates a single Acorn token to a single Esprima token. This may be * inaccurate due to how templates are handled differently in Esprima and * Acorn, but should be accurate for all other tokens. * @param {acorn.Token} token The Acorn token to translate.