index.js.map 1.1 MB

1
  1. {"version":3,"file":"index.js","sources":["../src/tokenizer/types.js","../src/util/whitespace.js","../src/util/location.js","../src/parser/base.js","../src/parser/comments.js","../src/parser/error-codes.js","../src/parser/error-message.js","../src/parser/error.js","../src/plugins/estree.js","../src/tokenizer/context.js","../../babel-helper-validator-identifier/src/identifier.ts","../../babel-helper-validator-identifier/src/keyword.ts","../src/util/identifier.js","../src/util/scopeflags.js","../src/util/scope.js","../src/plugins/flow/scope.js","../src/plugins/flow/index.js","../src/plugins/jsx/xhtml.js","../src/tokenizer/state.js","../src/plugins/jsx/index.js","../src/plugins/typescript/scope.js","../src/util/production-parameter.js","../src/plugins/typescript/index.js","../src/plugins/placeholders.js","../src/plugins/v8intrinsic.js","../src/plugin-utils.js","../src/options.js","../src/tokenizer/index.js","../src/util/class-scope.js","../src/util/expression-scope.js","../src/parser/util.js","../src/parser/node.js","../src/parser/lval.js","../src/parser/expression.js","../src/parser/statement.js","../src/parser/index.js","../src/index.js"],"sourcesContent":["// @flow\nimport type { TokContext } from \"./context\";\n// ## Token types\n\n// The assignment of fine-grained, information-carrying type objects\n// allows the tokenizer to store the information it has about a\n// token in a way that is very cheap for the parser to look up.\n\n// All token type variables start with an underscore, to make them\n// easy to recognize.\n\n// The `beforeExpr` property is used to disambiguate between 1) binary\n// expression (<) and JSX Tag start (<name>); 2) object literal and JSX\n// texts. It is set on the `updateContext` function in the JSX plugin.\n\n// The `startsExpr` property is used to determine whether an expression\n// may be the “argument” subexpression of a `yield` expression or\n// `yield` statement. It is set on all token types that may be at the\n// start of a subexpression.\n\n// `isLoop` marks a keyword as starting a loop, which is important\n// to know when parsing a label, in order to allow or disallow\n// continue jumps to that label.\n\nconst beforeExpr = true;\nconst startsExpr = true;\nconst isLoop = true;\nconst isAssign = true;\nconst prefix = true;\nconst postfix = true;\n\ntype TokenOptions = {\n keyword?: string,\n beforeExpr?: boolean,\n startsExpr?: boolean,\n rightAssociative?: boolean,\n isLoop?: boolean,\n isAssign?: boolean,\n prefix?: boolean,\n postfix?: boolean,\n binop?: ?number,\n};\n\nexport class TokenType {\n label: string;\n keyword: ?string;\n beforeExpr: boolean;\n startsExpr: boolean;\n rightAssociative: boolean;\n isLoop: boolean;\n isAssign: boolean;\n prefix: boolean;\n postfix: boolean;\n binop: ?number;\n updateContext: ?(context: Array<TokContext>) => void;\n\n constructor(label: string, conf: TokenOptions = {}) {\n this.label = label;\n this.keyword = conf.keyword;\n this.beforeExpr = !!conf.beforeExpr;\n this.startsExpr = !!conf.startsExpr;\n this.rightAssociative = !!conf.rightAssociative;\n this.isLoop = !!conf.isLoop;\n this.isAssign = !!conf.isAssign;\n this.prefix = !!conf.prefix;\n this.postfix = !!conf.postfix;\n this.binop = conf.binop != null ? conf.binop : null;\n this.updateContext = null;\n }\n}\n\nexport const keywords = new Map<string, TokenType>();\n\nfunction createKeyword(name: string, options: TokenOptions = {}): TokenType {\n options.keyword = name;\n const token = new TokenType(name, options);\n keywords.set(name, token);\n return token;\n}\n\nfunction createBinop(name: string, binop: number) {\n return new TokenType(name, { beforeExpr, binop });\n}\n\nexport const types: { [name: string]: TokenType } = {\n num: new TokenType(\"num\", { startsExpr }),\n bigint: new TokenType(\"bigint\", { startsExpr }),\n decimal: new TokenType(\"decimal\", { startsExpr }),\n regexp: new TokenType(\"regexp\", { startsExpr }),\n string: new TokenType(\"string\", { startsExpr }),\n name: new TokenType(\"name\", { startsExpr }),\n privateName: new TokenType(\"#name\", { startsExpr }),\n eof: new TokenType(\"eof\"),\n\n // Punctuation token types.\n bracketL: new TokenType(\"[\", { beforeExpr, startsExpr }),\n bracketHashL: new TokenType(\"#[\", { beforeExpr, startsExpr }),\n bracketBarL: new TokenType(\"[|\", { beforeExpr, startsExpr }),\n bracketR: new TokenType(\"]\"),\n bracketBarR: new TokenType(\"|]\"),\n braceL: new TokenType(\"{\", { beforeExpr, startsExpr }),\n braceBarL: new TokenType(\"{|\", { beforeExpr, startsExpr }),\n braceHashL: new TokenType(\"#{\", { beforeExpr, startsExpr }),\n braceR: new TokenType(\"}\", { beforeExpr }),\n braceBarR: new TokenType(\"|}\"),\n parenL: new TokenType(\"(\", { beforeExpr, startsExpr }),\n parenR: new TokenType(\")\"),\n comma: new TokenType(\",\", { beforeExpr }),\n semi: new TokenType(\";\", { beforeExpr }),\n colon: new TokenType(\":\", { beforeExpr }),\n doubleColon: new TokenType(\"::\", { beforeExpr }),\n dot: new TokenType(\".\"),\n question: new TokenType(\"?\", { beforeExpr }),\n questionDot: new TokenType(\"?.\"),\n arrow: new TokenType(\"=>\", { beforeExpr }),\n template: new TokenType(\"template\"),\n ellipsis: new TokenType(\"...\", { beforeExpr }),\n backQuote: new TokenType(\"`\", { startsExpr }),\n dollarBraceL: new TokenType(\"${\", { beforeExpr, startsExpr }),\n at: new TokenType(\"@\"),\n hash: new TokenType(\"#\", { startsExpr }),\n\n // Special hashbang token.\n interpreterDirective: new TokenType(\"#!...\"),\n\n // Operators. These carry several kinds of properties to help the\n // parser use them properly (the presence of these properties is\n // what categorizes them as operators).\n //\n // `binop`, when present, specifies that this operator is a binary\n // operator, and will refer to its precedence.\n //\n // `prefix` and `postfix` mark the operator as a prefix or postfix\n // unary operator.\n //\n // `isAssign` marks all of `=`, `+=`, `-=` etcetera, which act as\n // binary operators with a very low precedence, that should result\n // in AssignmentExpression nodes.\n\n eq: new TokenType(\"=\", { beforeExpr, isAssign }),\n assign: new TokenType(\"_=\", { beforeExpr, isAssign }),\n slashAssign: new TokenType(\"_=\", { beforeExpr, isAssign }),\n incDec: new TokenType(\"++/--\", { prefix, postfix, startsExpr }),\n bang: new TokenType(\"!\", { beforeExpr, prefix, startsExpr }),\n tilde: new TokenType(\"~\", { beforeExpr, prefix, startsExpr }),\n pipeline: createBinop(\"|>\", 0),\n nullishCoalescing: createBinop(\"??\", 1),\n logicalOR: createBinop(\"||\", 1),\n logicalAND: createBinop(\"&&\", 2),\n bitwiseOR: createBinop(\"|\", 3),\n bitwiseXOR: createBinop(\"^\", 4),\n bitwiseAND: createBinop(\"&\", 5),\n equality: createBinop(\"==/!=/===/!==\", 6),\n relational: createBinop(\"</>/<=/>=\", 7),\n bitShift: createBinop(\"<</>>/>>>\", 8),\n plusMin: new TokenType(\"+/-\", { beforeExpr, binop: 9, prefix, startsExpr }),\n // startsExpr: required by v8intrinsic plugin\n modulo: new TokenType(\"%\", { beforeExpr, binop: 10, startsExpr }),\n // unset `beforeExpr` as it can be `function *`\n star: new TokenType(\"*\", { binop: 10 }),\n slash: createBinop(\"/\", 10),\n exponent: new TokenType(\"**\", {\n beforeExpr,\n binop: 11,\n rightAssociative: true,\n }),\n\n // Keywords\n // Don't forget to update packages/babel-helper-validator-identifier/src/keyword.js\n // when new keywords are added\n _break: createKeyword(\"break\"),\n _case: createKeyword(\"case\", { beforeExpr }),\n _catch: createKeyword(\"catch\"),\n _continue: createKeyword(\"continue\"),\n _debugger: createKeyword(\"debugger\"),\n _default: createKeyword(\"default\", { beforeExpr }),\n _do: createKeyword(\"do\", { isLoop, beforeExpr }),\n _else: createKeyword(\"else\", { beforeExpr }),\n _finally: createKeyword(\"finally\"),\n _for: createKeyword(\"for\", { isLoop }),\n _function: createKeyword(\"function\", { startsExpr }),\n _if: createKeyword(\"if\"),\n _return: createKeyword(\"return\", { beforeExpr }),\n _switch: createKeyword(\"switch\"),\n _throw: createKeyword(\"throw\", { beforeExpr, prefix, startsExpr }),\n _try: createKeyword(\"try\"),\n _var: createKeyword(\"var\"),\n _const: createKeyword(\"const\"),\n _while: createKeyword(\"while\", { isLoop }),\n _with: createKeyword(\"with\"),\n _new: createKeyword(\"new\", { beforeExpr, startsExpr }),\n _this: createKeyword(\"this\", { startsExpr }),\n _super: createKeyword(\"super\", { startsExpr }),\n _class: createKeyword(\"class\", { startsExpr }),\n _extends: createKeyword(\"extends\", { beforeExpr }),\n _export: createKeyword(\"export\"),\n _import: createKeyword(\"import\", { startsExpr }),\n _null: createKeyword(\"null\", { startsExpr }),\n _true: createKeyword(\"true\", { startsExpr }),\n _false: createKeyword(\"false\", { startsExpr }),\n _in: createKeyword(\"in\", { beforeExpr, binop: 7 }),\n _instanceof: createKeyword(\"instanceof\", { beforeExpr, binop: 7 }),\n _typeof: createKeyword(\"typeof\", { beforeExpr, prefix, startsExpr }),\n _void: createKeyword(\"void\", { beforeExpr, prefix, startsExpr }),\n _delete: createKeyword(\"delete\", { beforeExpr, prefix, startsExpr }),\n};\n","// @flow\n\nimport * as charCodes from \"charcodes\";\n\n// Matches a whole line break (where CRLF is considered a single\n// line break). Used to count lines.\nexport const lineBreak = /\\r\\n?|[\\n\\u2028\\u2029]/;\nexport const lineBreakG = new RegExp(lineBreak.source, \"g\");\n\n// https://tc39.github.io/ecma262/#sec-line-terminators\nexport function isNewLine(code: number): boolean {\n switch (code) {\n case charCodes.lineFeed:\n case charCodes.carriageReturn:\n case charCodes.lineSeparator:\n case charCodes.paragraphSeparator:\n return true;\n\n default:\n return false;\n }\n}\n\nexport const skipWhiteSpace = /(?:\\s|\\/\\/.*|\\/\\*[^]*?\\*\\/)*/g;\n\n// https://tc39.github.io/ecma262/#sec-white-space\nexport function isWhitespace(code: number): boolean {\n switch (code) {\n case 0x0009: // CHARACTER TABULATION\n case 0x000b: // LINE TABULATION\n case 0x000c: // FORM FEED\n case charCodes.space:\n case charCodes.nonBreakingSpace:\n case charCodes.oghamSpaceMark:\n case 0x2000: // EN QUAD\n case 0x2001: // EM QUAD\n case 0x2002: // EN SPACE\n case 0x2003: // EM SPACE\n case 0x2004: // THREE-PER-EM SPACE\n case 0x2005: // FOUR-PER-EM SPACE\n case 0x2006: // SIX-PER-EM SPACE\n case 0x2007: // FIGURE SPACE\n case 0x2008: // PUNCTUATION SPACE\n case 0x2009: // THIN SPACE\n case 0x200a: // HAIR SPACE\n case 0x202f: // NARROW NO-BREAK SPACE\n case 0x205f: // MEDIUM MATHEMATICAL SPACE\n case 0x3000: // IDEOGRAPHIC SPACE\n case 0xfeff: // ZERO WIDTH NO-BREAK SPACE\n return true;\n\n default:\n return false;\n }\n}\n","// @flow\n\nimport { lineBreakG } from \"./whitespace\";\n\nexport type Pos = {\n start: number,\n};\n\n// These are used when `options.locations` is on, for the\n// `startLoc` and `endLoc` properties.\n\nexport class Position {\n line: number;\n column: number;\n\n constructor(line: number, col: number) {\n this.line = line;\n this.column = col;\n }\n}\n\nexport class SourceLocation {\n start: Position;\n end: Position;\n filename: string;\n identifierName: ?string;\n\n constructor(start: Position, end?: Position) {\n this.start = start;\n // $FlowIgnore (may start as null, but initialized later)\n this.end = end;\n }\n}\n\n// The `getLineInfo` function is mostly useful when the\n// `locations` option is off (for performance reasons) and you\n// want to find the line/column position for a given character\n// offset. `input` should be the code string that the offset refers\n// into.\n\nexport function getLineInfo(input: string, offset: number): Position {\n let line = 1;\n let lineStart = 0;\n let match;\n lineBreakG.lastIndex = 0;\n while ((match = lineBreakG.exec(input)) && match.index < offset) {\n line++;\n lineStart = lineBreakG.lastIndex;\n }\n\n return new Position(line, offset - lineStart);\n}\n","// @flow\n\nimport type { Options } from \"../options\";\nimport type State from \"../tokenizer/state\";\nimport type { PluginsMap } from \"./index\";\nimport type ScopeHandler from \"../util/scope\";\nimport type ExpressionScopeHandler from \"../util/expression-scope\";\nimport type ClassScopeHandler from \"../util/class-scope\";\nimport type ProductionParameterHandler from \"../util/production-parameter\";\n\nexport default class BaseParser {\n // Properties set by constructor in index.js\n declare options: Options;\n declare inModule: boolean;\n declare scope: ScopeHandler<*>;\n declare classScope: ClassScopeHandler;\n declare prodParam: ProductionParameterHandler;\n declare expressionScope: ExpressionScopeHandler;\n declare plugins: PluginsMap;\n declare filename: ?string;\n // Names of exports store. `default` is stored as a name for both\n // `export default foo;` and `export { foo as default };`.\n declare exportedIdentifiers: Set<string>;\n sawUnambiguousESM: boolean = false;\n ambiguousScriptDifferentAst: boolean = false;\n\n // Initialized by Tokenizer\n declare state: State;\n // input and length are not in state as they are constant and we do\n // not want to ever copy them, which happens if state gets cloned\n declare input: string;\n declare length: number;\n\n hasPlugin(name: string): boolean {\n return this.plugins.has(name);\n }\n\n getPluginOption(plugin: string, name: string) {\n // $FlowIssue\n if (this.hasPlugin(plugin)) return this.plugins.get(plugin)[name];\n }\n}\n","// @flow\n\n/**\n * Based on the comment attachment algorithm used in espree and estraverse.\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 <COPYRIGHT HOLDER> 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\nimport BaseParser from \"./base\";\nimport type { Comment, Node } from \"../types\";\n\nfunction last<T>(stack: $ReadOnlyArray<T>): T {\n return stack[stack.length - 1];\n}\n\nexport default class CommentsParser extends BaseParser {\n addComment(comment: Comment): void {\n if (this.filename) comment.loc.filename = this.filename;\n this.state.trailingComments.push(comment);\n this.state.leadingComments.push(comment);\n }\n\n adjustCommentsAfterTrailingComma(\n node: Node,\n elements: (Node | null)[],\n // When the current node is followed by a token which hasn't a respective AST node, we\n // need to take all the trailing comments to prevent them from being attached to an\n // unrelated node. e.g. in\n // var { x } /* cmt */ = { y }\n // we don't want /* cmt */ to be attached to { y }.\n // On the other hand, in\n // fn(x) [new line] /* cmt */ [new line] y\n // /* cmt */ is both a trailing comment of fn(x) and a leading comment of y\n takeAllComments?: boolean,\n ) {\n if (this.state.leadingComments.length === 0) {\n return;\n }\n\n let lastElement = null;\n let i = elements.length;\n while (lastElement === null && i > 0) {\n lastElement = elements[--i];\n }\n if (lastElement === null) {\n return;\n }\n\n for (let j = 0; j < this.state.leadingComments.length; j++) {\n if (\n this.state.leadingComments[j].end < this.state.commentPreviousNode.end\n ) {\n this.state.leadingComments.splice(j, 1);\n j--;\n }\n }\n\n const newTrailingComments = [];\n for (let i = 0; i < this.state.leadingComments.length; i++) {\n const leadingComment = this.state.leadingComments[i];\n if (leadingComment.end < node.end) {\n newTrailingComments.push(leadingComment);\n\n // Perf: we don't need to splice if we are going to reset the array anyway\n if (!takeAllComments) {\n this.state.leadingComments.splice(i, 1);\n i--;\n }\n } else {\n if (node.trailingComments === undefined) {\n node.trailingComments = [];\n }\n node.trailingComments.push(leadingComment);\n }\n }\n if (takeAllComments) this.state.leadingComments = [];\n\n if (newTrailingComments.length > 0) {\n lastElement.trailingComments = newTrailingComments;\n } else if (lastElement.trailingComments !== undefined) {\n lastElement.trailingComments = [];\n }\n }\n\n processComment(node: Node): void {\n if (node.type === \"Program\" && node.body.length > 0) return;\n\n const stack = this.state.commentStack;\n\n let firstChild, lastChild, trailingComments, i, j;\n\n if (this.state.trailingComments.length > 0) {\n // If the first comment in trailingComments comes after the\n // current node, then we're good - all comments in the array will\n // come after the node and so it's safe to add them as official\n // trailingComments.\n if (this.state.trailingComments[0].start >= node.end) {\n trailingComments = this.state.trailingComments;\n this.state.trailingComments = [];\n } else {\n // Otherwise, if the first comment doesn't come after the\n // current node, that means we have a mix of leading and trailing\n // comments in the array and that leadingComments contains the\n // same items as trailingComments. Reset trailingComments to\n // zero items and we'll handle this by evaluating leadingComments\n // later.\n this.state.trailingComments.length = 0;\n }\n } else if (stack.length > 0) {\n const lastInStack = last(stack);\n if (\n lastInStack.trailingComments &&\n lastInStack.trailingComments[0].start >= node.end\n ) {\n trailingComments = lastInStack.trailingComments;\n delete lastInStack.trailingComments;\n }\n }\n\n // Eating the stack.\n if (stack.length > 0 && last(stack).start >= node.start) {\n firstChild = stack.pop();\n }\n\n while (stack.length > 0 && last(stack).start >= node.start) {\n lastChild = stack.pop();\n }\n\n if (!lastChild && firstChild) lastChild = firstChild;\n\n // Adjust comments that follow a trailing comma on the last element in a\n // comma separated list of nodes to be the trailing comments on the last\n // element\n if (firstChild) {\n switch (node.type) {\n case \"ObjectExpression\":\n this.adjustCommentsAfterTrailingComma(node, node.properties);\n break;\n case \"ObjectPattern\":\n this.adjustCommentsAfterTrailingComma(node, node.properties, true);\n break;\n case \"CallExpression\":\n this.adjustCommentsAfterTrailingComma(node, node.arguments);\n break;\n case \"ArrayExpression\":\n this.adjustCommentsAfterTrailingComma(node, node.elements);\n break;\n case \"ArrayPattern\":\n this.adjustCommentsAfterTrailingComma(node, node.elements, true);\n break;\n }\n } else if (\n this.state.commentPreviousNode &&\n ((this.state.commentPreviousNode.type === \"ImportSpecifier\" &&\n node.type !== \"ImportSpecifier\") ||\n (this.state.commentPreviousNode.type === \"ExportSpecifier\" &&\n node.type !== \"ExportSpecifier\"))\n ) {\n this.adjustCommentsAfterTrailingComma(node, [\n this.state.commentPreviousNode,\n ]);\n }\n\n if (lastChild) {\n if (lastChild.leadingComments) {\n if (\n lastChild !== node &&\n lastChild.leadingComments.length > 0 &&\n last(lastChild.leadingComments).end <= node.start\n ) {\n node.leadingComments = lastChild.leadingComments;\n delete lastChild.leadingComments;\n } else {\n // A leading comment for an anonymous class had been stolen by its first ClassMethod,\n // so this takes back the leading comment.\n // See also: https://github.com/eslint/espree/issues/158\n for (i = lastChild.leadingComments.length - 2; i >= 0; --i) {\n if (lastChild.leadingComments[i].end <= node.start) {\n node.leadingComments = lastChild.leadingComments.splice(0, i + 1);\n break;\n }\n }\n }\n }\n } else if (this.state.leadingComments.length > 0) {\n if (last(this.state.leadingComments).end <= node.start) {\n if (this.state.commentPreviousNode) {\n for (j = 0; j < this.state.leadingComments.length; j++) {\n if (\n this.state.leadingComments[j].end <\n this.state.commentPreviousNode.end\n ) {\n this.state.leadingComments.splice(j, 1);\n j--;\n }\n }\n }\n if (this.state.leadingComments.length > 0) {\n node.leadingComments = this.state.leadingComments;\n this.state.leadingComments = [];\n }\n } else {\n // https://github.com/eslint/espree/issues/2\n //\n // In special cases, such as return (without a value) and\n // debugger, all comments will end up as leadingComments and\n // will otherwise be eliminated. This step runs when the\n // commentStack is empty and there are comments left\n // in leadingComments.\n //\n // This loop figures out the stopping point between the actual\n // leading and trailing comments by finding the location of the\n // first comment that comes after the given node.\n for (i = 0; i < this.state.leadingComments.length; i++) {\n if (this.state.leadingComments[i].end > node.start) {\n break;\n }\n }\n\n // Split the array based on the location of the first comment\n // that comes after the node. Keep in mind that this could\n // result in an empty array, and if so, the array must be\n // deleted.\n const leadingComments = this.state.leadingComments.slice(0, i);\n\n if (leadingComments.length) {\n node.leadingComments = leadingComments;\n }\n\n // Similarly, trailing comments are attached later. The variable\n // must be reset to null if there are no trailing comments.\n trailingComments = this.state.leadingComments.slice(i);\n if (trailingComments.length === 0) {\n trailingComments = null;\n }\n }\n }\n\n this.state.commentPreviousNode = node;\n\n if (trailingComments) {\n if (\n trailingComments.length &&\n trailingComments[0].start >= node.start &&\n last(trailingComments).end <= node.end\n ) {\n node.innerComments = trailingComments;\n } else {\n // TrailingComments maybe contain innerComments\n const firstTrailingCommentIndex = trailingComments.findIndex(\n comment => comment.end >= node.end,\n );\n\n if (firstTrailingCommentIndex > 0) {\n node.innerComments = trailingComments.slice(\n 0,\n firstTrailingCommentIndex,\n );\n node.trailingComments = trailingComments.slice(\n firstTrailingCommentIndex,\n );\n } else {\n node.trailingComments = trailingComments;\n }\n }\n }\n\n stack.push(node);\n }\n}\n","// @flow\n\nexport const ErrorCodes = Object.freeze({\n SyntaxError: \"BABEL_PARSER_SYNTAX_ERROR\",\n SourceTypeModuleError: \"BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED\",\n});\n\nexport type ErrorCode = $Values<typeof ErrorCodes>;\n","// @flow\n\nimport { makeErrorTemplates, ErrorCodes } from \"./error\";\n\n/* eslint sort-keys: \"error\" */\n\n/**\n * @module parser/error-message\n */\n\n// The Errors key follows https://cs.chromium.org/chromium/src/v8/src/common/message-template.h unless it does not exist\nexport const ErrorMessages = makeErrorTemplates(\n {\n AccessorIsGenerator: \"A %0ter cannot be a generator.\",\n ArgumentsInClass:\n \"'arguments' is only allowed in functions and class methods.\",\n AsyncFunctionInSingleStatementContext:\n \"Async functions can only be declared at the top level or inside a block.\",\n AwaitBindingIdentifier:\n \"Can not use 'await' as identifier inside an async function.\",\n AwaitBindingIdentifierInStaticBlock:\n \"Can not use 'await' as identifier inside a static block.\",\n AwaitExpressionFormalParameter:\n \"'await' is not allowed in async function parameters.\",\n AwaitNotInAsyncContext:\n \"'await' is only allowed within async functions and at the top levels of modules.\",\n AwaitNotInAsyncFunction: \"'await' is only allowed within async functions.\",\n BadGetterArity: \"A 'get' accesor must not have any formal parameters.\",\n BadSetterArity: \"A 'set' accesor must have exactly one formal parameter.\",\n BadSetterRestParameter:\n \"A 'set' accesor function argument must not be a rest parameter.\",\n ConstructorClassField: \"Classes may not have a field named 'constructor'.\",\n ConstructorClassPrivateField:\n \"Classes may not have a private field named '#constructor'.\",\n ConstructorIsAccessor: \"Class constructor may not be an accessor.\",\n ConstructorIsAsync: \"Constructor can't be an async function.\",\n ConstructorIsGenerator: \"Constructor can't be a generator.\",\n DeclarationMissingInitializer: \"'%0' require an initialization value.\",\n DecoratorBeforeExport:\n \"Decorators must be placed *before* the 'export' keyword. You can set the 'decoratorsBeforeExport' option to false to use the 'export @decorator class {}' syntax.\",\n DecoratorConstructor:\n \"Decorators can't be used with a constructor. Did you mean '@dec class { ... }'?\",\n DecoratorExportClass:\n \"Using the export keyword between a decorator and a class is not allowed. Please use `export @dec class` instead.\",\n DecoratorSemicolon: \"Decorators must not be followed by a semicolon.\",\n DecoratorStaticBlock: \"Decorators can't be used with a static block.\",\n DeletePrivateField: \"Deleting a private field is not allowed.\",\n DestructureNamedImport:\n \"ES2015 named imports do not destructure. Use another statement for destructuring after the import.\",\n DuplicateConstructor: \"Duplicate constructor in the same class.\",\n DuplicateDefaultExport: \"Only one default export allowed per module.\",\n DuplicateExport:\n \"`%0` has already been exported. Exported identifiers must be unique.\",\n DuplicateProto: \"Redefinition of __proto__ property.\",\n DuplicateRegExpFlags: \"Duplicate regular expression flag.\",\n ElementAfterRest: \"Rest element must be last element.\",\n EscapedCharNotAnIdentifier: \"Invalid Unicode escape.\",\n ExportBindingIsString:\n \"A string literal cannot be used as an exported binding without `from`.\\n- Did you mean `export { '%0' as '%1' } from 'some-module'`?\",\n ExportDefaultFromAsIdentifier:\n \"'from' is not allowed as an identifier after 'export default'.\",\n ForInOfLoopInitializer:\n \"'%0' loop variable declaration may not have an initializer.\",\n ForOfAsync: \"The left-hand side of a for-of loop may not be 'async'.\",\n ForOfLet: \"The left-hand side of a for-of loop may not start with 'let'.\",\n GeneratorInSingleStatementContext:\n \"Generators can only be declared at the top level or inside a block.\",\n IllegalBreakContinue: \"Unsyntactic %0.\",\n IllegalLanguageModeDirective:\n \"Illegal 'use strict' directive in function with non-simple parameter list.\",\n IllegalReturn: \"'return' outside of function.\",\n ImportBindingIsString:\n 'A string literal cannot be used as an imported binding.\\n- Did you mean `import { \"%0\" as foo }`?',\n ImportCallArgumentTrailingComma:\n \"Trailing comma is disallowed inside import(...) arguments.\",\n ImportCallArity: \"`import()` requires exactly %0.\",\n ImportCallNotNewExpression: \"Cannot use new with import(...).\",\n ImportCallSpreadArgument: \"`...` is not allowed in `import()`.\",\n InvalidBigIntLiteral: \"Invalid BigIntLiteral.\",\n InvalidCodePoint: \"Code point out of bounds.\",\n InvalidDecimal: \"Invalid decimal.\",\n InvalidDigit: \"Expected number in radix %0.\",\n InvalidEscapeSequence: \"Bad character escape sequence.\",\n InvalidEscapeSequenceTemplate: \"Invalid escape sequence in template.\",\n InvalidEscapedReservedWord: \"Escape sequence in keyword %0.\",\n InvalidIdentifier: \"Invalid identifier %0.\",\n InvalidLhs: \"Invalid left-hand side in %0.\",\n InvalidLhsBinding: \"Binding invalid left-hand side in %0.\",\n InvalidNumber: \"Invalid number.\",\n InvalidOrMissingExponent:\n \"Floating-point numbers require a valid exponent after the 'e'.\",\n InvalidOrUnexpectedToken: \"Unexpected character '%0'.\",\n InvalidParenthesizedAssignment: \"Invalid parenthesized assignment pattern.\",\n InvalidPrivateFieldResolution: \"Private name #%0 is not defined.\",\n InvalidPropertyBindingPattern: \"Binding member expression.\",\n InvalidRecordProperty:\n \"Only properties and spread elements are allowed in record definitions.\",\n InvalidRestAssignmentPattern: \"Invalid rest operator's argument.\",\n LabelRedeclaration: \"Label '%0' is already declared.\",\n LetInLexicalBinding:\n \"'let' is not allowed to be used as a name in 'let' or 'const' declarations.\",\n LineTerminatorBeforeArrow: \"No line break is allowed before '=>'.\",\n MalformedRegExpFlags: \"Invalid regular expression flag.\",\n MissingClassName: \"A class name is required.\",\n MissingEqInAssignment:\n \"Only '=' operator can be used for specifying default value.\",\n MissingSemicolon: \"Missing semicolon.\",\n MissingUnicodeEscape: \"Expecting Unicode escape sequence \\\\uXXXX.\",\n MixingCoalesceWithLogical:\n \"Nullish coalescing operator(??) requires parens when mixing with logical operators.\",\n ModuleAttributeDifferentFromType:\n \"The only accepted module attribute is `type`.\",\n ModuleAttributeInvalidValue:\n \"Only string literals are allowed as module attribute values.\",\n ModuleAttributesWithDuplicateKeys:\n 'Duplicate key \"%0\" is not allowed in module attributes.',\n ModuleExportNameHasLoneSurrogate:\n \"An export name cannot include a lone surrogate, found '\\\\u%0'.\",\n ModuleExportUndefined: \"Export '%0' is not defined.\",\n MultipleDefaultsInSwitch: \"Multiple default clauses.\",\n NewlineAfterThrow: \"Illegal newline after throw.\",\n NoCatchOrFinally: \"Missing catch or finally clause.\",\n NumberIdentifier: \"Identifier directly after number.\",\n NumericSeparatorInEscapeSequence:\n \"Numeric separators are not allowed inside unicode escape sequences or hex escape sequences.\",\n ObsoleteAwaitStar:\n \"'await*' has been removed from the async functions proposal. Use Promise.all() instead.\",\n OptionalChainingNoNew:\n \"Constructors in/after an Optional Chain are not allowed.\",\n OptionalChainingNoTemplate:\n \"Tagged Template Literals are not allowed in optionalChain.\",\n OverrideOnConstructor:\n \"'override' modifier cannot appear on a constructor declaration.\",\n ParamDupe: \"Argument name clash.\",\n PatternHasAccessor: \"Object pattern can't contain getter or setter.\",\n PatternHasMethod: \"Object pattern can't contain methods.\",\n PipelineBodyNoArrow:\n 'Unexpected arrow \"=>\" after pipeline body; arrow function in pipeline body must be parenthesized.',\n PipelineBodySequenceExpression:\n \"Pipeline body may not be a comma-separated sequence expression.\",\n PipelineHeadSequenceExpression:\n \"Pipeline head should not be a comma-separated sequence expression.\",\n PipelineTopicUnused:\n \"Pipeline is in topic style but does not use topic reference.\",\n PrimaryTopicNotAllowed:\n \"Topic reference was used in a lexical context without topic binding.\",\n PrimaryTopicRequiresSmartPipeline:\n \"Primary Topic Reference found but pipelineOperator not passed 'smart' for 'proposal' option.\",\n PrivateInExpectedIn:\n \"Private names are only allowed in property accesses (`obj.#%0`) or in `in` expressions (`#%0 in obj`).\",\n PrivateNameRedeclaration: \"Duplicate private name #%0.\",\n RecordExpressionBarIncorrectEndSyntaxType:\n \"Record expressions ending with '|}' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.\",\n RecordExpressionBarIncorrectStartSyntaxType:\n \"Record expressions starting with '{|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.\",\n RecordExpressionHashIncorrectStartSyntaxType:\n \"Record expressions starting with '#{' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.\",\n RecordNoProto: \"'__proto__' is not allowed in Record expressions.\",\n RestTrailingComma: \"Unexpected trailing comma after rest element.\",\n SloppyFunction:\n \"In non-strict mode code, functions can only be declared at top level, inside a block, or as the body of an if statement.\",\n StaticPrototype: \"Classes may not have static property named prototype.\",\n StrictDelete: \"Deleting local variable in strict mode.\",\n StrictEvalArguments: \"Assigning to '%0' in strict mode.\",\n StrictEvalArgumentsBinding: \"Binding '%0' in strict mode.\",\n StrictFunction:\n \"In strict mode code, functions can only be declared at top level or inside a block.\",\n StrictNumericEscape:\n \"The only valid numeric escape in strict mode is '\\\\0'.\",\n StrictOctalLiteral: \"Legacy octal literals are not allowed in strict mode.\",\n StrictWith: \"'with' in strict mode.\",\n SuperNotAllowed:\n \"`super()` is only valid inside a class constructor of a subclass. Maybe a typo in the method name ('constructor') or not extending another class?\",\n SuperPrivateField: \"Private fields can't be accessed on super.\",\n TrailingDecorator: \"Decorators must be attached to a class element.\",\n TupleExpressionBarIncorrectEndSyntaxType:\n \"Tuple expressions ending with '|]' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.\",\n TupleExpressionBarIncorrectStartSyntaxType:\n \"Tuple expressions starting with '[|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.\",\n TupleExpressionHashIncorrectStartSyntaxType:\n \"Tuple expressions starting with '#[' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.\",\n UnexpectedArgumentPlaceholder: \"Unexpected argument placeholder.\",\n UnexpectedAwaitAfterPipelineBody:\n 'Unexpected \"await\" after pipeline body; await must have parentheses in minimal proposal.',\n UnexpectedDigitAfterHash: \"Unexpected digit after hash token.\",\n UnexpectedImportExport:\n \"'import' and 'export' may only appear at the top level.\",\n UnexpectedKeyword: \"Unexpected keyword '%0'.\",\n UnexpectedLeadingDecorator:\n \"Leading decorators must be attached to a class declaration.\",\n UnexpectedLexicalDeclaration:\n \"Lexical declaration cannot appear in a single-statement context.\",\n UnexpectedNewTarget:\n \"`new.target` can only be used in functions or class properties.\",\n UnexpectedNumericSeparator:\n \"A numeric separator is only allowed between two digits.\",\n UnexpectedPrivateField:\n \"Private names can only be used as the name of a class element (i.e. class C { #p = 42; #m() {} } )\\n or a property of member expression (i.e. this.#p).\",\n UnexpectedReservedWord: \"Unexpected reserved word '%0'.\",\n UnexpectedSuper: \"'super' is only allowed in object methods and classes.\",\n UnexpectedToken: \"Unexpected token '%0'.\",\n UnexpectedTokenUnaryExponentiation:\n \"Illegal expression. Wrap left hand side or entire exponentiation in parentheses.\",\n UnsupportedBind: \"Binding should be performed on object property.\",\n UnsupportedDecoratorExport:\n \"A decorated export must export a class declaration.\",\n UnsupportedDefaultExport:\n \"Only expressions, functions or classes are allowed as the `default` export.\",\n UnsupportedImport:\n \"`import` can only be used in `import()` or `import.meta`.\",\n UnsupportedMetaProperty: \"The only valid meta property for %0 is %0.%1.\",\n UnsupportedParameterDecorator:\n \"Decorators cannot be used to decorate parameters.\",\n UnsupportedPropertyDecorator:\n \"Decorators cannot be used to decorate object literal properties.\",\n UnsupportedSuper:\n \"'super' can only be used with function calls (i.e. super()) or in property accesses (i.e. super.prop or super[prop]).\",\n UnterminatedComment: \"Unterminated comment.\",\n UnterminatedRegExp: \"Unterminated regular expression.\",\n UnterminatedString: \"Unterminated string constant.\",\n UnterminatedTemplate: \"Unterminated template.\",\n VarRedeclaration: \"Identifier '%0' has already been declared.\",\n YieldBindingIdentifier:\n \"Can not use 'yield' as identifier inside a generator.\",\n YieldInParameter: \"Yield expression is not allowed in formal parameters.\",\n ZeroDigitNumericSeparator:\n \"Numeric separator can not be used after leading 0.\",\n },\n /* code */ ErrorCodes.SyntaxError,\n);\n\nexport const SourceTypeModuleErrorMessages = makeErrorTemplates(\n {\n ImportMetaOutsideModule: `import.meta may appear only with 'sourceType: \"module\"'`,\n ImportOutsideModule: `'import' and 'export' may appear only with 'sourceType: \"module\"'`,\n },\n /* code */ ErrorCodes.SourceTypeModuleError,\n);\n","// @flow\n/* eslint sort-keys: \"error\" */\nimport { getLineInfo, type Position } from \"../util/location\";\nimport CommentsParser from \"./comments\";\nimport { type ErrorCode, ErrorCodes } from \"./error-codes\";\n\n// This function is used to raise exceptions on parse errors. It\n// takes an offset integer (into the current `input`) to indicate\n// the location of the error, attaches the position to the end\n// of the error message, and then raises a `SyntaxError` with that\n// message.\n\ntype ErrorContext = {\n pos: number,\n loc: Position,\n missingPlugin?: Array<string>,\n code?: string,\n reasonCode?: String,\n};\nexport type ParsingError = SyntaxError & ErrorContext;\n\nexport type ErrorTemplate = {\n code: ErrorCode,\n template: string,\n reasonCode: string,\n};\nexport type ErrorTemplates = {\n [key: string]: ErrorTemplate,\n};\n\nexport function makeErrorTemplates(\n messages: {\n [key: string]: string,\n },\n code: ErrorCode,\n): ErrorTemplates {\n const templates: ErrorTemplates = {};\n Object.keys(messages).forEach(reasonCode => {\n templates[reasonCode] = Object.freeze({\n code,\n reasonCode,\n template: messages[reasonCode],\n });\n });\n return Object.freeze(templates);\n}\n\nexport { ErrorCodes };\nexport {\n ErrorMessages as Errors,\n SourceTypeModuleErrorMessages as SourceTypeModuleErrors,\n} from \"./error-message\";\n\nexport type raiseFunction = (number, ErrorTemplate, ...any) => void;\n\nexport default class ParserError extends CommentsParser {\n // Forward-declaration: defined in tokenizer/index.js\n /*::\n +isLookahead: boolean;\n */\n\n getLocationForPosition(pos: number): Position {\n let loc;\n if (pos === this.state.start) loc = this.state.startLoc;\n else if (pos === this.state.lastTokStart) loc = this.state.lastTokStartLoc;\n else if (pos === this.state.end) loc = this.state.endLoc;\n else if (pos === this.state.lastTokEnd) loc = this.state.lastTokEndLoc;\n else loc = getLineInfo(this.input, pos);\n\n return loc;\n }\n\n raise(\n pos: number,\n { code, reasonCode, template }: ErrorTemplate,\n ...params: any\n ): Error | empty {\n return this.raiseWithData(pos, { code, reasonCode }, template, ...params);\n }\n\n /**\n * Raise a parsing error on given position pos. If errorRecovery is true,\n * it will first search current errors and overwrite the error thrown on the exact\n * position before with the new error message. If errorRecovery is false, it\n * fallbacks to `raise`.\n *\n * @param {number} pos\n * @param {string} errorTemplate\n * @param {...any} params\n * @returns {(Error | empty)}\n * @memberof ParserError\n */\n raiseOverwrite(\n pos: number,\n { code, template }: ErrorTemplate,\n ...params: any\n ): Error | empty {\n const loc = this.getLocationForPosition(pos);\n const message =\n template.replace(/%(\\d+)/g, (_, i: number) => params[i]) +\n ` (${loc.line}:${loc.column})`;\n if (this.options.errorRecovery) {\n const errors = this.state.errors;\n for (let i = errors.length - 1; i >= 0; i--) {\n const error = errors[i];\n if (error.pos === pos) {\n return Object.assign(error, { message });\n } else if (error.pos < pos) {\n break;\n }\n }\n }\n return this._raise({ code, loc, pos }, message);\n }\n\n raiseWithData(\n pos: number,\n data?: {\n missingPlugin?: Array<string>,\n code?: string,\n },\n errorTemplate: string,\n ...params: any\n ): Error | empty {\n const loc = this.getLocationForPosition(pos);\n const message =\n errorTemplate.replace(/%(\\d+)/g, (_, i: number) => params[i]) +\n ` (${loc.line}:${loc.column})`;\n return this._raise(Object.assign(({ loc, pos }: Object), data), message);\n }\n\n _raise(errorContext: ErrorContext, message: string): Error | empty {\n // $FlowIgnore\n const err: SyntaxError & ErrorContext = new SyntaxError(message);\n Object.assign(err, errorContext);\n if (this.options.errorRecovery) {\n if (!this.isLookahead) this.state.errors.push(err);\n return err;\n } else {\n throw err;\n }\n }\n}\n","// @flow\n\nimport { TokenType } from \"../tokenizer/types\";\nimport type Parser from \"../parser\";\nimport type { ExpressionErrors } from \"../parser/util\";\nimport * as N from \"../types\";\nimport type { Position } from \"../util/location\";\nimport { Errors } from \"../parser/error\";\n\nexport default (superClass: Class<Parser>): Class<Parser> =>\n class extends superClass {\n parseRegExpLiteral({ pattern, flags }): N.Node {\n let regex = null;\n try {\n regex = new RegExp(pattern, flags);\n } catch (e) {\n // In environments that don't support these flags value will\n // be null as the regex can't be represented natively.\n }\n const node = this.estreeParseLiteral<N.EstreeRegExpLiteral>(regex);\n node.regex = { pattern, flags };\n\n return node;\n }\n\n parseBigIntLiteral(value: any): N.Node {\n // https://github.com/estree/estree/blob/master/es2020.md#bigintliteral\n let bigInt;\n try {\n // $FlowIgnore\n bigInt = BigInt(value);\n } catch {\n bigInt = null;\n }\n const node = this.estreeParseLiteral<N.EstreeBigIntLiteral>(bigInt);\n node.bigint = String(node.value || value);\n\n return node;\n }\n\n parseDecimalLiteral(value: any): N.Node {\n // https://github.com/estree/estree/blob/master/experimental/decimal.md\n // todo: use BigDecimal when node supports it.\n const decimal = null;\n const node = this.estreeParseLiteral(decimal);\n node.decimal = String(node.value || value);\n\n return node;\n }\n\n estreeParseLiteral<T: N.Node>(value: any) {\n return this.parseLiteral<T>(value, \"Literal\");\n }\n\n parseStringLiteral(value: any): N.Node {\n return this.estreeParseLiteral(value);\n }\n\n parseNumericLiteral(value: any): any {\n return this.estreeParseLiteral(value);\n }\n\n parseNullLiteral(): N.Node {\n return this.estreeParseLiteral(null);\n }\n\n parseBooleanLiteral(value: boolean): N.BooleanLiteral {\n return this.estreeParseLiteral(value);\n }\n\n directiveToStmt(directive: N.Directive): N.ExpressionStatement {\n const directiveLiteral = directive.value;\n\n const stmt = this.startNodeAt(directive.start, directive.loc.start);\n const expression = this.startNodeAt(\n directiveLiteral.start,\n directiveLiteral.loc.start,\n );\n\n expression.value = directiveLiteral.extra.expressionValue;\n expression.raw = directiveLiteral.extra.raw;\n\n stmt.expression = this.finishNodeAt(\n expression,\n \"Literal\",\n directiveLiteral.end,\n directiveLiteral.loc.end,\n );\n stmt.directive = directiveLiteral.extra.raw.slice(1, -1);\n\n return this.finishNodeAt(\n stmt,\n \"ExpressionStatement\",\n directive.end,\n directive.loc.end,\n );\n }\n\n // ==================================\n // Overrides\n // ==================================\n\n initFunction(\n node: N.BodilessFunctionOrMethodBase,\n isAsync: ?boolean,\n ): void {\n super.initFunction(node, isAsync);\n node.expression = false;\n }\n\n checkDeclaration(node: N.Pattern | N.ObjectProperty): void {\n if (node != null && this.isObjectProperty(node)) {\n this.checkDeclaration(((node: any): N.EstreeProperty).value);\n } else {\n super.checkDeclaration(node);\n }\n }\n\n getObjectOrClassMethodParams(method: N.ObjectMethod | N.ClassMethod) {\n return ((method: any): N.EstreeProperty | N.EstreeMethodDefinition).value\n .params;\n }\n\n isValidDirective(stmt: N.Statement): boolean {\n return (\n stmt.type === \"ExpressionStatement\" &&\n stmt.expression.type === \"Literal\" &&\n typeof stmt.expression.value === \"string\" &&\n !stmt.expression.extra?.parenthesized\n );\n }\n\n stmtToDirective(stmt: N.Statement): N.Directive {\n const directive = super.stmtToDirective(stmt);\n const value = stmt.expression.value;\n\n // Record the expression value as in estree mode we want\n // the stmt to have the real value e.g. (\"use strict\") and\n // not the raw value e.g. (\"use\\\\x20strict\")\n this.addExtra(directive.value, \"expressionValue\", value);\n\n return directive;\n }\n\n parseBlockBody(\n node: N.BlockStatementLike,\n ...args: [?boolean, boolean, TokenType, void | (boolean => void)]\n ): void {\n super.parseBlockBody(node, ...args);\n\n const directiveStatements = node.directives.map(d =>\n this.directiveToStmt(d),\n );\n node.body = directiveStatements.concat(node.body);\n // $FlowIgnore - directives isn't optional in the type definition\n delete node.directives;\n }\n\n pushClassMethod(\n classBody: N.ClassBody,\n method: N.ClassMethod,\n isGenerator: boolean,\n isAsync: boolean,\n isConstructor: boolean,\n allowsDirectSuper: boolean,\n ): void {\n this.parseMethod(\n method,\n isGenerator,\n isAsync,\n isConstructor,\n allowsDirectSuper,\n \"ClassMethod\",\n true,\n );\n if (method.typeParameters) {\n // $FlowIgnore\n method.value.typeParameters = method.typeParameters;\n delete method.typeParameters;\n }\n classBody.body.push(method);\n }\n\n parseMaybePrivateName(...args: [boolean]): any {\n const node = super.parseMaybePrivateName(...args);\n if (\n node.type === \"PrivateName\" &&\n this.getPluginOption(\"estree\", \"classFeatures\")\n ) {\n return this.convertPrivateNameToPrivateIdentifier(node);\n }\n return node;\n }\n\n convertPrivateNameToPrivateIdentifier(\n node: N.PrivateName,\n ): N.EstreePrivateIdentifier {\n const name = super.getPrivateNameSV(node);\n node = (node: any);\n delete node.id;\n node.name = name;\n node.type = \"PrivateIdentifier\";\n return node;\n }\n\n isPrivateName(node: N.Node): boolean {\n if (!this.getPluginOption(\"estree\", \"classFeatures\")) {\n return super.isPrivateName(node);\n }\n return node.type === \"PrivateIdentifier\";\n }\n\n getPrivateNameSV(node: N.Node): string {\n if (!this.getPluginOption(\"estree\", \"classFeatures\")) {\n return super.getPrivateNameSV(node);\n }\n return node.name;\n }\n\n parseLiteral<T: N.Node>(value: any, type: $ElementType<T, \"type\">): T {\n const node = super.parseLiteral<T>(value, type);\n node.raw = node.extra.raw;\n delete node.extra;\n\n return node;\n }\n\n parseFunctionBody(\n node: N.Function,\n allowExpression: ?boolean,\n isMethod?: boolean = false,\n ): void {\n super.parseFunctionBody(node, allowExpression, isMethod);\n node.expression = node.body.type !== \"BlockStatement\";\n }\n\n parseMethod<T: N.MethodLike>(\n node: T,\n isGenerator: boolean,\n isAsync: boolean,\n isConstructor: boolean,\n allowDirectSuper: boolean,\n type: string,\n inClassScope: boolean = false,\n ): T {\n let funcNode = this.startNode();\n funcNode.kind = node.kind; // provide kind, so super method correctly sets state\n funcNode = super.parseMethod(\n funcNode,\n isGenerator,\n isAsync,\n isConstructor,\n allowDirectSuper,\n type,\n inClassScope,\n );\n funcNode.type = \"FunctionExpression\";\n delete funcNode.kind;\n // $FlowIgnore\n node.value = funcNode;\n if (type === \"ClassPrivateMethod\") {\n // $FlowIgnore\n node.computed = false;\n }\n type = \"MethodDefinition\";\n return this.finishNode(node, type);\n }\n\n parseClassProperty(...args: [N.ClassProperty]): any {\n const propertyNode = (super.parseClassProperty(...args): any);\n if (this.getPluginOption(\"estree\", \"classFeatures\")) {\n propertyNode.type = \"PropertyDefinition\";\n }\n return (propertyNode: N.EstreePropertyDefinition);\n }\n\n parseClassPrivateProperty(...args: [N.ClassPrivateProperty]): any {\n const propertyNode = (super.parseClassPrivateProperty(...args): any);\n if (this.getPluginOption(\"estree\", \"classFeatures\")) {\n propertyNode.type = \"PropertyDefinition\";\n propertyNode.computed = false;\n }\n return (propertyNode: N.EstreePropertyDefinition);\n }\n\n parseObjectMethod(\n prop: N.ObjectMethod,\n isGenerator: boolean,\n isAsync: boolean,\n isPattern: boolean,\n isAccessor: boolean,\n ): ?N.ObjectMethod {\n const node: N.EstreeProperty = (super.parseObjectMethod(\n prop,\n isGenerator,\n isAsync,\n isPattern,\n isAccessor,\n ): any);\n\n if (node) {\n node.type = \"Property\";\n if (((node: any): N.ClassMethod).kind === \"method\") node.kind = \"init\";\n node.shorthand = false;\n }\n\n return (node: any);\n }\n\n parseObjectProperty(\n prop: N.ObjectProperty,\n startPos: ?number,\n startLoc: ?Position,\n isPattern: boolean,\n refExpressionErrors: ?ExpressionErrors,\n ): ?N.ObjectProperty {\n const node: N.EstreeProperty = (super.parseObjectProperty(\n prop,\n startPos,\n startLoc,\n isPattern,\n refExpressionErrors,\n ): any);\n\n if (node) {\n node.kind = \"init\";\n node.type = \"Property\";\n }\n\n return (node: any);\n }\n\n toAssignable(node: N.Node, isLHS: boolean = false): N.Node {\n if (node != null && this.isObjectProperty(node)) {\n this.toAssignable(node.value, isLHS);\n\n return node;\n }\n\n return super.toAssignable(node, isLHS);\n }\n\n toAssignableObjectExpressionProp(prop: N.Node, ...args) {\n if (prop.kind === \"get\" || prop.kind === \"set\") {\n this.raise(prop.key.start, Errors.PatternHasAccessor);\n } else if (prop.method) {\n this.raise(prop.key.start, Errors.PatternHasMethod);\n } else {\n super.toAssignableObjectExpressionProp(prop, ...args);\n }\n }\n\n finishCallExpression<T: N.CallExpression | N.OptionalCallExpression>(\n node: T,\n optional: boolean,\n ): N.Expression {\n super.finishCallExpression(node, optional);\n\n if (node.callee.type === \"Import\") {\n ((node: N.Node): N.EstreeImportExpression).type = \"ImportExpression\";\n ((node: N.Node): N.EstreeImportExpression).source = node.arguments[0];\n if (this.hasPlugin(\"importAssertions\")) {\n ((node: N.Node): N.EstreeImportExpression).attributes =\n node.arguments[1] ?? null;\n }\n // $FlowIgnore - arguments isn't optional in the type definition\n delete node.arguments;\n // $FlowIgnore - callee isn't optional in the type definition\n delete node.callee;\n }\n\n return node;\n }\n\n toReferencedArguments(\n node:\n | N.CallExpression\n | N.OptionalCallExpression\n | N.EstreeImportExpression,\n /* isParenthesizedExpr?: boolean, */\n ) {\n // ImportExpressions do not have an arguments array.\n if (node.type === \"ImportExpression\") {\n return;\n }\n\n super.toReferencedArguments(node);\n }\n\n parseExport(node: N.Node) {\n super.parseExport(node);\n\n switch (node.type) {\n case \"ExportAllDeclaration\":\n node.exported = null;\n break;\n\n case \"ExportNamedDeclaration\":\n if (\n node.specifiers.length === 1 &&\n node.specifiers[0].type === \"ExportNamespaceSpecifier\"\n ) {\n node.type = \"ExportAllDeclaration\";\n node.exported = node.specifiers[0].exported;\n delete node.specifiers;\n }\n\n break;\n }\n\n return node;\n }\n\n parseSubscript(\n base: N.Expression,\n startPos: number,\n startLoc: Position,\n noCalls: ?boolean,\n state: N.ParseSubscriptState,\n ) {\n const node = super.parseSubscript(\n base,\n startPos,\n startLoc,\n noCalls,\n state,\n );\n\n if (state.optionalChainMember) {\n // https://github.com/estree/estree/blob/master/es2020.md#chainexpression\n if (\n node.type === \"OptionalMemberExpression\" ||\n node.type === \"OptionalCallExpression\"\n ) {\n node.type = node.type.substring(8); // strip Optional prefix\n }\n if (state.stop) {\n const chain = this.startNodeAtNode(node);\n chain.expression = node;\n return this.finishNode(chain, \"ChainExpression\");\n }\n } else if (\n node.type === \"MemberExpression\" ||\n node.type === \"CallExpression\"\n ) {\n node.optional = false;\n }\n\n return node;\n }\n\n hasPropertyAsPrivateName(node: N.Node): boolean {\n if (node.type === \"ChainExpression\") {\n node = node.expression;\n }\n return super.hasPropertyAsPrivateName(node);\n }\n\n isOptionalChain(node: N.Node): boolean {\n return node.type === \"ChainExpression\";\n }\n\n isObjectProperty(node: N.Node): boolean {\n return node.type === \"Property\" && node.kind === \"init\" && !node.method;\n }\n\n isObjectMethod(node: N.Node): boolean {\n return node.method || node.kind === \"get\" || node.kind === \"set\";\n }\n };\n","// @flow\n\n// The token context is used to track whether `}` matches\n// a template quasi `${` or other tokens containing `{`:\n// namely tt.braceL `{` and tt.braceHashL `#{`\n\nimport { types as tt } from \"./types\";\n\nexport class TokContext {\n constructor(token: string, preserveSpace?: boolean) {\n this.token = token;\n this.preserveSpace = !!preserveSpace;\n }\n\n token: string;\n preserveSpace: boolean;\n}\n\nexport const types: {\n [key: string]: TokContext,\n} = {\n brace: new TokContext(\"{\"),\n templateQuasi: new TokContext(\"${\"),\n template: new TokContext(\"`\", true),\n};\n\n// Token-specific context update code\n// Note that we should avoid accessing `this.prodParam` in context update,\n// because it is executed immediately when last token is consumed, which may be\n// before `this.prodParam` is updated. e.g.\n// ```\n// function *g() { () => yield / 2 }\n// ```\n// When `=>` is eaten, the context update of `yield` is executed, however,\n// `this.prodParam` still has `[Yield]` production because it is not yet updated\n\ntt.braceR.updateContext = context => {\n if (context.length > 1) {\n context.pop();\n }\n};\n\n// we don't need to update context for tt.braceBarL because we do not pop context for tt.braceBarR\ntt.braceL.updateContext = tt.braceHashL.updateContext = context => {\n context.push(types.brace);\n};\n\ntt.dollarBraceL.updateContext = context => {\n context.push(types.templateQuasi);\n};\n\ntt.backQuote.updateContext = context => {\n if (context[context.length - 1] === types.template) {\n context.pop();\n } else {\n context.push(types.template);\n }\n};\n","import * as charCodes from \"charcodes\";\n\n// ## Character categories\n\n// Big ugly regular expressions that match characters in the\n// whitespace, identifier, and identifier-start categories. These\n// are only applied when a character is found to actually have a\n// code point between 0x80 and 0xffff.\n// Generated by `scripts/generate-identifier-regex.js`.\n\n/* prettier-ignore */\nlet nonASCIIidentifierStartChars = \"\\xaa\\xb5\\xba\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\u02c1\\u02c6-\\u02d1\\u02e0-\\u02e4\\u02ec\\u02ee\\u0370-\\u0374\\u0376\\u0377\\u037a-\\u037d\\u037f\\u0386\\u0388-\\u038a\\u038c\\u038e-\\u03a1\\u03a3-\\u03f5\\u03f7-\\u0481\\u048a-\\u052f\\u0531-\\u0556\\u0559\\u0560-\\u0588\\u05d0-\\u05ea\\u05ef-\\u05f2\\u0620-\\u064a\\u066e\\u066f\\u0671-\\u06d3\\u06d5\\u06e5\\u06e6\\u06ee\\u06ef\\u06fa-\\u06fc\\u06ff\\u0710\\u0712-\\u072f\\u074d-\\u07a5\\u07b1\\u07ca-\\u07ea\\u07f4\\u07f5\\u07fa\\u0800-\\u0815\\u081a\\u0824\\u0828\\u0840-\\u0858\\u0860-\\u086a\\u08a0-\\u08b4\\u08b6-\\u08c7\\u0904-\\u0939\\u093d\\u0950\\u0958-\\u0961\\u0971-\\u0980\\u0985-\\u098c\\u098f\\u0990\\u0993-\\u09a8\\u09aa-\\u09b0\\u09b2\\u09b6-\\u09b9\\u09bd\\u09ce\\u09dc\\u09dd\\u09df-\\u09e1\\u09f0\\u09f1\\u09fc\\u0a05-\\u0a0a\\u0a0f\\u0a10\\u0a13-\\u0a28\\u0a2a-\\u0a30\\u0a32\\u0a33\\u0a35\\u0a36\\u0a38\\u0a39\\u0a59-\\u0a5c\\u0a5e\\u0a72-\\u0a74\\u0a85-\\u0a8d\\u0a8f-\\u0a91\\u0a93-\\u0aa8\\u0aaa-\\u0ab0\\u0ab2\\u0ab3\\u0ab5-\\u0ab9\\u0abd\\u0ad0\\u0ae0\\u0ae1\\u0af9\\u0b05-\\u0b0c\\u0b0f\\u0b10\\u0b13-\\u0b28\\u0b2a-\\u0b30\\u0b32\\u0b33\\u0b35-\\u0b39\\u0b3d\\u0b5c\\u0b5d\\u0b5f-\\u0b61\\u0b71\\u0b83\\u0b85-\\u0b8a\\u0b8e-\\u0b90\\u0b92-\\u0b95\\u0b99\\u0b9a\\u0b9c\\u0b9e\\u0b9f\\u0ba3\\u0ba4\\u0ba8-\\u0baa\\u0bae-\\u0bb9\\u0bd0\\u0c05-\\u0c0c\\u0c0e-\\u0c10\\u0c12-\\u0c28\\u0c2a-\\u0c39\\u0c3d\\u0c58-\\u0c5a\\u0c60\\u0c61\\u0c80\\u0c85-\\u0c8c\\u0c8e-\\u0c90\\u0c92-\\u0ca8\\u0caa-\\u0cb3\\u0cb5-\\u0cb9\\u0cbd\\u0cde\\u0ce0\\u0ce1\\u0cf1\\u0cf2\\u0d04-\\u0d0c\\u0d0e-\\u0d10\\u0d12-\\u0d3a\\u0d3d\\u0d4e\\u0d54-\\u0d56\\u0d5f-\\u0d61\\u0d7a-\\u0d7f\\u0d85-\\u0d96\\u0d9a-\\u0db1\\u0db3-\\u0dbb\\u0dbd\\u0dc0-\\u0dc6\\u0e01-\\u0e30\\u0e32\\u0e33\\u0e40-\\u0e46\\u0e81\\u0e82\\u0e84\\u0e86-\\u0e8a\\u0e8c-\\u0ea3\\u0ea5\\u0ea7-\\u0eb0\\u0eb2\\u0eb3\\u0ebd\\u0ec0-\\u0ec4\\u0ec6\\u0edc-\\u0edf\\u0f00\\u0f40-\\u0f47\\u0f49-\\u0f6c\\u0f88-\\u0f8c\\u1000-\\u102a\\u103f\\u1050-\\u1055\\u105a-\\u105d\\u1061\\u1065\\u1066\\u106e-\\u1070\\u1075-\\u1081\\u108e\\u10a0-\\u10c5\\u10c7\\u10cd\\u10d0-\\u10fa\\u10fc-\\u1248\\u124a-\\u124d\\u1250-\\u1256\\u1258\\u125a-\\u125d\\u1260-\\u1288\\u128a-\\u128d\\u1290-\\u12b0\\u12b2-\\u12b5\\u12b8-\\u12be\\u12c0\\u12c2-\\u12c5\\u12c8-\\u12d6\\u12d8-\\u1310\\u1312-\\u1315\\u1318-\\u135a\\u1380-\\u138f\\u13a0-\\u13f5\\u13f8-\\u13fd\\u1401-\\u166c\\u166f-\\u167f\\u1681-\\u169a\\u16a0-\\u16ea\\u16ee-\\u16f8\\u1700-\\u170c\\u170e-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176c\\u176e-\\u1770\\u1780-\\u17b3\\u17d7\\u17dc\\u1820-\\u1878\\u1880-\\u18a8\\u18aa\\u18b0-\\u18f5\\u1900-\\u191e\\u1950-\\u196d\\u1970-\\u1974\\u1980-\\u19ab\\u19b0-\\u19c9\\u1a00-\\u1a16\\u1a20-\\u1a54\\u1aa7\\u1b05-\\u1b33\\u1b45-\\u1b4b\\u1b83-\\u1ba0\\u1bae\\u1baf\\u1bba-\\u1be5\\u1c00-\\u1c23\\u1c4d-\\u1c4f\\u1c5a-\\u1c7d\\u1c80-\\u1c88\\u1c90-\\u1cba\\u1cbd-\\u1cbf\\u1ce9-\\u1cec\\u1cee-\\u1cf3\\u1cf5\\u1cf6\\u1cfa\\u1d00-\\u1dbf\\u1e00-\\u1f15\\u1f18-\\u1f1d\\u1f20-\\u1f45\\u1f48-\\u1f4d\\u1f50-\\u1f57\\u1f59\\u1f5b\\u1f5d\\u1f5f-\\u1f7d\\u1f80-\\u1fb4\\u1fb6-\\u1fbc\\u1fbe\\u1fc2-\\u1fc4\\u1fc6-\\u1fcc\\u1fd0-\\u1fd3\\u1fd6-\\u1fdb\\u1fe0-\\u1fec\\u1ff2-\\u1ff4\\u1ff6-\\u1ffc\\u2071\\u207f\\u2090-\\u209c\\u2102\\u2107\\u210a-\\u2113\\u2115\\u2118-\\u211d\\u2124\\u2126\\u2128\\u212a-\\u2139\\u213c-\\u213f\\u2145-\\u2149\\u214e\\u2160-\\u2188\\u2c00-\\u2c2e\\u2c30-\\u2c5e\\u2c60-\\u2ce4\\u2ceb-\\u2cee\\u2cf2\\u2cf3\\u2d00-\\u2d25\\u2d27\\u2d2d\\u2d30-\\u2d67\\u2d6f\\u2d80-\\u2d96\\u2da0-\\u2da6\\u2da8-\\u2dae\\u2db0-\\u2db6\\u2db8-\\u2dbe\\u2dc0-\\u2dc6\\u2dc8-\\u2dce\\u2dd0-\\u2dd6\\u2dd8-\\u2dde\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303c\\u3041-\\u3096\\u309b-\\u309f\\u30a1-\\u30fa\\u30fc-\\u30ff\\u3105-\\u312f\\u3131-\\u318e\\u31a0-\\u31bf\\u31f0-\\u31ff\\u3400-\\u4dbf\\u4e00-\\u9ffc\\ua000-\\ua48c\\ua4d0-\\ua4fd\\ua500-\\ua60c\\ua610-\\ua61f\\ua62a\\ua62b\\ua640-\\ua66e\\ua67f-\\ua69d\\ua6a0-\\ua6ef\\ua717-\\ua71f\\ua722-\\ua788\\ua78b-\\ua7bf\\ua7c2-\\ua7ca\\ua7f5-\\ua801\\ua803-\\ua805\\ua807-\\ua80a\\ua80c-\\ua822\\ua840-\\ua873\\ua882-\\ua8b3\\ua8f2-\\ua8f7\\ua8fb\\ua8fd\\ua8fe\\ua90a-\\ua925\\ua930-\\ua946\\ua960-\\ua97c\\ua984-\\ua9b2\\ua9cf\\ua9e0-\\ua9e4\\ua9e6-\\ua9ef\\ua9fa-\\ua9fe\\uaa00-\\uaa28\\uaa40-\\uaa42\\uaa44-\\uaa4b\\uaa60-\\uaa76\\uaa7a\\uaa7e-\\uaaaf\\uaab1\\uaab5\\uaab6\\uaab9-\\uaabd\\uaac0\\uaac2\\uaadb-\\uaadd\\uaae0-\\uaaea\\uaaf2-\\uaaf4\\uab01-\\uab06\\uab09-\\uab0e\\uab11-\\uab16\\uab20-\\uab26\\uab28-\\uab2e\\uab30-\\uab5a\\uab5c-\\uab69\\uab70-\\uabe2\\uac00-\\ud7a3\\ud7b0-\\ud7c6\\ud7cb-\\ud7fb\\uf900-\\ufa6d\\ufa70-\\ufad9\\ufb00-\\ufb06\\ufb13-\\ufb17\\ufb1d\\ufb1f-\\ufb28\\ufb2a-\\ufb36\\ufb38-\\ufb3c\\ufb3e\\ufb40\\ufb41\\ufb43\\ufb44\\ufb46-\\ufbb1\\ufbd3-\\ufd3d\\ufd50-\\ufd8f\\ufd92-\\ufdc7\\ufdf0-\\ufdfb\\ufe70-\\ufe74\\ufe76-\\ufefc\\uff21-\\uff3a\\uff41-\\uff5a\\uff66-\\uffbe\\uffc2-\\uffc7\\uffca-\\uffcf\\uffd2-\\uffd7\\uffda-\\uffdc\";\n/* prettier-ignore */\nlet nonASCIIidentifierChars = \"\\u200c\\u200d\\xb7\\u0300-\\u036f\\u0387\\u0483-\\u0487\\u0591-\\u05bd\\u05bf\\u05c1\\u05c2\\u05c4\\u05c5\\u05c7\\u0610-\\u061a\\u064b-\\u0669\\u0670\\u06d6-\\u06dc\\u06df-\\u06e4\\u06e7\\u06e8\\u06ea-\\u06ed\\u06f0-\\u06f9\\u0711\\u0730-\\u074a\\u07a6-\\u07b0\\u07c0-\\u07c9\\u07eb-\\u07f3\\u07fd\\u0816-\\u0819\\u081b-\\u0823\\u0825-\\u0827\\u0829-\\u082d\\u0859-\\u085b\\u08d3-\\u08e1\\u08e3-\\u0903\\u093a-\\u093c\\u093e-\\u094f\\u0951-\\u0957\\u0962\\u0963\\u0966-\\u096f\\u0981-\\u0983\\u09bc\\u09be-\\u09c4\\u09c7\\u09c8\\u09cb-\\u09cd\\u09d7\\u09e2\\u09e3\\u09e6-\\u09ef\\u09fe\\u0a01-\\u0a03\\u0a3c\\u0a3e-\\u0a42\\u0a47\\u0a48\\u0a4b-\\u0a4d\\u0a51\\u0a66-\\u0a71\\u0a75\\u0a81-\\u0a83\\u0abc\\u0abe-\\u0ac5\\u0ac7-\\u0ac9\\u0acb-\\u0acd\\u0ae2\\u0ae3\\u0ae6-\\u0aef\\u0afa-\\u0aff\\u0b01-\\u0b03\\u0b3c\\u0b3e-\\u0b44\\u0b47\\u0b48\\u0b4b-\\u0b4d\\u0b55-\\u0b57\\u0b62\\u0b63\\u0b66-\\u0b6f\\u0b82\\u0bbe-\\u0bc2\\u0bc6-\\u0bc8\\u0bca-\\u0bcd\\u0bd7\\u0be6-\\u0bef\\u0c00-\\u0c04\\u0c3e-\\u0c44\\u0c46-\\u0c48\\u0c4a-\\u0c4d\\u0c55\\u0c56\\u0c62\\u0c63\\u0c66-\\u0c6f\\u0c81-\\u0c83\\u0cbc\\u0cbe-\\u0cc4\\u0cc6-\\u0cc8\\u0cca-\\u0ccd\\u0cd5\\u0cd6\\u0ce2\\u0ce3\\u0ce6-\\u0cef\\u0d00-\\u0d03\\u0d3b\\u0d3c\\u0d3e-\\u0d44\\u0d46-\\u0d48\\u0d4a-\\u0d4d\\u0d57\\u0d62\\u0d63\\u0d66-\\u0d6f\\u0d81-\\u0d83\\u0dca\\u0dcf-\\u0dd4\\u0dd6\\u0dd8-\\u0ddf\\u0de6-\\u0def\\u0df2\\u0df3\\u0e31\\u0e34-\\u0e3a\\u0e47-\\u0e4e\\u0e50-\\u0e59\\u0eb1\\u0eb4-\\u0ebc\\u0ec8-\\u0ecd\\u0ed0-\\u0ed9\\u0f18\\u0f19\\u0f20-\\u0f29\\u0f35\\u0f37\\u0f39\\u0f3e\\u0f3f\\u0f71-\\u0f84\\u0f86\\u0f87\\u0f8d-\\u0f97\\u0f99-\\u0fbc\\u0fc6\\u102b-\\u103e\\u1040-\\u1049\\u1056-\\u1059\\u105e-\\u1060\\u1062-\\u1064\\u1067-\\u106d\\u1071-\\u1074\\u1082-\\u108d\\u108f-\\u109d\\u135d-\\u135f\\u1369-\\u1371\\u1712-\\u1714\\u1732-\\u1734\\u1752\\u1753\\u1772\\u1773\\u17b4-\\u17d3\\u17dd\\u17e0-\\u17e9\\u180b-\\u180d\\u1810-\\u1819\\u18a9\\u1920-\\u192b\\u1930-\\u193b\\u1946-\\u194f\\u19d0-\\u19da\\u1a17-\\u1a1b\\u1a55-\\u1a5e\\u1a60-\\u1a7c\\u1a7f-\\u1a89\\u1a90-\\u1a99\\u1ab0-\\u1abd\\u1abf\\u1ac0\\u1b00-\\u1b04\\u1b34-\\u1b44\\u1b50-\\u1b59\\u1b6b-\\u1b73\\u1b80-\\u1b82\\u1ba1-\\u1bad\\u1bb0-\\u1bb9\\u1be6-\\u1bf3\\u1c24-\\u1c37\\u1c40-\\u1c49\\u1c50-\\u1c59\\u1cd0-\\u1cd2\\u1cd4-\\u1ce8\\u1ced\\u1cf4\\u1cf7-\\u1cf9\\u1dc0-\\u1df9\\u1dfb-\\u1dff\\u203f\\u2040\\u2054\\u20d0-\\u20dc\\u20e1\\u20e5-\\u20f0\\u2cef-\\u2cf1\\u2d7f\\u2de0-\\u2dff\\u302a-\\u302f\\u3099\\u309a\\ua620-\\ua629\\ua66f\\ua674-\\ua67d\\ua69e\\ua69f\\ua6f0\\ua6f1\\ua802\\ua806\\ua80b\\ua823-\\ua827\\ua82c\\ua880\\ua881\\ua8b4-\\ua8c5\\ua8d0-\\ua8d9\\ua8e0-\\ua8f1\\ua8ff-\\ua909\\ua926-\\ua92d\\ua947-\\ua953\\ua980-\\ua983\\ua9b3-\\ua9c0\\ua9d0-\\ua9d9\\ua9e5\\ua9f0-\\ua9f9\\uaa29-\\uaa36\\uaa43\\uaa4c\\uaa4d\\uaa50-\\uaa59\\uaa7b-\\uaa7d\\uaab0\\uaab2-\\uaab4\\uaab7\\uaab8\\uaabe\\uaabf\\uaac1\\uaaeb-\\uaaef\\uaaf5\\uaaf6\\uabe3-\\uabea\\uabec\\uabed\\uabf0-\\uabf9\\ufb1e\\ufe00-\\ufe0f\\ufe20-\\ufe2f\\ufe33\\ufe34\\ufe4d-\\ufe4f\\uff10-\\uff19\\uff3f\";\n\nconst nonASCIIidentifierStart = new RegExp(\n \"[\" + nonASCIIidentifierStartChars + \"]\",\n);\nconst nonASCIIidentifier = new RegExp(\n \"[\" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + \"]\",\n);\n\nnonASCIIidentifierStartChars = nonASCIIidentifierChars = null;\n\n// These are a run-length and offset-encoded representation of the\n// >0xffff code points that are a valid part of identifiers. The\n// offset starts at 0x10000, and each pair of numbers represents an\n// offset to the next range, and then a size of the range. They were\n// generated by `scripts/generate-identifier-regex.js`.\n/* prettier-ignore */\n/* prettier-ignore */\nconst astralIdentifierStartCodes = [0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,157,310,10,21,11,7,153,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,349,41,7,1,79,28,11,0,9,21,107,20,28,22,13,52,76,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,85,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,159,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,230,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,35,56,264,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,190,0,80,921,103,110,18,195,2749,1070,4050,582,8634,568,8,30,114,29,19,47,17,3,32,20,6,18,689,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,43,8,8952,286,50,2,18,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,2357,44,11,6,17,0,370,43,1301,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42717,35,4148,12,221,3,5761,15,7472,3104,541,1507,4938];\n/* prettier-ignore */\nconst astralIdentifierCodes = [509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,370,1,154,10,176,2,54,14,32,9,16,3,46,10,54,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,161,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,406,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,19306,9,135,4,60,6,26,9,1014,0,2,54,8,3,82,0,12,1,19628,1,5319,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,262,6,10,9,419,13,1495,6,110,6,6,9,4759,9,787719,239];\n\n// This has a complexity linear to the value of the code. The\n// assumption is that looking up astral identifier characters is\n// rare.\nfunction isInAstralSet(code: number, set: readonly number[]): boolean {\n let pos = 0x10000;\n for (let i = 0, length = set.length; i < length; i += 2) {\n pos += set[i];\n if (pos > code) return false;\n\n pos += set[i + 1];\n if (pos >= code) return true;\n }\n return false;\n}\n\n// Test whether a given character code starts an identifier.\n\nexport function isIdentifierStart(code: number): boolean {\n if (code < charCodes.uppercaseA) return code === charCodes.dollarSign;\n if (code <= charCodes.uppercaseZ) return true;\n if (code < charCodes.lowercaseA) return code === charCodes.underscore;\n if (code <= charCodes.lowercaseZ) return true;\n if (code <= 0xffff) {\n return (\n code >= 0xaa && nonASCIIidentifierStart.test(String.fromCharCode(code))\n );\n }\n return isInAstralSet(code, astralIdentifierStartCodes);\n}\n\n// Test whether a given character is part of an identifier.\n\nexport function isIdentifierChar(code: number): boolean {\n if (code < charCodes.digit0) return code === charCodes.dollarSign;\n if (code < charCodes.colon) return true;\n if (code < charCodes.uppercaseA) return false;\n if (code <= charCodes.uppercaseZ) return true;\n if (code < charCodes.lowercaseA) return code === charCodes.underscore;\n if (code <= charCodes.lowercaseZ) return true;\n if (code <= 0xffff) {\n return code >= 0xaa && nonASCIIidentifier.test(String.fromCharCode(code));\n }\n return (\n isInAstralSet(code, astralIdentifierStartCodes) ||\n isInAstralSet(code, astralIdentifierCodes)\n );\n}\n\n// Test whether a given string is a valid identifier name\n\nexport function isIdentifierName(name: string): boolean {\n let isFirst = true;\n for (let i = 0; i < name.length; i++) {\n // The implementation is based on\n // https://source.chromium.org/chromium/chromium/src/+/master:v8/src/builtins/builtins-string-gen.cc;l=1455;drc=221e331b49dfefadbc6fa40b0c68e6f97606d0b3;bpv=0;bpt=1\n // We reimplement `codePointAt` because `codePointAt` is a V8 builtin which is not inlined by TurboFan (as of M91)\n // since `name` is mostly ASCII, an inlined `charCodeAt` wins here\n let cp = name.charCodeAt(i);\n if ((cp & 0xfc00) === 0xd800 && i + 1 < name.length) {\n const trail = name.charCodeAt(++i);\n if ((trail & 0xfc00) === 0xdc00) {\n cp = 0x10000 + ((cp & 0x3ff) << 10) + (trail & 0x3ff);\n }\n }\n if (isFirst) {\n isFirst = false;\n if (!isIdentifierStart(cp)) {\n return false;\n }\n } else if (!isIdentifierChar(cp)) {\n return false;\n }\n }\n return !isFirst;\n}\n","const reservedWords = {\n keyword: [\n \"break\",\n \"case\",\n \"catch\",\n \"continue\",\n \"debugger\",\n \"default\",\n \"do\",\n \"else\",\n \"finally\",\n \"for\",\n \"function\",\n \"if\",\n \"return\",\n \"switch\",\n \"throw\",\n \"try\",\n \"var\",\n \"const\",\n \"while\",\n \"with\",\n \"new\",\n \"this\",\n \"super\",\n \"class\",\n \"extends\",\n \"export\",\n \"import\",\n \"null\",\n \"true\",\n \"false\",\n \"in\",\n \"instanceof\",\n \"typeof\",\n \"void\",\n \"delete\",\n ],\n strict: [\n \"implements\",\n \"interface\",\n \"let\",\n \"package\",\n \"private\",\n \"protected\",\n \"public\",\n \"static\",\n \"yield\",\n ],\n strictBind: [\"eval\", \"arguments\"],\n};\nconst keywords = new Set(reservedWords.keyword);\nconst reservedWordsStrictSet = new Set(reservedWords.strict);\nconst reservedWordsStrictBindSet = new Set(reservedWords.strictBind);\n\n/**\n * Checks if word is a reserved word in non-strict mode\n */\nexport function isReservedWord(word: string, inModule: boolean): boolean {\n return (inModule && word === \"await\") || word === \"enum\";\n}\n\n/**\n * Checks if word is a reserved word in non-binding strict mode\n *\n * Includes non-strict reserved words\n */\nexport function isStrictReservedWord(word: string, inModule: boolean): boolean {\n return isReservedWord(word, inModule) || reservedWordsStrictSet.has(word);\n}\n\n/**\n * Checks if word is a reserved word in binding strict mode, but it is allowed as\n * a normal identifier.\n */\nexport function isStrictBindOnlyReservedWord(word: string): boolean {\n return reservedWordsStrictBindSet.has(word);\n}\n\n/**\n * Checks if word is a reserved word in binding strict mode\n *\n * Includes non-strict reserved words and non-binding strict reserved words\n */\nexport function isStrictBindReservedWord(\n word: string,\n inModule: boolean,\n): boolean {\n return (\n isStrictReservedWord(word, inModule) || isStrictBindOnlyReservedWord(word)\n );\n}\n\nexport function isKeyword(word: string): boolean {\n return keywords.has(word);\n}\n","/* eslint max-len: 0 */\n\n// @flow\n\nimport * as charCodes from \"charcodes\";\n\nexport {\n isIdentifierStart,\n isIdentifierChar,\n isReservedWord,\n isStrictBindOnlyReservedWord,\n isStrictBindReservedWord,\n isStrictReservedWord,\n isKeyword,\n} from \"@babel/helper-validator-identifier\";\n\nexport const keywordRelationalOperator = /^in(stanceof)?$/;\n\n// Test whether a current state character code and next character code is @\n\nexport function isIteratorStart(current: number, next: number): boolean {\n return current === charCodes.atSign && next === charCodes.atSign;\n}\n\n// This is the comprehensive set of JavaScript reserved words\n// If a word is in this set, it could be a reserved word,\n// depending on sourceType/strictMode/binding info. In other words\n// if a word is not in this set, it is not a reserved word under\n// any circumstance.\nconst reservedWordLikeSet = new Set([\n \"break\",\n \"case\",\n \"catch\",\n \"continue\",\n \"debugger\",\n \"default\",\n \"do\",\n \"else\",\n \"finally\",\n \"for\",\n \"function\",\n \"if\",\n \"return\",\n \"switch\",\n \"throw\",\n \"try\",\n \"var\",\n \"const\",\n \"while\",\n \"with\",\n \"new\",\n \"this\",\n \"super\",\n \"class\",\n \"extends\",\n \"export\",\n \"import\",\n \"null\",\n \"true\",\n \"false\",\n \"in\",\n \"instanceof\",\n \"typeof\",\n \"void\",\n \"delete\",\n // strict\n \"implements\",\n \"interface\",\n \"let\",\n \"package\",\n \"private\",\n \"protected\",\n \"public\",\n \"static\",\n \"yield\",\n // strictBind\n \"eval\",\n \"arguments\",\n // reservedWorkLike\n \"enum\",\n \"await\",\n]);\n\nexport function canBeReservedWord(word: string): boolean {\n return reservedWordLikeSet.has(word);\n}\n","// @flow\n\n// Each scope gets a bitset that may contain these flags\n// prettier-ignore\nexport const SCOPE_OTHER = 0b000000000,\n SCOPE_PROGRAM = 0b000000001,\n SCOPE_FUNCTION = 0b000000010,\n SCOPE_ARROW = 0b000000100,\n SCOPE_SIMPLE_CATCH = 0b000001000,\n SCOPE_SUPER = 0b000010000,\n SCOPE_DIRECT_SUPER = 0b000100000,\n SCOPE_CLASS = 0b001000000,\n SCOPE_STATIC_BLOCK = 0b010000000,\n SCOPE_TS_MODULE = 0b100000000,\n SCOPE_VAR = SCOPE_PROGRAM | SCOPE_FUNCTION | SCOPE_TS_MODULE;\n\nexport type ScopeFlags =\n | typeof SCOPE_OTHER\n | typeof SCOPE_PROGRAM\n | typeof SCOPE_FUNCTION\n | typeof SCOPE_VAR\n | typeof SCOPE_ARROW\n | typeof SCOPE_SIMPLE_CATCH\n | typeof SCOPE_SUPER\n | typeof SCOPE_DIRECT_SUPER\n | typeof SCOPE_CLASS\n | typeof SCOPE_STATIC_BLOCK;\n\n// These flags are meant to be _only_ used inside the Scope class (or subclasses).\n// prettier-ignore\nexport const BIND_KIND_VALUE = 0b000000_0000_01,\n BIND_KIND_TYPE = 0b000000_0000_10,\n // Used in checkLVal and declareName to determine the type of a binding\n BIND_SCOPE_VAR = 0b000000_0001_00, // Var-style binding\n BIND_SCOPE_LEXICAL = 0b000000_0010_00, // Let- or const-style binding\n BIND_SCOPE_FUNCTION = 0b000000_0100_00, // Function declaration\n BIND_SCOPE_OUTSIDE = 0b000000_1000_00, // Special case for function names as\n // bound inside the function\n // Misc flags\n BIND_FLAGS_NONE = 0b000001_0000_00,\n BIND_FLAGS_CLASS = 0b000010_0000_00,\n BIND_FLAGS_TS_ENUM = 0b000100_0000_00,\n BIND_FLAGS_TS_CONST_ENUM = 0b001000_0000_00,\n BIND_FLAGS_TS_EXPORT_ONLY = 0b010000_0000_00,\n BIND_FLAGS_FLOW_DECLARE_FN = 0b100000_0000_00;\n\n// These flags are meant to be _only_ used by Scope consumers\n// prettier-ignore\n/* = is value? | is type? | scope | misc flags */\nexport const BIND_CLASS = BIND_KIND_VALUE | BIND_KIND_TYPE | BIND_SCOPE_LEXICAL | BIND_FLAGS_CLASS ,\n BIND_LEXICAL = BIND_KIND_VALUE | 0 | BIND_SCOPE_LEXICAL | 0 ,\n BIND_VAR = BIND_KIND_VALUE | 0 | BIND_SCOPE_VAR | 0 ,\n BIND_FUNCTION = BIND_KIND_VALUE | 0 | BIND_SCOPE_FUNCTION | 0 ,\n BIND_TS_INTERFACE = 0 | BIND_KIND_TYPE | 0 | BIND_FLAGS_CLASS ,\n BIND_TS_TYPE = 0 | BIND_KIND_TYPE | 0 | 0 ,\n BIND_TS_ENUM = BIND_KIND_VALUE | BIND_KIND_TYPE | BIND_SCOPE_LEXICAL | BIND_FLAGS_TS_ENUM,\n BIND_TS_AMBIENT = 0 | 0 | 0 | BIND_FLAGS_TS_EXPORT_ONLY,\n // These bindings don't introduce anything in the scope. They are used for assignments and\n // function expressions IDs.\n BIND_NONE = 0 | 0 | 0 | BIND_FLAGS_NONE ,\n BIND_OUTSIDE = BIND_KIND_VALUE | 0 | 0 | BIND_FLAGS_NONE ,\n\n BIND_TS_CONST_ENUM = BIND_TS_ENUM | BIND_FLAGS_TS_CONST_ENUM,\n BIND_TS_NAMESPACE = 0 | 0 | 0 | BIND_FLAGS_TS_EXPORT_ONLY,\n\n BIND_FLOW_DECLARE_FN = BIND_FLAGS_FLOW_DECLARE_FN;\n\nexport type BindingTypes =\n | typeof BIND_NONE\n | typeof BIND_OUTSIDE\n | typeof BIND_VAR\n | typeof BIND_LEXICAL\n | typeof BIND_CLASS\n | typeof BIND_FUNCTION\n | typeof BIND_TS_INTERFACE\n | typeof BIND_TS_TYPE\n | typeof BIND_TS_ENUM\n | typeof BIND_TS_AMBIENT\n | typeof BIND_TS_NAMESPACE;\n\n// prettier-ignore\nexport const CLASS_ELEMENT_FLAG_STATIC = 0b1_00,\n CLASS_ELEMENT_KIND_GETTER = 0b0_10,\n CLASS_ELEMENT_KIND_SETTER = 0b0_01,\n CLASS_ELEMENT_KIND_ACCESSOR = CLASS_ELEMENT_KIND_GETTER | CLASS_ELEMENT_KIND_SETTER;\n\n// prettier-ignore\nexport const CLASS_ELEMENT_STATIC_GETTER = CLASS_ELEMENT_KIND_GETTER | CLASS_ELEMENT_FLAG_STATIC,\n CLASS_ELEMENT_STATIC_SETTER = CLASS_ELEMENT_KIND_SETTER | CLASS_ELEMENT_FLAG_STATIC,\n CLASS_ELEMENT_INSTANCE_GETTER = CLASS_ELEMENT_KIND_GETTER,\n CLASS_ELEMENT_INSTANCE_SETTER = CLASS_ELEMENT_KIND_SETTER,\n CLASS_ELEMENT_OTHER = 0;\n\nexport type ClassElementTypes =\n | typeof CLASS_ELEMENT_STATIC_GETTER\n | typeof CLASS_ELEMENT_STATIC_SETTER\n | typeof CLASS_ELEMENT_INSTANCE_GETTER\n | typeof CLASS_ELEMENT_INSTANCE_SETTER\n | typeof CLASS_ELEMENT_OTHER;\n","// @flow\nimport {\n SCOPE_ARROW,\n SCOPE_DIRECT_SUPER,\n SCOPE_FUNCTION,\n SCOPE_SIMPLE_CATCH,\n SCOPE_SUPER,\n SCOPE_PROGRAM,\n SCOPE_VAR,\n SCOPE_CLASS,\n SCOPE_STATIC_BLOCK,\n BIND_SCOPE_FUNCTION,\n BIND_SCOPE_VAR,\n BIND_SCOPE_LEXICAL,\n BIND_KIND_VALUE,\n type ScopeFlags,\n type BindingTypes,\n} from \"./scopeflags\";\nimport * as N from \"../types\";\nimport { Errors, type raiseFunction } from \"../parser/error\";\n\n// Start an AST node, attaching a start offset.\nexport class Scope {\n declare flags: ScopeFlags;\n // A set of var-declared names in the current lexical scope\n var: Set<string> = new Set();\n // A set of lexically-declared names in the current lexical scope\n lexical: Set<string> = new Set();\n // A set of lexically-declared FunctionDeclaration names in the current lexical scope\n functions: Set<string> = new Set();\n\n constructor(flags: ScopeFlags) {\n this.flags = flags;\n }\n}\n\n// The functions in this module keep track of declared variables in the\n// current scope in order to detect duplicate variable names.\nexport default class ScopeHandler<IScope: Scope = Scope> {\n scopeStack: Array<IScope> = [];\n declare raise: raiseFunction;\n declare inModule: boolean;\n undefinedExports: Map<string, number> = new Map();\n undefinedPrivateNames: Map<string, number> = new Map();\n\n constructor(raise: raiseFunction, inModule: boolean) {\n this.raise = raise;\n this.inModule = inModule;\n }\n\n get inFunction() {\n return (this.currentVarScopeFlags() & SCOPE_FUNCTION) > 0;\n }\n get allowSuper() {\n return (this.currentThisScopeFlags() & SCOPE_SUPER) > 0;\n }\n get allowDirectSuper() {\n return (this.currentThisScopeFlags() & SCOPE_DIRECT_SUPER) > 0;\n }\n get inClass() {\n return (this.currentThisScopeFlags() & SCOPE_CLASS) > 0;\n }\n get inClassAndNotInNonArrowFunction() {\n const flags = this.currentThisScopeFlags();\n return (flags & SCOPE_CLASS) > 0 && (flags & SCOPE_FUNCTION) === 0;\n }\n get inStaticBlock() {\n return (this.currentThisScopeFlags() & SCOPE_STATIC_BLOCK) > 0;\n }\n get inNonArrowFunction() {\n return (this.currentThisScopeFlags() & SCOPE_FUNCTION) > 0;\n }\n get treatFunctionsAsVar() {\n return this.treatFunctionsAsVarInScope(this.currentScope());\n }\n\n createScope(flags: ScopeFlags): Scope {\n return new Scope(flags);\n }\n // This method will be overwritten by subclasses\n /*:: +createScope: (flags: ScopeFlags) => IScope; */\n\n enter(flags: ScopeFlags) {\n this.scopeStack.push(this.createScope(flags));\n }\n\n exit() {\n this.scopeStack.pop();\n }\n\n // The spec says:\n // > At the top level of a function, or script, function declarations are\n // > treated like var declarations rather than like lexical declarations.\n treatFunctionsAsVarInScope(scope: IScope): boolean {\n return !!(\n scope.flags & SCOPE_FUNCTION ||\n (!this.inModule && scope.flags & SCOPE_PROGRAM)\n );\n }\n\n declareName(name: string, bindingType: BindingTypes, pos: number) {\n let scope = this.currentScope();\n if (bindingType & BIND_SCOPE_LEXICAL || bindingType & BIND_SCOPE_FUNCTION) {\n this.checkRedeclarationInScope(scope, name, bindingType, pos);\n\n if (bindingType & BIND_SCOPE_FUNCTION) {\n scope.functions.add(name);\n } else {\n scope.lexical.add(name);\n }\n\n if (bindingType & BIND_SCOPE_LEXICAL) {\n this.maybeExportDefined(scope, name);\n }\n } else if (bindingType & BIND_SCOPE_VAR) {\n for (let i = this.scopeStack.length - 1; i >= 0; --i) {\n scope = this.scopeStack[i];\n this.checkRedeclarationInScope(scope, name, bindingType, pos);\n scope.var.add(name);\n this.maybeExportDefined(scope, name);\n\n if (scope.flags & SCOPE_VAR) break;\n }\n }\n if (this.inModule && scope.flags & SCOPE_PROGRAM) {\n this.undefinedExports.delete(name);\n }\n }\n\n maybeExportDefined(scope: IScope, name: string) {\n if (this.inModule && scope.flags & SCOPE_PROGRAM) {\n this.undefinedExports.delete(name);\n }\n }\n\n checkRedeclarationInScope(\n scope: IScope,\n name: string,\n bindingType: BindingTypes,\n pos: number,\n ) {\n if (this.isRedeclaredInScope(scope, name, bindingType)) {\n this.raise(pos, Errors.VarRedeclaration, name);\n }\n }\n\n isRedeclaredInScope(\n scope: IScope,\n name: string,\n bindingType: BindingTypes,\n ): boolean {\n if (!(bindingType & BIND_KIND_VALUE)) return false;\n\n if (bindingType & BIND_SCOPE_LEXICAL) {\n return (\n scope.lexical.has(name) ||\n scope.functions.has(name) ||\n scope.var.has(name)\n );\n }\n\n if (bindingType & BIND_SCOPE_FUNCTION) {\n return (\n scope.lexical.has(name) ||\n (!this.treatFunctionsAsVarInScope(scope) && scope.var.has(name))\n );\n }\n\n return (\n (scope.lexical.has(name) &&\n !(\n scope.flags & SCOPE_SIMPLE_CATCH &&\n scope.lexical.values().next().value === name\n )) ||\n (!this.treatFunctionsAsVarInScope(scope) && scope.functions.has(name))\n );\n }\n\n checkLocalExport(id: N.Identifier) {\n const { name } = id;\n const topLevelScope = this.scopeStack[0];\n if (\n !topLevelScope.lexical.has(name) &&\n !topLevelScope.var.has(name) &&\n // In strict mode, scope.functions will always be empty.\n // Modules are strict by default, but the `scriptMode` option\n // can overwrite this behavior.\n !topLevelScope.functions.has(name)\n ) {\n this.undefinedExports.set(name, id.start);\n }\n }\n\n currentScope(): IScope {\n return this.scopeStack[this.scopeStack.length - 1];\n }\n\n // $FlowIgnore\n currentVarScopeFlags(): ScopeFlags {\n for (let i = this.scopeStack.length - 1; ; i--) {\n const { flags } = this.scopeStack[i];\n if (flags & SCOPE_VAR) {\n return flags;\n }\n }\n }\n\n // Could be useful for `arguments`, `this`, `new.target`, `super()`, `super.property`, and `super[property]`.\n // $FlowIgnore\n currentThisScopeFlags(): ScopeFlags {\n for (let i = this.scopeStack.length - 1; ; i--) {\n const { flags } = this.scopeStack[i];\n if (flags & (SCOPE_VAR | SCOPE_CLASS) && !(flags & SCOPE_ARROW)) {\n return flags;\n }\n }\n }\n}\n","// @flow\n\nimport ScopeHandler, { Scope } from \"../../util/scope\";\nimport {\n BIND_FLAGS_FLOW_DECLARE_FN,\n type ScopeFlags,\n type BindingTypes,\n} from \"../../util/scopeflags\";\nimport * as N from \"../../types\";\n\n// Reference implementation: https://github.com/facebook/flow/blob/23aeb2a2ef6eb4241ce178fde5d8f17c5f747fb5/src/typing/env.ml#L536-L584\nclass FlowScope extends Scope {\n // declare function foo(): type;\n declareFunctions: Set<string> = new Set();\n}\n\nexport default class FlowScopeHandler extends ScopeHandler<FlowScope> {\n createScope(flags: ScopeFlags): FlowScope {\n return new FlowScope(flags);\n }\n\n declareName(name: string, bindingType: BindingTypes, pos: number) {\n const scope = this.currentScope();\n if (bindingType & BIND_FLAGS_FLOW_DECLARE_FN) {\n this.checkRedeclarationInScope(scope, name, bindingType, pos);\n this.maybeExportDefined(scope, name);\n scope.declareFunctions.add(name);\n return;\n }\n\n super.declareName(...arguments);\n }\n\n isRedeclaredInScope(\n scope: FlowScope,\n name: string,\n bindingType: BindingTypes,\n ): boolean {\n if (super.isRedeclaredInScope(...arguments)) return true;\n\n if (bindingType & BIND_FLAGS_FLOW_DECLARE_FN) {\n return (\n !scope.declareFunctions.has(name) &&\n (scope.lexical.has(name) || scope.functions.has(name))\n );\n }\n\n return false;\n }\n\n checkLocalExport(id: N.Identifier) {\n if (!this.scopeStack[0].declareFunctions.has(id.name)) {\n super.checkLocalExport(id);\n }\n }\n}\n","// @flow\n\n/*:: declare var invariant; */\n\n// Error messages are colocated with the plugin.\n/* eslint-disable @babel/development-internal/dry-error-messages */\n\nimport type Parser from \"../../parser\";\nimport { types as tt, type TokenType } from \"../../tokenizer/types\";\nimport * as N from \"../../types\";\nimport type { Pos, Position } from \"../../util/location\";\nimport { types as tc } from \"../../tokenizer/context\";\nimport * as charCodes from \"charcodes\";\nimport { isIteratorStart, isKeyword } from \"../../util/identifier\";\nimport FlowScopeHandler from \"./scope\";\nimport {\n type BindingTypes,\n BIND_LEXICAL,\n BIND_VAR,\n BIND_FUNCTION,\n BIND_FLOW_DECLARE_FN,\n SCOPE_ARROW,\n SCOPE_FUNCTION,\n SCOPE_OTHER,\n} from \"../../util/scopeflags\";\nimport type { ExpressionErrors } from \"../../parser/util\";\nimport { Errors, makeErrorTemplates, ErrorCodes } from \"../../parser/error\";\n\nconst reservedTypes = new Set([\n \"_\",\n \"any\",\n \"bool\",\n \"boolean\",\n \"empty\",\n \"extends\",\n \"false\",\n \"interface\",\n \"mixed\",\n \"null\",\n \"number\",\n \"static\",\n \"string\",\n \"true\",\n \"typeof\",\n \"void\",\n]);\n\n/* eslint sort-keys: \"error\" */\n// The Errors key follows https://github.com/facebook/flow/blob/master/src/parser/parse_error.ml unless it does not exist\nconst FlowErrors = makeErrorTemplates(\n {\n AmbiguousConditionalArrow:\n \"Ambiguous expression: wrap the arrow functions in parentheses to disambiguate.\",\n AmbiguousDeclareModuleKind:\n \"Found both `declare module.exports` and `declare export` in the same module. Modules can only have 1 since they are either an ES module or they are a CommonJS module.\",\n AssignReservedType: \"Cannot overwrite reserved type %0.\",\n DeclareClassElement:\n \"The `declare` modifier can only appear on class fields.\",\n DeclareClassFieldInitializer:\n \"Initializers are not allowed in fields with the `declare` modifier.\",\n DuplicateDeclareModuleExports:\n \"Duplicate `declare module.exports` statement.\",\n EnumBooleanMemberNotInitialized:\n \"Boolean enum members need to be initialized. Use either `%0 = true,` or `%0 = false,` in enum `%1`.\",\n EnumDuplicateMemberName:\n \"Enum member names need to be unique, but the name `%0` has already been used before in enum `%1`.\",\n EnumInconsistentMemberValues:\n \"Enum `%0` has inconsistent member initializers. Either use no initializers, or consistently use literals (either booleans, numbers, or strings) for all member initializers.\",\n EnumInvalidExplicitType:\n \"Enum type `%1` is not valid. Use one of `boolean`, `number`, `string`, or `symbol` in enum `%0`.\",\n EnumInvalidExplicitTypeUnknownSupplied:\n \"Supplied enum type is not valid. Use one of `boolean`, `number`, `string`, or `symbol` in enum `%0`.\",\n EnumInvalidMemberInitializerPrimaryType:\n \"Enum `%0` has type `%2`, so the initializer of `%1` needs to be a %2 literal.\",\n EnumInvalidMemberInitializerSymbolType:\n \"Symbol enum members cannot be initialized. Use `%1,` in enum `%0`.\",\n EnumInvalidMemberInitializerUnknownType:\n \"The enum member initializer for `%1` needs to be a literal (either a boolean, number, or string) in enum `%0`.\",\n EnumInvalidMemberName:\n \"Enum member names cannot start with lowercase 'a' through 'z'. Instead of using `%0`, consider using `%1`, in enum `%2`.\",\n EnumNumberMemberNotInitialized:\n \"Number enum members need to be initialized, e.g. `%1 = 1` in enum `%0`.\",\n EnumStringMemberInconsistentlyInitailized:\n \"String enum members need to consistently either all use initializers, or use no initializers, in enum `%0`.\",\n GetterMayNotHaveThisParam: \"A getter cannot have a `this` parameter.\",\n ImportTypeShorthandOnlyInPureImport:\n \"The `type` and `typeof` keywords on named imports can only be used on regular `import` statements. It cannot be used with `import type` or `import typeof` statements.\",\n InexactInsideExact:\n \"Explicit inexact syntax cannot appear inside an explicit exact object type.\",\n InexactInsideNonObject:\n \"Explicit inexact syntax cannot appear in class or interface definitions.\",\n InexactVariance: \"Explicit inexact syntax cannot have variance.\",\n InvalidNonTypeImportInDeclareModule:\n \"Imports within a `declare module` body must always be `import type` or `import typeof`.\",\n MissingTypeParamDefault:\n \"Type parameter declaration needs a default, since a preceding type parameter declaration has a default.\",\n NestedDeclareModule:\n \"`declare module` cannot be used inside another `declare module`.\",\n NestedFlowComment:\n \"Cannot have a flow comment inside another flow comment.\",\n OptionalBindingPattern:\n \"A binding pattern parameter cannot be optional in an implementation signature.\",\n SetterMayNotHaveThisParam: \"A setter cannot have a `this` parameter.\",\n SpreadVariance: \"Spread properties cannot have variance.\",\n ThisParamAnnotationRequired:\n \"A type annotation is required for the `this` parameter.\",\n ThisParamBannedInConstructor:\n \"Constructors cannot have a `this` parameter; constructors don't bind `this` like other functions.\",\n ThisParamMayNotBeOptional: \"The `this` parameter cannot be optional.\",\n ThisParamMustBeFirst:\n \"The `this` parameter must be the first function parameter.\",\n ThisParamNoDefault: \"The `this` parameter may not have a default value.\",\n TypeBeforeInitializer:\n \"Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.\",\n TypeCastInPattern:\n \"The type cast expression is expected to be wrapped with parenthesis.\",\n UnexpectedExplicitInexactInObject:\n \"Explicit inexact syntax must appear at the end of an inexact object.\",\n UnexpectedReservedType: \"Unexpected reserved type %0.\",\n UnexpectedReservedUnderscore:\n \"`_` is only allowed as a type argument to call or new.\",\n UnexpectedSpaceBetweenModuloChecks:\n \"Spaces between `%` and `checks` are not allowed here.\",\n UnexpectedSpreadType:\n \"Spread operator cannot appear in class or interface definitions.\",\n UnexpectedSubtractionOperand:\n 'Unexpected token, expected \"number\" or \"bigint\".',\n UnexpectedTokenAfterTypeParameter:\n \"Expected an arrow function after this type parameter declaration.\",\n UnexpectedTypeParameterBeforeAsyncArrowFunction:\n \"Type parameters must come after the async keyword, e.g. instead of `<T> async () => {}`, use `async <T>() => {}`.\",\n UnsupportedDeclareExportKind:\n \"`declare export %0` is not supported. Use `%1` instead.\",\n UnsupportedStatementInDeclareModule:\n \"Only declares and type imports are allowed inside declare module.\",\n UnterminatedFlowComment: \"Unterminated flow-comment.\",\n },\n /* code */ ErrorCodes.SyntaxError,\n);\n/* eslint-disable sort-keys */\n\nfunction isEsModuleType(bodyElement: N.Node): boolean {\n return (\n bodyElement.type === \"DeclareExportAllDeclaration\" ||\n (bodyElement.type === \"DeclareExportDeclaration\" &&\n (!bodyElement.declaration ||\n (bodyElement.declaration.type !== \"TypeAlias\" &&\n bodyElement.declaration.type !== \"InterfaceDeclaration\")))\n );\n}\n\nfunction hasTypeImportKind(node: N.Node): boolean {\n return node.importKind === \"type\" || node.importKind === \"typeof\";\n}\n\nfunction isMaybeDefaultImport(state: { type: TokenType, value: any }): boolean {\n return (\n (state.type === tt.name || !!state.type.keyword) && state.value !== \"from\"\n );\n}\n\nconst exportSuggestions = {\n const: \"declare export var\",\n let: \"declare export var\",\n type: \"export type\",\n interface: \"export interface\",\n};\n\n// Like Array#filter, but returns a tuple [ acceptedElements, discardedElements ]\nfunction partition<T>(\n list: T[],\n test: (T, number, T[]) => ?boolean,\n): [T[], T[]] {\n const list1 = [];\n const list2 = [];\n for (let i = 0; i < list.length; i++) {\n (test(list[i], i, list) ? list1 : list2).push(list[i]);\n }\n return [list1, list2];\n}\n\nconst FLOW_PRAGMA_REGEX = /\\*?\\s*@((?:no)?flow)\\b/;\n\n// Flow enums types\ntype EnumExplicitType = null | \"boolean\" | \"number\" | \"string\" | \"symbol\";\ntype EnumContext = {|\n enumName: string,\n explicitType: EnumExplicitType,\n memberName: string,\n|};\ntype EnumMemberInit =\n | {| type: \"number\", pos: number, value: N.Node |}\n | {| type: \"string\", pos: number, value: N.Node |}\n | {| type: \"boolean\", pos: number, value: N.Node |}\n | {| type: \"invalid\", pos: number |}\n | {| type: \"none\", pos: number |};\n\nexport default (superClass: Class<Parser>): Class<Parser> =>\n class extends superClass {\n // The value of the @flow/@noflow pragma. Initially undefined, transitions\n // to \"@flow\" or \"@noflow\" if we see a pragma. Transitions to null if we are\n // past the initial comment.\n flowPragma: void | null | \"flow\" | \"noflow\" = undefined;\n\n getScopeHandler(): Class<FlowScopeHandler> {\n return FlowScopeHandler;\n }\n\n shouldParseTypes(): boolean {\n return this.getPluginOption(\"flow\", \"all\") || this.flowPragma === \"flow\";\n }\n\n shouldParseEnums(): boolean {\n return !!this.getPluginOption(\"flow\", \"enums\");\n }\n\n finishToken(type: TokenType, val: any): void {\n if (\n type !== tt.string &&\n type !== tt.semi &&\n type !== tt.interpreterDirective\n ) {\n if (this.flowPragma === undefined) {\n this.flowPragma = null;\n }\n }\n return super.finishToken(type, val);\n }\n\n addComment(comment: N.Comment): void {\n if (this.flowPragma === undefined) {\n // Try to parse a flow pragma.\n const matches = FLOW_PRAGMA_REGEX.exec(comment.value);\n if (!matches) {\n // do nothing\n } else if (matches[1] === \"flow\") {\n this.flowPragma = \"flow\";\n } else if (matches[1] === \"noflow\") {\n this.flowPragma = \"noflow\";\n } else {\n throw new Error(\"Unexpected flow pragma\");\n }\n }\n return super.addComment(comment);\n }\n\n flowParseTypeInitialiser(tok?: TokenType): N.FlowType {\n const oldInType = this.state.inType;\n this.state.inType = true;\n this.expect(tok || tt.colon);\n\n const type = this.flowParseType();\n this.state.inType = oldInType;\n return type;\n }\n\n flowParsePredicate(): N.FlowType {\n const node = this.startNode();\n const moduloPos = this.state.start;\n this.next(); // eat `%`\n this.expectContextual(\"checks\");\n // Force '%' and 'checks' to be adjacent\n if (this.state.lastTokStart > moduloPos + 1) {\n this.raise(moduloPos, FlowErrors.UnexpectedSpaceBetweenModuloChecks);\n }\n if (this.eat(tt.parenL)) {\n node.value = this.parseExpression();\n this.expect(tt.parenR);\n return this.finishNode(node, \"DeclaredPredicate\");\n } else {\n return this.finishNode(node, \"InferredPredicate\");\n }\n }\n\n flowParseTypeAndPredicateInitialiser(): [?N.FlowType, ?N.FlowPredicate] {\n const oldInType = this.state.inType;\n this.state.inType = true;\n this.expect(tt.colon);\n let type = null;\n let predicate = null;\n if (this.match(tt.modulo)) {\n this.state.inType = oldInType;\n predicate = this.flowParsePredicate();\n } else {\n type = this.flowParseType();\n this.state.inType = oldInType;\n if (this.match(tt.modulo)) {\n predicate = this.flowParsePredicate();\n }\n }\n return [type, predicate];\n }\n\n flowParseDeclareClass(node: N.FlowDeclareClass): N.FlowDeclareClass {\n this.next();\n this.flowParseInterfaceish(node, /*isClass*/ true);\n return this.finishNode(node, \"DeclareClass\");\n }\n\n flowParseDeclareFunction(\n node: N.FlowDeclareFunction,\n ): N.FlowDeclareFunction {\n this.next();\n\n const id = (node.id = this.parseIdentifier());\n\n const typeNode = this.startNode();\n const typeContainer = this.startNode();\n\n if (this.isRelational(\"<\")) {\n typeNode.typeParameters = this.flowParseTypeParameterDeclaration();\n } else {\n typeNode.typeParameters = null;\n }\n\n this.expect(tt.parenL);\n const tmp = this.flowParseFunctionTypeParams();\n typeNode.params = tmp.params;\n typeNode.rest = tmp.rest;\n typeNode.this = tmp._this;\n this.expect(tt.parenR);\n\n [\n // $FlowFixMe (destructuring not supported yet)\n typeNode.returnType,\n // $FlowFixMe (destructuring not supported yet)\n node.predicate,\n ] = this.flowParseTypeAndPredicateInitialiser();\n\n typeContainer.typeAnnotation = this.finishNode(\n typeNode,\n \"FunctionTypeAnnotation\",\n );\n\n id.typeAnnotation = this.finishNode(typeContainer, \"TypeAnnotation\");\n\n this.resetEndLocation(id);\n this.semicolon();\n\n this.scope.declareName(node.id.name, BIND_FLOW_DECLARE_FN, node.id.start);\n\n return this.finishNode(node, \"DeclareFunction\");\n }\n\n flowParseDeclare(\n node: N.FlowDeclare,\n insideModule?: boolean,\n ): N.FlowDeclare {\n if (this.match(tt._class)) {\n return this.flowParseDeclareClass(node);\n } else if (this.match(tt._function)) {\n return this.flowParseDeclareFunction(node);\n } else if (this.match(tt._var)) {\n return this.flowParseDeclareVariable(node);\n } else if (this.eatContextual(\"module\")) {\n if (this.match(tt.dot)) {\n return this.flowParseDeclareModuleExports(node);\n } else {\n if (insideModule) {\n this.raise(this.state.lastTokStart, FlowErrors.NestedDeclareModule);\n }\n return this.flowParseDeclareModule(node);\n }\n } else if (this.isContextual(\"type\")) {\n return this.flowParseDeclareTypeAlias(node);\n } else if (this.isContextual(\"opaque\")) {\n return this.flowParseDeclareOpaqueType(node);\n } else if (this.isContextual(\"interface\")) {\n return this.flowParseDeclareInterface(node);\n } else if (this.match(tt._export)) {\n return this.flowParseDeclareExportDeclaration(node, insideModule);\n } else {\n throw this.unexpected();\n }\n }\n\n flowParseDeclareVariable(\n node: N.FlowDeclareVariable,\n ): N.FlowDeclareVariable {\n this.next();\n node.id = this.flowParseTypeAnnotatableIdentifier(\n /*allowPrimitiveOverride*/ true,\n );\n this.scope.declareName(node.id.name, BIND_VAR, node.id.start);\n this.semicolon();\n return this.finishNode(node, \"DeclareVariable\");\n }\n\n flowParseDeclareModule(node: N.FlowDeclareModule): N.FlowDeclareModule {\n this.scope.enter(SCOPE_OTHER);\n\n if (this.match(tt.string)) {\n node.id = this.parseExprAtom();\n } else {\n node.id = this.parseIdentifier();\n }\n\n const bodyNode = (node.body = this.startNode());\n const body = (bodyNode.body = []);\n this.expect(tt.braceL);\n while (!this.match(tt.braceR)) {\n let bodyNode = this.startNode();\n\n if (this.match(tt._import)) {\n this.next();\n if (!this.isContextual(\"type\") && !this.match(tt._typeof)) {\n this.raise(\n this.state.lastTokStart,\n FlowErrors.InvalidNonTypeImportInDeclareModule,\n );\n }\n this.parseImport(bodyNode);\n } else {\n this.expectContextual(\n \"declare\",\n FlowErrors.UnsupportedStatementInDeclareModule,\n );\n\n bodyNode = this.flowParseDeclare(bodyNode, true);\n }\n\n body.push(bodyNode);\n }\n\n this.scope.exit();\n\n this.expect(tt.braceR);\n\n this.finishNode(bodyNode, \"BlockStatement\");\n\n let kind = null;\n let hasModuleExport = false;\n body.forEach(bodyElement => {\n if (isEsModuleType(bodyElement)) {\n if (kind === \"CommonJS\") {\n this.raise(\n bodyElement.start,\n FlowErrors.AmbiguousDeclareModuleKind,\n );\n }\n kind = \"ES\";\n } else if (bodyElement.type === \"DeclareModuleExports\") {\n if (hasModuleExport) {\n this.raise(\n bodyElement.start,\n FlowErrors.DuplicateDeclareModuleExports,\n );\n }\n if (kind === \"ES\") {\n this.raise(\n bodyElement.start,\n FlowErrors.AmbiguousDeclareModuleKind,\n );\n }\n kind = \"CommonJS\";\n hasModuleExport = true;\n }\n });\n\n node.kind = kind || \"CommonJS\";\n return this.finishNode(node, \"DeclareModule\");\n }\n\n flowParseDeclareExportDeclaration(\n node: N.FlowDeclareExportDeclaration,\n insideModule: ?boolean,\n ): N.FlowDeclareExportDeclaration {\n this.expect(tt._export);\n\n if (this.eat(tt._default)) {\n if (this.match(tt._function) || this.match(tt._class)) {\n // declare export default class ...\n // declare export default function ...\n node.declaration = this.flowParseDeclare(this.startNode());\n } else {\n // declare export default [type];\n node.declaration = this.flowParseType();\n this.semicolon();\n }\n node.default = true;\n\n return this.finishNode(node, \"DeclareExportDeclaration\");\n } else {\n if (\n this.match(tt._const) ||\n this.isLet() ||\n ((this.isContextual(\"type\") || this.isContextual(\"interface\")) &&\n !insideModule)\n ) {\n const label = this.state.value;\n const suggestion = exportSuggestions[label];\n\n throw this.raise(\n this.state.start,\n FlowErrors.UnsupportedDeclareExportKind,\n label,\n suggestion,\n );\n }\n\n if (\n this.match(tt._var) || // declare export var ...\n this.match(tt._function) || // declare export function ...\n this.match(tt._class) || // declare export class ...\n this.isContextual(\"opaque\") // declare export opaque ..\n ) {\n node.declaration = this.flowParseDeclare(this.startNode());\n node.default = false;\n\n return this.finishNode(node, \"DeclareExportDeclaration\");\n } else if (\n this.match(tt.star) || // declare export * from ''\n this.match(tt.braceL) || // declare export {} ...\n this.isContextual(\"interface\") || // declare export interface ...\n this.isContextual(\"type\") || // declare export type ...\n this.isContextual(\"opaque\") // declare export opaque type ...\n ) {\n node = this.parseExport(node);\n if (node.type === \"ExportNamedDeclaration\") {\n // flow does not support the ExportNamedDeclaration\n // $FlowIgnore\n node.type = \"ExportDeclaration\";\n // $FlowFixMe\n node.default = false;\n delete node.exportKind;\n }\n\n // $FlowIgnore\n node.type = \"Declare\" + node.type;\n\n return node;\n }\n }\n\n throw this.unexpected();\n }\n\n flowParseDeclareModuleExports(\n node: N.FlowDeclareModuleExports,\n ): N.FlowDeclareModuleExports {\n this.next();\n this.expectContextual(\"exports\");\n node.typeAnnotation = this.flowParseTypeAnnotation();\n this.semicolon();\n\n return this.finishNode(node, \"DeclareModuleExports\");\n }\n\n flowParseDeclareTypeAlias(\n node: N.FlowDeclareTypeAlias,\n ): N.FlowDeclareTypeAlias {\n this.next();\n this.flowParseTypeAlias(node);\n // Don't do finishNode as we don't want to process comments twice\n node.type = \"DeclareTypeAlias\";\n return node;\n }\n\n flowParseDeclareOpaqueType(\n node: N.FlowDeclareOpaqueType,\n ): N.FlowDeclareOpaqueType {\n this.next();\n this.flowParseOpaqueType(node, true);\n // Don't do finishNode as we don't want to process comments twice\n node.type = \"DeclareOpaqueType\";\n return node;\n }\n\n flowParseDeclareInterface(\n node: N.FlowDeclareInterface,\n ): N.FlowDeclareInterface {\n this.next();\n this.flowParseInterfaceish(node);\n return this.finishNode(node, \"DeclareInterface\");\n }\n\n // Interfaces\n\n flowParseInterfaceish(\n node: N.FlowDeclare,\n isClass?: boolean = false,\n ): void {\n node.id = this.flowParseRestrictedIdentifier(\n /* liberal */ !isClass,\n /* declaration */ true,\n );\n\n this.scope.declareName(\n node.id.name,\n isClass ? BIND_FUNCTION : BIND_LEXICAL,\n node.id.start,\n );\n\n if (this.isRelational(\"<\")) {\n node.typeParameters = this.flowParseTypeParameterDeclaration();\n } else {\n node.typeParameters = null;\n }\n\n node.extends = [];\n node.implements = [];\n node.mixins = [];\n\n if (this.eat(tt._extends)) {\n do {\n node.extends.push(this.flowParseInterfaceExtends());\n } while (!isClass && this.eat(tt.comma));\n }\n\n if (this.isContextual(\"mixins\")) {\n this.next();\n do {\n node.mixins.push(this.flowParseInterfaceExtends());\n } while (this.eat(tt.comma));\n }\n\n if (this.isContextual(\"implements\")) {\n this.next();\n do {\n node.implements.push(this.flowParseInterfaceExtends());\n } while (this.eat(tt.comma));\n }\n\n node.body = this.flowParseObjectType({\n allowStatic: isClass,\n allowExact: false,\n allowSpread: false,\n allowProto: isClass,\n allowInexact: false,\n });\n }\n\n flowParseInterfaceExtends(): N.FlowInterfaceExtends {\n const node = this.startNode();\n\n node.id = this.flowParseQualifiedTypeIdentifier();\n if (this.isRelational(\"<\")) {\n node.typeParameters = this.flowParseTypeParameterInstantiation();\n } else {\n node.typeParameters = null;\n }\n\n return this.finishNode(node, \"InterfaceExtends\");\n }\n\n flowParseInterface(node: N.FlowInterface): N.FlowInterface {\n this.flowParseInterfaceish(node);\n return this.finishNode(node, \"InterfaceDeclaration\");\n }\n\n checkNotUnderscore(word: string) {\n if (word === \"_\") {\n this.raise(this.state.start, FlowErrors.UnexpectedReservedUnderscore);\n }\n }\n\n checkReservedType(word: string, startLoc: number, declaration?: boolean) {\n if (!reservedTypes.has(word)) return;\n\n this.raise(\n startLoc,\n declaration\n ? FlowErrors.AssignReservedType\n : FlowErrors.UnexpectedReservedType,\n word,\n );\n }\n\n flowParseRestrictedIdentifier(\n liberal?: boolean,\n declaration?: boolean,\n ): N.Identifier {\n this.checkReservedType(this.state.value, this.state.start, declaration);\n return this.parseIdentifier(liberal);\n }\n\n // Type aliases\n\n flowParseTypeAlias(node: N.FlowTypeAlias): N.FlowTypeAlias {\n node.id = this.flowParseRestrictedIdentifier(\n /* liberal */ false,\n /* declaration */ true,\n );\n this.scope.declareName(node.id.name, BIND_LEXICAL, node.id.start);\n\n if (this.isRelational(\"<\")) {\n node.typeParameters = this.flowParseTypeParameterDeclaration();\n } else {\n node.typeParameters = null;\n }\n\n node.right = this.flowParseTypeInitialiser(tt.eq);\n this.semicolon();\n\n return this.finishNode(node, \"TypeAlias\");\n }\n\n flowParseOpaqueType(\n node: N.FlowOpaqueType,\n declare: boolean,\n ): N.FlowOpaqueType {\n this.expectContextual(\"type\");\n node.id = this.flowParseRestrictedIdentifier(\n /* liberal */ true,\n /* declaration */ true,\n );\n this.scope.declareName(node.id.name, BIND_LEXICAL, node.id.start);\n\n if (this.isRelational(\"<\")) {\n node.typeParameters = this.flowParseTypeParameterDeclaration();\n } else {\n node.typeParameters = null;\n }\n\n // Parse the supertype\n node.supertype = null;\n if (this.match(tt.colon)) {\n node.supertype = this.flowParseTypeInitialiser(tt.colon);\n }\n\n node.impltype = null;\n if (!declare) {\n node.impltype = this.flowParseTypeInitialiser(tt.eq);\n }\n this.semicolon();\n\n return this.finishNode(node, \"OpaqueType\");\n }\n\n // Type annotations\n\n flowParseTypeParameter(requireDefault?: boolean = false): N.TypeParameter {\n const nodeStart = this.state.start;\n\n const node = this.startNode();\n\n const variance = this.flowParseVariance();\n\n const ident = this.flowParseTypeAnnotatableIdentifier();\n node.name = ident.name;\n node.variance = variance;\n node.bound = ident.typeAnnotation;\n\n if (this.match(tt.eq)) {\n this.eat(tt.eq);\n node.default = this.flowParseType();\n } else {\n if (requireDefault) {\n this.raise(nodeStart, FlowErrors.MissingTypeParamDefault);\n }\n }\n\n return this.finishNode(node, \"TypeParameter\");\n }\n\n flowParseTypeParameterDeclaration(): N.TypeParameterDeclaration {\n const oldInType = this.state.inType;\n const node = this.startNode();\n node.params = [];\n\n this.state.inType = true;\n\n // istanbul ignore else: this condition is already checked at all call sites\n if (this.isRelational(\"<\") || this.match(tt.jsxTagStart)) {\n this.next();\n } else {\n this.unexpected();\n }\n\n let defaultRequired = false;\n\n do {\n const typeParameter = this.flowParseTypeParameter(defaultRequired);\n\n node.params.push(typeParameter);\n\n if (typeParameter.default) {\n defaultRequired = true;\n }\n\n if (!this.isRelational(\">\")) {\n this.expect(tt.comma);\n }\n } while (!this.isRelational(\">\"));\n this.expectRelational(\">\");\n\n this.state.inType = oldInType;\n\n return this.finishNode(node, \"TypeParameterDeclaration\");\n }\n\n flowParseTypeParameterInstantiation(): N.TypeParameterInstantiation {\n const node = this.startNode();\n const oldInType = this.state.inType;\n node.params = [];\n\n this.state.inType = true;\n\n this.expectRelational(\"<\");\n const oldNoAnonFunctionType = this.state.noAnonFunctionType;\n this.state.noAnonFunctionType = false;\n while (!this.isRelational(\">\")) {\n node.params.push(this.flowParseType());\n if (!this.isRelational(\">\")) {\n this.expect(tt.comma);\n }\n }\n this.state.noAnonFunctionType = oldNoAnonFunctionType;\n this.expectRelational(\">\");\n\n this.state.inType = oldInType;\n\n return this.finishNode(node, \"TypeParameterInstantiation\");\n }\n\n flowParseTypeParameterInstantiationCallOrNew(): N.TypeParameterInstantiation {\n const node = this.startNode();\n const oldInType = this.state.inType;\n node.params = [];\n\n this.state.inType = true;\n\n this.expectRelational(\"<\");\n while (!this.isRelational(\">\")) {\n node.params.push(this.flowParseTypeOrImplicitInstantiation());\n if (!this.isRelational(\">\")) {\n this.expect(tt.comma);\n }\n }\n this.expectRelational(\">\");\n\n this.state.inType = oldInType;\n\n return this.finishNode(node, \"TypeParameterInstantiation\");\n }\n\n flowParseInterfaceType(): N.FlowInterfaceType {\n const node = this.startNode();\n this.expectContextual(\"interface\");\n\n node.extends = [];\n if (this.eat(tt._extends)) {\n do {\n node.extends.push(this.flowParseInterfaceExtends());\n } while (this.eat(tt.comma));\n }\n\n node.body = this.flowParseObjectType({\n allowStatic: false,\n allowExact: false,\n allowSpread: false,\n allowProto: false,\n allowInexact: false,\n });\n\n return this.finishNode(node, \"InterfaceTypeAnnotation\");\n }\n\n flowParseObjectPropertyKey(): N.Expression {\n return this.match(tt.num) || this.match(tt.string)\n ? this.parseExprAtom()\n : this.parseIdentifier(true);\n }\n\n flowParseObjectTypeIndexer(\n node: N.FlowObjectTypeIndexer,\n isStatic: boolean,\n variance: ?N.FlowVariance,\n ): N.FlowObjectTypeIndexer {\n node.static = isStatic;\n\n // Note: bracketL has already been consumed\n if (this.lookahead().type === tt.colon) {\n node.id = this.flowParseObjectPropertyKey();\n node.key = this.flowParseTypeInitialiser();\n } else {\n node.id = null;\n node.key = this.flowParseType();\n }\n this.expect(tt.bracketR);\n node.value = this.flowParseTypeInitialiser();\n node.variance = variance;\n\n return this.finishNode(node, \"ObjectTypeIndexer\");\n }\n\n flowParseObjectTypeInternalSlot(\n node: N.FlowObjectTypeInternalSlot,\n isStatic: boolean,\n ): N.FlowObjectTypeInternalSlot {\n node.static = isStatic;\n // Note: both bracketL have already been consumed\n node.id = this.flowParseObjectPropertyKey();\n this.expect(tt.bracketR);\n this.expect(tt.bracketR);\n if (this.isRelational(\"<\") || this.match(tt.parenL)) {\n node.method = true;\n node.optional = false;\n node.value = this.flowParseObjectTypeMethodish(\n this.startNodeAt(node.start, node.loc.start),\n );\n } else {\n node.method = false;\n if (this.eat(tt.question)) {\n node.optional = true;\n }\n node.value = this.flowParseTypeInitialiser();\n }\n return this.finishNode(node, \"ObjectTypeInternalSlot\");\n }\n\n flowParseObjectTypeMethodish(\n node: N.FlowFunctionTypeAnnotation,\n ): N.FlowFunctionTypeAnnotation {\n node.params = [];\n node.rest = null;\n node.typeParameters = null;\n node.this = null;\n\n if (this.isRelational(\"<\")) {\n node.typeParameters = this.flowParseTypeParameterDeclaration();\n }\n\n this.expect(tt.parenL);\n if (this.match(tt._this)) {\n node.this = this.flowParseFunctionTypeParam(/* first */ true);\n // match Flow parser behavior\n node.this.name = null;\n if (!this.match(tt.parenR)) {\n this.expect(tt.comma);\n }\n }\n while (!this.match(tt.parenR) && !this.match(tt.ellipsis)) {\n node.params.push(this.flowParseFunctionTypeParam(false));\n if (!this.match(tt.parenR)) {\n this.expect(tt.comma);\n }\n }\n\n if (this.eat(tt.ellipsis)) {\n node.rest = this.flowParseFunctionTypeParam(false);\n }\n this.expect(tt.parenR);\n node.returnType = this.flowParseTypeInitialiser();\n\n return this.finishNode(node, \"FunctionTypeAnnotation\");\n }\n\n flowParseObjectTypeCallProperty(\n node: N.FlowObjectTypeCallProperty,\n isStatic: boolean,\n ): N.FlowObjectTypeCallProperty {\n const valueNode = this.startNode();\n node.static = isStatic;\n node.value = this.flowParseObjectTypeMethodish(valueNode);\n return this.finishNode(node, \"ObjectTypeCallProperty\");\n }\n\n flowParseObjectType({\n allowStatic,\n allowExact,\n allowSpread,\n allowProto,\n allowInexact,\n }: {\n allowStatic: boolean,\n allowExact: boolean,\n allowSpread: boolean,\n allowProto: boolean,\n allowInexact: boolean,\n }): N.FlowObjectTypeAnnotation {\n const oldInType = this.state.inType;\n this.state.inType = true;\n\n const nodeStart = this.startNode();\n\n nodeStart.callProperties = [];\n nodeStart.properties = [];\n nodeStart.indexers = [];\n nodeStart.internalSlots = [];\n\n let endDelim;\n let exact;\n let inexact = false;\n if (allowExact && this.match(tt.braceBarL)) {\n this.expect(tt.braceBarL);\n endDelim = tt.braceBarR;\n exact = true;\n } else {\n this.expect(tt.braceL);\n endDelim = tt.braceR;\n exact = false;\n }\n\n nodeStart.exact = exact;\n\n while (!this.match(endDelim)) {\n let isStatic = false;\n let protoStart: ?number = null;\n let inexactStart: ?number = null;\n const node = this.startNode();\n\n if (allowProto && this.isContextual(\"proto\")) {\n const lookahead = this.lookahead();\n\n if (lookahead.type !== tt.colon && lookahead.type !== tt.question) {\n this.next();\n protoStart = this.state.start;\n allowStatic = false;\n }\n }\n\n if (allowStatic && this.isContextual(\"static\")) {\n const lookahead = this.lookahead();\n\n // static is a valid identifier name\n if (lookahead.type !== tt.colon && lookahead.type !== tt.question) {\n this.next();\n isStatic = true;\n }\n }\n\n const variance = this.flowParseVariance();\n\n if (this.eat(tt.bracketL)) {\n if (protoStart != null) {\n this.unexpected(protoStart);\n }\n if (this.eat(tt.bracketL)) {\n if (variance) {\n this.unexpected(variance.start);\n }\n nodeStart.internalSlots.push(\n this.flowParseObjectTypeInternalSlot(node, isStatic),\n );\n } else {\n nodeStart.indexers.push(\n this.flowParseObjectTypeIndexer(node, isStatic, variance),\n );\n }\n } else if (this.match(tt.parenL) || this.isRelational(\"<\")) {\n if (protoStart != null) {\n this.unexpected(protoStart);\n }\n if (variance) {\n this.unexpected(variance.start);\n }\n nodeStart.callProperties.push(\n this.flowParseObjectTypeCallProperty(node, isStatic),\n );\n } else {\n let kind = \"init\";\n\n if (this.isContextual(\"get\") || this.isContextual(\"set\")) {\n const lookahead = this.lookahead();\n if (\n lookahead.type === tt.name ||\n lookahead.type === tt.string ||\n lookahead.type === tt.num\n ) {\n kind = this.state.value;\n this.next();\n }\n }\n\n const propOrInexact = this.flowParseObjectTypeProperty(\n node,\n isStatic,\n protoStart,\n variance,\n kind,\n allowSpread,\n allowInexact ?? !exact,\n );\n\n if (propOrInexact === null) {\n inexact = true;\n inexactStart = this.state.lastTokStart;\n } else {\n nodeStart.properties.push(propOrInexact);\n }\n }\n\n this.flowObjectTypeSemicolon();\n\n if (\n inexactStart &&\n !this.match(tt.braceR) &&\n !this.match(tt.braceBarR)\n ) {\n this.raise(\n inexactStart,\n FlowErrors.UnexpectedExplicitInexactInObject,\n );\n }\n }\n\n this.expect(endDelim);\n\n /* The inexact flag should only be added on ObjectTypeAnnotations that\n * are not the body of an interface, declare interface, or declare class.\n * Since spreads are only allowed in object types, checking that is\n * sufficient here.\n */\n if (allowSpread) {\n nodeStart.inexact = inexact;\n }\n\n const out = this.finishNode(nodeStart, \"ObjectTypeAnnotation\");\n\n this.state.inType = oldInType;\n\n return out;\n }\n\n flowParseObjectTypeProperty(\n node: N.FlowObjectTypeProperty | N.FlowObjectTypeSpreadProperty,\n isStatic: boolean,\n protoStart: ?number,\n variance: ?N.FlowVariance,\n kind: string,\n allowSpread: boolean,\n allowInexact: boolean,\n ): (N.FlowObjectTypeProperty | N.FlowObjectTypeSpreadProperty) | null {\n if (this.eat(tt.ellipsis)) {\n const isInexactToken =\n this.match(tt.comma) ||\n this.match(tt.semi) ||\n this.match(tt.braceR) ||\n this.match(tt.braceBarR);\n\n if (isInexactToken) {\n if (!allowSpread) {\n this.raise(\n this.state.lastTokStart,\n FlowErrors.InexactInsideNonObject,\n );\n } else if (!allowInexact) {\n this.raise(this.state.lastTokStart, FlowErrors.InexactInsideExact);\n }\n if (variance) {\n this.raise(variance.start, FlowErrors.InexactVariance);\n }\n\n return null;\n }\n\n if (!allowSpread) {\n this.raise(this.state.lastTokStart, FlowErrors.UnexpectedSpreadType);\n }\n if (protoStart != null) {\n this.unexpected(protoStart);\n }\n if (variance) {\n this.raise(variance.start, FlowErrors.SpreadVariance);\n }\n\n node.argument = this.flowParseType();\n return this.finishNode(node, \"ObjectTypeSpreadProperty\");\n } else {\n node.key = this.flowParseObjectPropertyKey();\n node.static = isStatic;\n node.proto = protoStart != null;\n node.kind = kind;\n\n let optional = false;\n if (this.isRelational(\"<\") || this.match(tt.parenL)) {\n // This is a method property\n node.method = true;\n\n if (protoStart != null) {\n this.unexpected(protoStart);\n }\n if (variance) {\n this.unexpected(variance.start);\n }\n\n node.value = this.flowParseObjectTypeMethodish(\n this.startNodeAt(node.start, node.loc.start),\n );\n if (kind === \"get\" || kind === \"set\") {\n this.flowCheckGetterSetterParams(node);\n }\n /** Declared classes/interfaces do not allow spread */\n if (\n !allowSpread &&\n node.key.name === \"constructor\" &&\n node.value.this\n ) {\n this.raise(\n node.value.this.start,\n FlowErrors.ThisParamBannedInConstructor,\n );\n }\n } else {\n if (kind !== \"init\") this.unexpected();\n\n node.method = false;\n\n if (this.eat(tt.question)) {\n optional = true;\n }\n node.value = this.flowParseTypeInitialiser();\n node.variance = variance;\n }\n\n node.optional = optional;\n\n return this.finishNode(node, \"ObjectTypeProperty\");\n }\n }\n\n // This is similar to checkGetterSetterParams, but as\n // @babel/parser uses non estree properties we cannot reuse it here\n flowCheckGetterSetterParams(\n property: N.FlowObjectTypeProperty | N.FlowObjectTypeSpreadProperty,\n ): void {\n const paramCount = property.kind === \"get\" ? 0 : 1;\n const start = property.start;\n const length =\n property.value.params.length + (property.value.rest ? 1 : 0);\n\n if (property.value.this) {\n this.raise(\n property.value.this.start,\n property.kind === \"get\"\n ? FlowErrors.GetterMayNotHaveThisParam\n : FlowErrors.SetterMayNotHaveThisParam,\n );\n }\n\n if (length !== paramCount) {\n if (property.kind === \"get\") {\n this.raise(start, Errors.BadGetterArity);\n } else {\n this.raise(start, Errors.BadSetterArity);\n }\n }\n\n if (property.kind === \"set\" && property.value.rest) {\n this.raise(start, Errors.BadSetterRestParameter);\n }\n }\n\n flowObjectTypeSemicolon(): void {\n if (\n !this.eat(tt.semi) &&\n !this.eat(tt.comma) &&\n !this.match(tt.braceR) &&\n !this.match(tt.braceBarR)\n ) {\n this.unexpected();\n }\n }\n\n flowParseQualifiedTypeIdentifier(\n startPos?: number,\n startLoc?: Position,\n id?: N.Identifier,\n ): N.FlowQualifiedTypeIdentifier {\n startPos = startPos || this.state.start;\n startLoc = startLoc || this.state.startLoc;\n let node = id || this.flowParseRestrictedIdentifier(true);\n\n while (this.eat(tt.dot)) {\n const node2 = this.startNodeAt(startPos, startLoc);\n node2.qualification = node;\n node2.id = this.flowParseRestrictedIdentifier(true);\n node = this.finishNode(node2, \"QualifiedTypeIdentifier\");\n }\n\n return node;\n }\n\n flowParseGenericType(\n startPos: number,\n startLoc: Position,\n id: N.Identifier,\n ): N.FlowGenericTypeAnnotation {\n const node = this.startNodeAt(startPos, startLoc);\n\n node.typeParameters = null;\n node.id = this.flowParseQualifiedTypeIdentifier(startPos, startLoc, id);\n\n if (this.isRelational(\"<\")) {\n node.typeParameters = this.flowParseTypeParameterInstantiation();\n }\n\n return this.finishNode(node, \"GenericTypeAnnotation\");\n }\n\n flowParseTypeofType(): N.FlowTypeofTypeAnnotation {\n const node = this.startNode();\n this.expect(tt._typeof);\n node.argument = this.flowParsePrimaryType();\n return this.finishNode(node, \"TypeofTypeAnnotation\");\n }\n\n flowParseTupleType(): N.FlowTupleTypeAnnotation {\n const node = this.startNode();\n node.types = [];\n this.expect(tt.bracketL);\n // We allow trailing commas\n while (this.state.pos < this.length && !this.match(tt.bracketR)) {\n node.types.push(this.flowParseType());\n if (this.match(tt.bracketR)) break;\n this.expect(tt.comma);\n }\n this.expect(tt.bracketR);\n return this.finishNode(node, \"TupleTypeAnnotation\");\n }\n\n flowParseFunctionTypeParam(first: boolean): N.FlowFunctionTypeParam {\n let name = null;\n let optional = false;\n let typeAnnotation = null;\n const node = this.startNode();\n const lh = this.lookahead();\n const isThis = this.state.type === tt._this;\n\n if (lh.type === tt.colon || lh.type === tt.question) {\n if (isThis && !first) {\n this.raise(node.start, FlowErrors.ThisParamMustBeFirst);\n }\n name = this.parseIdentifier(isThis);\n if (this.eat(tt.question)) {\n optional = true;\n if (isThis) {\n this.raise(node.start, FlowErrors.ThisParamMayNotBeOptional);\n }\n }\n typeAnnotation = this.flowParseTypeInitialiser();\n } else {\n typeAnnotation = this.flowParseType();\n }\n node.name = name;\n node.optional = optional;\n node.typeAnnotation = typeAnnotation;\n return this.finishNode(node, \"FunctionTypeParam\");\n }\n\n reinterpretTypeAsFunctionTypeParam(\n type: N.FlowType,\n ): N.FlowFunctionTypeParam {\n const node = this.startNodeAt(type.start, type.loc.start);\n node.name = null;\n node.optional = false;\n node.typeAnnotation = type;\n return this.finishNode(node, \"FunctionTypeParam\");\n }\n\n flowParseFunctionTypeParams(params: N.FlowFunctionTypeParam[] = []): {\n params: N.FlowFunctionTypeParam[],\n rest: ?N.FlowFunctionTypeParam,\n _this: ?N.FlowFunctionTypeParam,\n } {\n let rest: ?N.FlowFunctionTypeParam = null;\n let _this: ?N.FlowFunctionTypeParam = null;\n if (this.match(tt._this)) {\n _this = this.flowParseFunctionTypeParam(/* first */ true);\n // match Flow parser behavior\n _this.name = null;\n if (!this.match(tt.parenR)) {\n this.expect(tt.comma);\n }\n }\n while (!this.match(tt.parenR) && !this.match(tt.ellipsis)) {\n params.push(this.flowParseFunctionTypeParam(false));\n if (!this.match(tt.parenR)) {\n this.expect(tt.comma);\n }\n }\n if (this.eat(tt.ellipsis)) {\n rest = this.flowParseFunctionTypeParam(false);\n }\n return { params, rest, _this };\n }\n\n flowIdentToTypeAnnotation(\n startPos: number,\n startLoc: Position,\n node: N.FlowTypeAnnotation,\n id: N.Identifier,\n ): N.FlowTypeAnnotation {\n switch (id.name) {\n case \"any\":\n return this.finishNode(node, \"AnyTypeAnnotation\");\n\n case \"bool\":\n case \"boolean\":\n return this.finishNode(node, \"BooleanTypeAnnotation\");\n\n case \"mixed\":\n return this.finishNode(node, \"MixedTypeAnnotation\");\n\n case \"empty\":\n return this.finishNode(node, \"EmptyTypeAnnotation\");\n\n case \"number\":\n return this.finishNode(node, \"NumberTypeAnnotation\");\n\n case \"string\":\n return this.finishNode(node, \"StringTypeAnnotation\");\n\n case \"symbol\":\n return this.finishNode(node, \"SymbolTypeAnnotation\");\n\n default:\n this.checkNotUnderscore(id.name);\n return this.flowParseGenericType(startPos, startLoc, id);\n }\n }\n\n // The parsing of types roughly parallels the parsing of expressions, and\n // primary types are kind of like primary expressions...they're the\n // primitives with which other types are constructed.\n flowParsePrimaryType(): N.FlowTypeAnnotation {\n const startPos = this.state.start;\n const startLoc = this.state.startLoc;\n const node = this.startNode();\n let tmp;\n let type;\n let isGroupedType = false;\n const oldNoAnonFunctionType = this.state.noAnonFunctionType;\n\n switch (this.state.type) {\n case tt.name:\n if (this.isContextual(\"interface\")) {\n return this.flowParseInterfaceType();\n }\n\n return this.flowIdentToTypeAnnotation(\n startPos,\n startLoc,\n node,\n this.parseIdentifier(),\n );\n\n case tt.braceL:\n return this.flowParseObjectType({\n allowStatic: false,\n allowExact: false,\n allowSpread: true,\n allowProto: false,\n allowInexact: true,\n });\n\n case tt.braceBarL:\n return this.flowParseObjectType({\n allowStatic: false,\n allowExact: true,\n allowSpread: true,\n allowProto: false,\n allowInexact: false,\n });\n\n case tt.bracketL:\n this.state.noAnonFunctionType = false;\n type = this.flowParseTupleType();\n this.state.noAnonFunctionType = oldNoAnonFunctionType;\n return type;\n\n case tt.relational:\n if (this.state.value === \"<\") {\n node.typeParameters = this.flowParseTypeParameterDeclaration();\n this.expect(tt.parenL);\n tmp = this.flowParseFunctionTypeParams();\n node.params = tmp.params;\n node.rest = tmp.rest;\n node.this = tmp._this;\n this.expect(tt.parenR);\n\n this.expect(tt.arrow);\n\n node.returnType = this.flowParseType();\n\n return this.finishNode(node, \"FunctionTypeAnnotation\");\n }\n break;\n\n case tt.parenL:\n this.next();\n\n // Check to see if this is actually a grouped type\n if (!this.match(tt.parenR) && !this.match(tt.ellipsis)) {\n if (this.match(tt.name) || this.match(tt._this)) {\n const token = this.lookahead().type;\n isGroupedType = token !== tt.question && token !== tt.colon;\n } else {\n isGroupedType = true;\n }\n }\n\n if (isGroupedType) {\n this.state.noAnonFunctionType = false;\n type = this.flowParseType();\n this.state.noAnonFunctionType = oldNoAnonFunctionType;\n\n // A `,` or a `) =>` means this is an anonymous function type\n if (\n this.state.noAnonFunctionType ||\n !(\n this.match(tt.comma) ||\n (this.match(tt.parenR) && this.lookahead().type === tt.arrow)\n )\n ) {\n this.expect(tt.parenR);\n return type;\n } else {\n // Eat a comma if there is one\n this.eat(tt.comma);\n }\n }\n\n if (type) {\n tmp = this.flowParseFunctionTypeParams([\n this.reinterpretTypeAsFunctionTypeParam(type),\n ]);\n } else {\n tmp = this.flowParseFunctionTypeParams();\n }\n\n node.params = tmp.params;\n node.rest = tmp.rest;\n node.this = tmp._this;\n\n this.expect(tt.parenR);\n\n this.expect(tt.arrow);\n\n node.returnType = this.flowParseType();\n\n node.typeParameters = null;\n\n return this.finishNode(node, \"FunctionTypeAnnotation\");\n\n case tt.string:\n return this.parseLiteral<N.StringLiteralTypeAnnotation>(\n this.state.value,\n \"StringLiteralTypeAnnotation\",\n );\n\n case tt._true:\n case tt._false:\n node.value = this.match(tt._true);\n this.next();\n return this.finishNode<N.BooleanLiteralTypeAnnotation>(\n node,\n \"BooleanLiteralTypeAnnotation\",\n );\n\n case tt.plusMin:\n if (this.state.value === \"-\") {\n this.next();\n if (this.match(tt.num)) {\n return this.parseLiteralAtNode<N.NumberLiteralTypeAnnotation>(\n -this.state.value,\n \"NumberLiteralTypeAnnotation\",\n node,\n );\n }\n\n if (this.match(tt.bigint)) {\n return this.parseLiteralAtNode<N.BigIntLiteralTypeAnnotation>(\n -this.state.value,\n \"BigIntLiteralTypeAnnotation\",\n node,\n );\n }\n\n throw this.raise(\n this.state.start,\n FlowErrors.UnexpectedSubtractionOperand,\n );\n }\n\n throw this.unexpected();\n case tt.num:\n return this.parseLiteral(\n this.state.value,\n \"NumberLiteralTypeAnnotation\",\n );\n\n case tt.bigint:\n return this.parseLiteral(\n this.state.value,\n \"BigIntLiteralTypeAnnotation\",\n );\n\n case tt._void:\n this.next();\n return this.finishNode(node, \"VoidTypeAnnotation\");\n\n case tt._null:\n this.next();\n return this.finishNode(node, \"NullLiteralTypeAnnotation\");\n\n case tt._this:\n this.next();\n return this.finishNode(node, \"ThisTypeAnnotation\");\n\n case tt.star:\n this.next();\n return this.finishNode(node, \"ExistsTypeAnnotation\");\n\n default:\n if (this.state.type.keyword === \"typeof\") {\n return this.flowParseTypeofType();\n } else if (this.state.type.keyword) {\n const label = this.state.type.label;\n this.next();\n return super.createIdentifier(node, label);\n }\n }\n\n throw this.unexpected();\n }\n\n flowParsePostfixType(): N.FlowTypeAnnotation {\n const startPos = this.state.start;\n const startLoc = this.state.startLoc;\n let type = this.flowParsePrimaryType();\n let seenOptionalIndexedAccess = false;\n while (\n (this.match(tt.bracketL) || this.match(tt.questionDot)) &&\n !this.canInsertSemicolon()\n ) {\n const node = this.startNodeAt(startPos, startLoc);\n const optional = this.eat(tt.questionDot);\n seenOptionalIndexedAccess = seenOptionalIndexedAccess || optional;\n this.expect(tt.bracketL);\n if (!optional && this.match(tt.bracketR)) {\n node.elementType = type;\n this.next(); // eat `]`\n type = this.finishNode(node, \"ArrayTypeAnnotation\");\n } else {\n node.objectType = type;\n node.indexType = this.flowParseType();\n this.expect(tt.bracketR);\n if (seenOptionalIndexedAccess) {\n node.optional = optional;\n type = this.finishNode<N.FlowOptionalIndexedAccessType>(\n node,\n \"OptionalIndexedAccessType\",\n );\n } else {\n type = this.finishNode<N.FlowIndexedAccessType>(\n node,\n \"IndexedAccessType\",\n );\n }\n }\n }\n return type;\n }\n\n flowParsePrefixType(): N.FlowTypeAnnotation {\n const node = this.startNode();\n if (this.eat(tt.question)) {\n node.typeAnnotation = this.flowParsePrefixType();\n return this.finishNode(node, \"NullableTypeAnnotation\");\n } else {\n return this.flowParsePostfixType();\n }\n }\n\n flowParseAnonFunctionWithoutParens(): N.FlowTypeAnnotation {\n const param = this.flowParsePrefixType();\n if (!this.state.noAnonFunctionType && this.eat(tt.arrow)) {\n // TODO: This should be a type error. Passing in a SourceLocation, and it expects a Position.\n const node = this.startNodeAt(param.start, param.loc.start);\n node.params = [this.reinterpretTypeAsFunctionTypeParam(param)];\n node.rest = null;\n node.this = null;\n node.returnType = this.flowParseType();\n node.typeParameters = null;\n return this.finishNode(node, \"FunctionTypeAnnotation\");\n }\n return param;\n }\n\n flowParseIntersectionType(): N.FlowTypeAnnotation {\n const node = this.startNode();\n this.eat(tt.bitwiseAND);\n const type = this.flowParseAnonFunctionWithoutParens();\n node.types = [type];\n while (this.eat(tt.bitwiseAND)) {\n node.types.push(this.flowParseAnonFunctionWithoutParens());\n }\n return node.types.length === 1\n ? type\n : this.finishNode(node, \"IntersectionTypeAnnotation\");\n }\n\n flowParseUnionType(): N.FlowTypeAnnotation {\n const node = this.startNode();\n this.eat(tt.bitwiseOR);\n const type = this.flowParseIntersectionType();\n node.types = [type];\n while (this.eat(tt.bitwiseOR)) {\n node.types.push(this.flowParseIntersectionType());\n }\n return node.types.length === 1\n ? type\n : this.finishNode(node, \"UnionTypeAnnotation\");\n }\n\n flowParseType(): N.FlowTypeAnnotation {\n const oldInType = this.state.inType;\n this.state.inType = true;\n const type = this.flowParseUnionType();\n this.state.inType = oldInType;\n return type;\n }\n\n flowParseTypeOrImplicitInstantiation(): N.FlowTypeAnnotation {\n if (this.state.type === tt.name && this.state.value === \"_\") {\n const startPos = this.state.start;\n const startLoc = this.state.startLoc;\n const node = this.parseIdentifier();\n return this.flowParseGenericType(startPos, startLoc, node);\n } else {\n return this.flowParseType();\n }\n }\n\n flowParseTypeAnnotation(): N.FlowTypeAnnotation {\n const node = this.startNode();\n node.typeAnnotation = this.flowParseTypeInitialiser();\n return this.finishNode(node, \"TypeAnnotation\");\n }\n\n flowParseTypeAnnotatableIdentifier(\n allowPrimitiveOverride?: boolean,\n ): N.Identifier {\n const ident = allowPrimitiveOverride\n ? this.parseIdentifier()\n : this.flowParseRestrictedIdentifier();\n if (this.match(tt.colon)) {\n ident.typeAnnotation = this.flowParseTypeAnnotation();\n this.resetEndLocation(ident);\n }\n return ident;\n }\n\n typeCastToParameter(node: N.Node): N.Node {\n node.expression.typeAnnotation = node.typeAnnotation;\n\n this.resetEndLocation(\n node.expression,\n node.typeAnnotation.end,\n node.typeAnnotation.loc.end,\n );\n\n return node.expression;\n }\n\n flowParseVariance(): ?N.FlowVariance {\n let variance = null;\n if (this.match(tt.plusMin)) {\n variance = this.startNode();\n if (this.state.value === \"+\") {\n variance.kind = \"plus\";\n } else {\n variance.kind = \"minus\";\n }\n this.next();\n this.finishNode(variance, \"Variance\");\n }\n return variance;\n }\n\n // ==================================\n // Overrides\n // ==================================\n\n parseFunctionBody(\n node: N.Function,\n allowExpressionBody: ?boolean,\n isMethod?: boolean = false,\n ): void {\n if (allowExpressionBody) {\n return this.forwardNoArrowParamsConversionAt(node, () =>\n super.parseFunctionBody(node, true, isMethod),\n );\n }\n\n return super.parseFunctionBody(node, false, isMethod);\n }\n\n parseFunctionBodyAndFinish(\n node: N.BodilessFunctionOrMethodBase,\n type: string,\n isMethod?: boolean = false,\n ): void {\n if (this.match(tt.colon)) {\n const typeNode = this.startNode();\n\n [\n // $FlowFixMe (destructuring not supported yet)\n typeNode.typeAnnotation,\n // $FlowFixMe (destructuring not supported yet)\n node.predicate,\n ] = this.flowParseTypeAndPredicateInitialiser();\n\n node.returnType = typeNode.typeAnnotation\n ? this.finishNode(typeNode, \"TypeAnnotation\")\n : null;\n }\n\n super.parseFunctionBodyAndFinish(node, type, isMethod);\n }\n\n // interfaces and enums\n parseStatement(context: ?string, topLevel?: boolean): N.Statement {\n // strict mode handling of `interface` since it's a reserved word\n if (\n this.state.strict &&\n this.match(tt.name) &&\n this.state.value === \"interface\"\n ) {\n const lookahead = this.lookahead();\n if (lookahead.type === tt.name || isKeyword(lookahead.value)) {\n const node = this.startNode();\n this.next();\n return this.flowParseInterface(node);\n }\n } else if (this.shouldParseEnums() && this.isContextual(\"enum\")) {\n const node = this.startNode();\n this.next();\n return this.flowParseEnumDeclaration(node);\n }\n const stmt = super.parseStatement(context, topLevel);\n // We will parse a flow pragma in any comment before the first statement.\n if (this.flowPragma === undefined && !this.isValidDirective(stmt)) {\n this.flowPragma = null;\n }\n return stmt;\n }\n\n // declares, interfaces and type aliases\n parseExpressionStatement(\n node: N.ExpressionStatement,\n expr: N.Expression,\n ): N.ExpressionStatement {\n if (expr.type === \"Identifier\") {\n if (expr.name === \"declare\") {\n if (\n this.match(tt._class) ||\n this.match(tt.name) ||\n this.match(tt._function) ||\n this.match(tt._var) ||\n this.match(tt._export)\n ) {\n return this.flowParseDeclare(node);\n }\n } else if (this.match(tt.name)) {\n if (expr.name === \"interface\") {\n return this.flowParseInterface(node);\n } else if (expr.name === \"type\") {\n return this.flowParseTypeAlias(node);\n } else if (expr.name === \"opaque\") {\n return this.flowParseOpaqueType(node, false);\n }\n }\n }\n\n return super.parseExpressionStatement(node, expr);\n }\n\n // export type\n shouldParseExportDeclaration(): boolean {\n return (\n this.isContextual(\"type\") ||\n this.isContextual(\"interface\") ||\n this.isContextual(\"opaque\") ||\n (this.shouldParseEnums() && this.isContextual(\"enum\")) ||\n super.shouldParseExportDeclaration()\n );\n }\n\n isExportDefaultSpecifier(): boolean {\n if (\n this.match(tt.name) &&\n (this.state.value === \"type\" ||\n this.state.value === \"interface\" ||\n this.state.value === \"opaque\" ||\n (this.shouldParseEnums() && this.state.value === \"enum\"))\n ) {\n return false;\n }\n\n return super.isExportDefaultSpecifier();\n }\n\n parseExportDefaultExpression(): N.Expression | N.Declaration {\n if (this.shouldParseEnums() && this.isContextual(\"enum\")) {\n const node = this.startNode();\n this.next();\n return this.flowParseEnumDeclaration(node);\n }\n return super.parseExportDefaultExpression();\n }\n\n parseConditional(\n expr: N.Expression,\n startPos: number,\n startLoc: Position,\n refNeedsArrowPos?: ?Pos,\n ): N.Expression {\n if (!this.match(tt.question)) return expr;\n\n // only use the expensive \"tryParse\" method if there is a question mark\n // and if we come from inside parens\n if (refNeedsArrowPos) {\n const result = this.tryParse(() =>\n super.parseConditional(expr, startPos, startLoc),\n );\n\n if (!result.node) {\n // $FlowIgnore\n refNeedsArrowPos.start = result.error.pos || this.state.start;\n return expr;\n }\n\n if (result.error) this.state = result.failState;\n return result.node;\n }\n\n this.expect(tt.question);\n const state = this.state.clone();\n const originalNoArrowAt = this.state.noArrowAt;\n const node = this.startNodeAt(startPos, startLoc);\n let { consequent, failed } = this.tryParseConditionalConsequent();\n let [valid, invalid] = this.getArrowLikeExpressions(consequent);\n\n if (failed || invalid.length > 0) {\n const noArrowAt = [...originalNoArrowAt];\n\n if (invalid.length > 0) {\n this.state = state;\n this.state.noArrowAt = noArrowAt;\n\n for (let i = 0; i < invalid.length; i++) {\n noArrowAt.push(invalid[i].start);\n }\n\n ({ consequent, failed } = this.tryParseConditionalConsequent());\n [valid, invalid] = this.getArrowLikeExpressions(consequent);\n }\n\n if (failed && valid.length > 1) {\n // if there are two or more possible correct ways of parsing, throw an\n // error.\n // e.g. Source: a ? (b): c => (d): e => f\n // Result 1: a ? b : (c => ((d): e => f))\n // Result 2: a ? ((b): c => d) : (e => f)\n this.raise(state.start, FlowErrors.AmbiguousConditionalArrow);\n }\n\n if (failed && valid.length === 1) {\n this.state = state;\n this.state.noArrowAt = noArrowAt.concat(valid[0].start);\n ({ consequent, failed } = this.tryParseConditionalConsequent());\n }\n }\n\n this.getArrowLikeExpressions(consequent, true);\n\n this.state.noArrowAt = originalNoArrowAt;\n this.expect(tt.colon);\n\n node.test = expr;\n node.consequent = consequent;\n node.alternate = this.forwardNoArrowParamsConversionAt(node, () =>\n this.parseMaybeAssign(undefined, undefined, undefined),\n );\n\n return this.finishNode(node, \"ConditionalExpression\");\n }\n\n tryParseConditionalConsequent(): {\n consequent: N.Expression,\n failed: boolean,\n } {\n this.state.noArrowParamsConversionAt.push(this.state.start);\n\n const consequent = this.parseMaybeAssignAllowIn();\n const failed = !this.match(tt.colon);\n\n this.state.noArrowParamsConversionAt.pop();\n\n return { consequent, failed };\n }\n\n // Given an expression, walks through out its arrow functions whose body is\n // an expression and through out conditional expressions. It returns every\n // function which has been parsed with a return type but could have been\n // parenthesized expressions.\n // These functions are separated into two arrays: one containing the ones\n // whose parameters can be converted to assignable lists, one containing the\n // others.\n getArrowLikeExpressions(\n node: N.Expression,\n disallowInvalid?: boolean,\n ): [N.ArrowFunctionExpression[], N.ArrowFunctionExpression[]] {\n const stack = [node];\n const arrows: N.ArrowFunctionExpression[] = [];\n\n while (stack.length !== 0) {\n const node = stack.pop();\n if (node.type === \"ArrowFunctionExpression\") {\n if (node.typeParameters || !node.returnType) {\n // This is an arrow expression without ambiguity, so check its parameters\n this.finishArrowValidation(node);\n } else {\n arrows.push(node);\n }\n stack.push(node.body);\n } else if (node.type === \"ConditionalExpression\") {\n stack.push(node.consequent);\n stack.push(node.alternate);\n }\n }\n\n if (disallowInvalid) {\n arrows.forEach(node => this.finishArrowValidation(node));\n return [arrows, []];\n }\n\n return partition(arrows, node =>\n node.params.every(param => this.isAssignable(param, true)),\n );\n }\n\n finishArrowValidation(node: N.ArrowFunctionExpression) {\n this.toAssignableList(\n // node.params is Expression[] instead of $ReadOnlyArray<Pattern> because it\n // has not been converted yet.\n ((node.params: any): N.Expression[]),\n node.extra?.trailingComma,\n /* isLHS */ false,\n );\n // Enter scope, as checkParams defines bindings\n this.scope.enter(SCOPE_FUNCTION | SCOPE_ARROW);\n // Use super's method to force the parameters to be checked\n super.checkParams(node, false, true);\n this.scope.exit();\n }\n\n forwardNoArrowParamsConversionAt<T>(node: N.Node, parse: () => T): T {\n let result: T;\n if (this.state.noArrowParamsConversionAt.indexOf(node.start) !== -1) {\n this.state.noArrowParamsConversionAt.push(this.state.start);\n result = parse();\n this.state.noArrowParamsConversionAt.pop();\n } else {\n result = parse();\n }\n\n return result;\n }\n\n parseParenItem(\n node: N.Expression,\n startPos: number,\n startLoc: Position,\n ): N.Expression {\n node = super.parseParenItem(node, startPos, startLoc);\n if (this.eat(tt.question)) {\n node.optional = true;\n // Include questionmark in location of node\n // Don't use this.finishNode() as otherwise we might process comments twice and\n // include already consumed parens\n this.resetEndLocation(node);\n }\n\n if (this.match(tt.colon)) {\n const typeCastNode = this.startNodeAt(startPos, startLoc);\n typeCastNode.expression = node;\n typeCastNode.typeAnnotation = this.flowParseTypeAnnotation();\n\n return this.finishNode(typeCastNode, \"TypeCastExpression\");\n }\n\n return node;\n }\n\n assertModuleNodeAllowed(node: N.Node) {\n if (\n (node.type === \"ImportDeclaration\" &&\n (node.importKind === \"type\" || node.importKind === \"typeof\")) ||\n (node.type === \"ExportNamedDeclaration\" &&\n node.exportKind === \"type\") ||\n (node.type === \"ExportAllDeclaration\" && node.exportKind === \"type\")\n ) {\n // Allow Flowtype imports and exports in all conditions because\n // Flow itself does not care about 'sourceType'.\n return;\n }\n\n super.assertModuleNodeAllowed(node);\n }\n\n parseExport(node: N.Node): N.AnyExport {\n const decl = super.parseExport(node);\n if (\n decl.type === \"ExportNamedDeclaration\" ||\n decl.type === \"ExportAllDeclaration\"\n ) {\n decl.exportKind = decl.exportKind || \"value\";\n }\n return decl;\n }\n\n parseExportDeclaration(node: N.ExportNamedDeclaration): ?N.Declaration {\n if (this.isContextual(\"type\")) {\n node.exportKind = \"type\";\n\n const declarationNode = this.startNode();\n this.next();\n\n if (this.match(tt.braceL)) {\n // export type { foo, bar };\n node.specifiers = this.parseExportSpecifiers();\n this.parseExportFrom(node);\n return null;\n } else {\n // export type Foo = Bar;\n return this.flowParseTypeAlias(declarationNode);\n }\n } else if (this.isContextual(\"opaque\")) {\n node.exportKind = \"type\";\n\n const declarationNode = this.startNode();\n this.next();\n // export opaque type Foo = Bar;\n return this.flowParseOpaqueType(declarationNode, false);\n } else if (this.isContextual(\"interface\")) {\n node.exportKind = \"type\";\n const declarationNode = this.startNode();\n this.next();\n return this.flowParseInterface(declarationNode);\n } else if (this.shouldParseEnums() && this.isContextual(\"enum\")) {\n node.exportKind = \"value\";\n const declarationNode = this.startNode();\n this.next();\n return this.flowParseEnumDeclaration(declarationNode);\n } else {\n return super.parseExportDeclaration(node);\n }\n }\n\n eatExportStar(node: N.Node): boolean {\n if (super.eatExportStar(...arguments)) return true;\n\n if (this.isContextual(\"type\") && this.lookahead().type === tt.star) {\n node.exportKind = \"type\";\n this.next();\n this.next();\n return true;\n }\n\n return false;\n }\n\n maybeParseExportNamespaceSpecifier(node: N.Node): boolean {\n const pos = this.state.start;\n const hasNamespace = super.maybeParseExportNamespaceSpecifier(node);\n if (hasNamespace && node.exportKind === \"type\") {\n this.unexpected(pos);\n }\n return hasNamespace;\n }\n\n parseClassId(node: N.Class, isStatement: boolean, optionalId: ?boolean) {\n super.parseClassId(node, isStatement, optionalId);\n if (this.isRelational(\"<\")) {\n node.typeParameters = this.flowParseTypeParameterDeclaration();\n }\n }\n\n parseClassMember(\n classBody: N.ClassBody,\n member: any,\n state: N.ParseClassMemberState,\n ): void {\n const pos = this.state.start;\n if (this.isContextual(\"declare\")) {\n if (this.parseClassMemberFromModifier(classBody, member)) {\n // 'declare' is a class element name\n return;\n }\n\n member.declare = true;\n }\n\n super.parseClassMember(classBody, member, state);\n\n if (member.declare) {\n if (\n member.type !== \"ClassProperty\" &&\n member.type !== \"ClassPrivateProperty\" &&\n member.type !== \"PropertyDefinition\" // Used by estree plugin\n ) {\n this.raise(pos, FlowErrors.DeclareClassElement);\n } else if (member.value) {\n this.raise(\n member.value.start,\n FlowErrors.DeclareClassFieldInitializer,\n );\n }\n }\n }\n\n isIterator(word: string): boolean {\n return word === \"iterator\" || word === \"asyncIterator\";\n }\n\n readIterator(): void {\n const word = super.readWord1();\n const fullWord = \"@@\" + word;\n\n // Allow @@iterator and @@asyncIterator as a identifier only inside type\n if (!this.isIterator(word) || !this.state.inType) {\n this.raise(this.state.pos, Errors.InvalidIdentifier, fullWord);\n }\n\n this.finishToken(tt.name, fullWord);\n }\n\n // ensure that inside flow types, we bypass the jsx parser plugin\n getTokenFromCode(code: number): void {\n const next = this.input.charCodeAt(this.state.pos + 1);\n if (code === charCodes.leftCurlyBrace && next === charCodes.verticalBar) {\n return this.finishOp(tt.braceBarL, 2);\n } else if (\n this.state.inType &&\n (code === charCodes.greaterThan || code === charCodes.lessThan)\n ) {\n return this.finishOp(tt.relational, 1);\n } else if (this.state.inType && code === charCodes.questionMark) {\n if (next === charCodes.dot) {\n return this.finishOp(tt.questionDot, 2);\n }\n // allow double nullable types in Flow: ??string\n return this.finishOp(tt.question, 1);\n } else if (isIteratorStart(code, next)) {\n this.state.pos += 2; // eat \"@@\"\n return this.readIterator();\n } else {\n return super.getTokenFromCode(code);\n }\n }\n\n isAssignable(node: N.Node, isBinding?: boolean): boolean {\n switch (node.type) {\n case \"Identifier\":\n case \"ObjectPattern\":\n case \"ArrayPattern\":\n case \"AssignmentPattern\":\n return true;\n\n case \"ObjectExpression\": {\n const last = node.properties.length - 1;\n return node.properties.every((prop, i) => {\n return (\n prop.type !== \"ObjectMethod\" &&\n (i === last || prop.type === \"SpreadElement\") &&\n this.isAssignable(prop)\n );\n });\n }\n\n case \"ObjectProperty\":\n return this.isAssignable(node.value);\n\n case \"SpreadElement\":\n return this.isAssignable(node.argument);\n\n case \"ArrayExpression\":\n return node.elements.every(element => this.isAssignable(element));\n\n case \"AssignmentExpression\":\n return node.operator === \"=\";\n\n case \"ParenthesizedExpression\":\n case \"TypeCastExpression\":\n return this.isAssignable(node.expression);\n\n case \"MemberExpression\":\n case \"OptionalMemberExpression\":\n return !isBinding;\n\n default:\n return false;\n }\n }\n\n toAssignable(node: N.Node, isLHS: boolean = false): N.Node {\n if (node.type === \"TypeCastExpression\") {\n return super.toAssignable(this.typeCastToParameter(node), isLHS);\n } else {\n return super.toAssignable(node, isLHS);\n }\n }\n\n // turn type casts that we found in function parameter head into type annotated params\n toAssignableList(\n exprList: N.Expression[],\n trailingCommaPos?: ?number,\n isLHS: boolean,\n ): $ReadOnlyArray<N.Pattern> {\n for (let i = 0; i < exprList.length; i++) {\n const expr = exprList[i];\n if (expr?.type === \"TypeCastExpression\") {\n exprList[i] = this.typeCastToParameter(expr);\n }\n }\n return super.toAssignableList(exprList, trailingCommaPos, isLHS);\n }\n\n // this is a list of nodes, from something like a call expression, we need to filter the\n // type casts that we've found that are illegal in this context\n toReferencedList(\n exprList: $ReadOnlyArray<?N.Expression>,\n isParenthesizedExpr?: boolean,\n ): $ReadOnlyArray<?N.Expression> {\n for (let i = 0; i < exprList.length; i++) {\n const expr = exprList[i];\n if (\n expr &&\n expr.type === \"TypeCastExpression\" &&\n !expr.extra?.parenthesized &&\n (exprList.length > 1 || !isParenthesizedExpr)\n ) {\n this.raise(expr.typeAnnotation.start, FlowErrors.TypeCastInPattern);\n }\n }\n\n return exprList;\n }\n\n parseArrayLike(\n close: TokenType,\n canBePattern: boolean,\n isTuple: boolean,\n refExpressionErrors: ?ExpressionErrors,\n ): N.ArrayExpression | N.TupleExpression {\n const node = super.parseArrayLike(\n close,\n canBePattern,\n isTuple,\n refExpressionErrors,\n );\n\n // This could be an array pattern:\n // ([a: string, b: string]) => {}\n // In this case, we don't have to call toReferencedList. We will\n // call it, if needed, when we are sure that it is a parenthesized\n // expression by calling toReferencedListDeep.\n if (canBePattern && !this.state.maybeInArrowParameters) {\n this.toReferencedList(node.elements);\n }\n\n return node;\n }\n\n checkLVal(\n expr: N.Expression,\n ...args:\n | [string, BindingTypes | void]\n | [\n string,\n BindingTypes | void,\n ?Set<string>,\n boolean | void,\n boolean | void,\n ]\n ): void {\n if (expr.type !== \"TypeCastExpression\") {\n return super.checkLVal(expr, ...args);\n }\n }\n\n // parse class property type annotations\n parseClassProperty(node: N.ClassProperty): N.ClassProperty {\n if (this.match(tt.colon)) {\n node.typeAnnotation = this.flowParseTypeAnnotation();\n }\n return super.parseClassProperty(node);\n }\n\n parseClassPrivateProperty(\n node: N.ClassPrivateProperty,\n ): N.ClassPrivateProperty {\n if (this.match(tt.colon)) {\n node.typeAnnotation = this.flowParseTypeAnnotation();\n }\n return super.parseClassPrivateProperty(node);\n }\n\n // determine whether or not we're currently in the position where a class method would appear\n isClassMethod(): boolean {\n return this.isRelational(\"<\") || super.isClassMethod();\n }\n\n // determine whether or not we're currently in the position where a class property would appear\n isClassProperty(): boolean {\n return this.match(tt.colon) || super.isClassProperty();\n }\n\n isNonstaticConstructor(method: N.ClassMethod | N.ClassProperty): boolean {\n return !this.match(tt.colon) && super.isNonstaticConstructor(method);\n }\n\n // parse type parameters for class methods\n pushClassMethod(\n classBody: N.ClassBody,\n method: N.ClassMethod,\n isGenerator: boolean,\n isAsync: boolean,\n isConstructor: boolean,\n allowsDirectSuper: boolean,\n ): void {\n if ((method: $FlowFixMe).variance) {\n this.unexpected((method: $FlowFixMe).variance.start);\n }\n delete (method: $FlowFixMe).variance;\n if (this.isRelational(\"<\")) {\n method.typeParameters = this.flowParseTypeParameterDeclaration();\n }\n\n super.pushClassMethod(\n classBody,\n method,\n isGenerator,\n isAsync,\n isConstructor,\n allowsDirectSuper,\n );\n\n if (method.params && isConstructor) {\n const params = method.params;\n if (params.length > 0 && this.isThisParam(params[0])) {\n this.raise(method.start, FlowErrors.ThisParamBannedInConstructor);\n }\n // estree support\n } else if (\n // $FlowFixMe flow does not know about the face that estree can replace ClassMethod with MethodDefinition\n method.type === \"MethodDefinition\" &&\n isConstructor &&\n method.value.params\n ) {\n const params = method.value.params;\n if (params.length > 0 && this.isThisParam(params[0])) {\n this.raise(method.start, FlowErrors.ThisParamBannedInConstructor);\n }\n }\n }\n\n pushClassPrivateMethod(\n classBody: N.ClassBody,\n method: N.ClassPrivateMethod,\n isGenerator: boolean,\n isAsync: boolean,\n ): void {\n if ((method: $FlowFixMe).variance) {\n this.unexpected((method: $FlowFixMe).variance.start);\n }\n delete (method: $FlowFixMe).variance;\n if (this.isRelational(\"<\")) {\n method.typeParameters = this.flowParseTypeParameterDeclaration();\n }\n\n super.pushClassPrivateMethod(classBody, method, isGenerator, isAsync);\n }\n\n // parse a the super class type parameters and implements\n parseClassSuper(node: N.Class): void {\n super.parseClassSuper(node);\n if (node.superClass && this.isRelational(\"<\")) {\n node.superTypeParameters = this.flowParseTypeParameterInstantiation();\n }\n if (this.isContextual(\"implements\")) {\n this.next();\n const implemented: N.FlowClassImplements[] = (node.implements = []);\n do {\n const node = this.startNode();\n node.id = this.flowParseRestrictedIdentifier(/*liberal*/ true);\n if (this.isRelational(\"<\")) {\n node.typeParameters = this.flowParseTypeParameterInstantiation();\n } else {\n node.typeParameters = null;\n }\n implemented.push(this.finishNode(node, \"ClassImplements\"));\n } while (this.eat(tt.comma));\n }\n }\n\n checkGetterSetterParams(method: N.ObjectMethod | N.ClassMethod): void {\n super.checkGetterSetterParams(method);\n const params = this.getObjectOrClassMethodParams(method);\n if (params.length > 0) {\n const param = params[0];\n if (this.isThisParam(param) && method.kind === \"get\") {\n this.raise(param.start, FlowErrors.GetterMayNotHaveThisParam);\n } else if (this.isThisParam(param)) {\n this.raise(param.start, FlowErrors.SetterMayNotHaveThisParam);\n }\n }\n }\n\n parsePropertyName(\n node: N.ObjectOrClassMember | N.ClassMember | N.TsNamedTypeElementBase,\n isPrivateNameAllowed: boolean,\n ): N.Identifier {\n const variance = this.flowParseVariance();\n const key = super.parsePropertyName(node, isPrivateNameAllowed);\n // $FlowIgnore (\"variance\" not defined on TsNamedTypeElementBase)\n node.variance = variance;\n return key;\n }\n\n // parse type parameters for object method shorthand\n parseObjPropValue(\n prop: N.ObjectMember,\n startPos: ?number,\n startLoc: ?Position,\n isGenerator: boolean,\n isAsync: boolean,\n isPattern: boolean,\n isAccessor: boolean,\n refExpressionErrors: ?ExpressionErrors,\n ): void {\n if ((prop: $FlowFixMe).variance) {\n this.unexpected((prop: $FlowFixMe).variance.start);\n }\n delete (prop: $FlowFixMe).variance;\n\n let typeParameters;\n\n // method shorthand\n if (this.isRelational(\"<\") && !isAccessor) {\n typeParameters = this.flowParseTypeParameterDeclaration();\n if (!this.match(tt.parenL)) this.unexpected();\n }\n\n super.parseObjPropValue(\n prop,\n startPos,\n startLoc,\n isGenerator,\n isAsync,\n isPattern,\n isAccessor,\n refExpressionErrors,\n );\n\n // add typeParameters if we found them\n if (typeParameters) {\n (prop.value || prop).typeParameters = typeParameters;\n }\n }\n\n parseAssignableListItemTypes(param: N.Pattern): N.Pattern {\n if (this.eat(tt.question)) {\n if (param.type !== \"Identifier\") {\n this.raise(param.start, FlowErrors.OptionalBindingPattern);\n }\n if (this.isThisParam(param)) {\n this.raise(param.start, FlowErrors.ThisParamMayNotBeOptional);\n }\n\n ((param: any): N.Identifier).optional = true;\n }\n if (this.match(tt.colon)) {\n param.typeAnnotation = this.flowParseTypeAnnotation();\n } else if (this.isThisParam(param)) {\n this.raise(param.start, FlowErrors.ThisParamAnnotationRequired);\n }\n\n if (this.match(tt.eq) && this.isThisParam(param)) {\n this.raise(param.start, FlowErrors.ThisParamNoDefault);\n }\n\n this.resetEndLocation(param);\n return param;\n }\n\n parseMaybeDefault(\n startPos?: ?number,\n startLoc?: ?Position,\n left?: ?N.Pattern,\n ): N.Pattern {\n const node = super.parseMaybeDefault(startPos, startLoc, left);\n\n if (\n node.type === \"AssignmentPattern\" &&\n node.typeAnnotation &&\n node.right.start < node.typeAnnotation.start\n ) {\n this.raise(node.typeAnnotation.start, FlowErrors.TypeBeforeInitializer);\n }\n\n return node;\n }\n\n shouldParseDefaultImport(node: N.ImportDeclaration): boolean {\n if (!hasTypeImportKind(node)) {\n return super.shouldParseDefaultImport(node);\n }\n\n return isMaybeDefaultImport(this.state);\n }\n\n parseImportSpecifierLocal(\n node: N.ImportDeclaration,\n specifier: N.Node,\n type: string,\n contextDescription: string,\n ): void {\n specifier.local = hasTypeImportKind(node)\n ? this.flowParseRestrictedIdentifier(\n /* liberal */ true,\n /* declaration */ true,\n )\n : this.parseIdentifier();\n\n this.checkLVal(specifier.local, contextDescription, BIND_LEXICAL);\n node.specifiers.push(this.finishNode(specifier, type));\n }\n\n // parse typeof and type imports\n maybeParseDefaultImportSpecifier(node: N.ImportDeclaration): boolean {\n node.importKind = \"value\";\n\n let kind = null;\n if (this.match(tt._typeof)) {\n kind = \"typeof\";\n } else if (this.isContextual(\"type\")) {\n kind = \"type\";\n }\n if (kind) {\n const lh = this.lookahead();\n\n // import type * is not allowed\n if (kind === \"type\" && lh.type === tt.star) {\n this.unexpected(lh.start);\n }\n\n if (\n isMaybeDefaultImport(lh) ||\n lh.type === tt.braceL ||\n lh.type === tt.star\n ) {\n this.next();\n node.importKind = kind;\n }\n }\n\n return super.maybeParseDefaultImportSpecifier(node);\n }\n\n // parse import-type/typeof shorthand\n parseImportSpecifier(node: N.ImportDeclaration): void {\n const specifier = this.startNode();\n const firstIdentIsString = this.match(tt.string);\n const firstIdent = this.parseModuleExportName();\n\n let specifierTypeKind = null;\n if (firstIdent.type === \"Identifier\") {\n if (firstIdent.name === \"type\") {\n specifierTypeKind = \"type\";\n } else if (firstIdent.name === \"typeof\") {\n specifierTypeKind = \"typeof\";\n }\n }\n\n let isBinding = false;\n if (this.isContextual(\"as\") && !this.isLookaheadContextual(\"as\")) {\n const as_ident = this.parseIdentifier(true);\n if (\n specifierTypeKind !== null &&\n !this.match(tt.name) &&\n !this.state.type.keyword\n ) {\n // `import {type as ,` or `import {type as }`\n specifier.imported = as_ident;\n specifier.importKind = specifierTypeKind;\n specifier.local = as_ident.__clone();\n } else {\n // `import {type as foo`\n specifier.imported = firstIdent;\n specifier.importKind = null;\n specifier.local = this.parseIdentifier();\n }\n } else if (\n specifierTypeKind !== null &&\n (this.match(tt.name) || this.state.type.keyword)\n ) {\n // `import {type foo`\n specifier.imported = this.parseIdentifier(true);\n specifier.importKind = specifierTypeKind;\n if (this.eatContextual(\"as\")) {\n specifier.local = this.parseIdentifier();\n } else {\n isBinding = true;\n specifier.local = specifier.imported.__clone();\n }\n } else {\n if (firstIdentIsString) {\n /*:: invariant(firstIdent instanceof N.StringLiteral) */\n throw this.raise(\n specifier.start,\n Errors.ImportBindingIsString,\n firstIdent.value,\n );\n }\n /*:: invariant(firstIdent instanceof N.Node) */\n isBinding = true;\n specifier.imported = firstIdent;\n specifier.importKind = null;\n specifier.local = specifier.imported.__clone();\n }\n\n const nodeIsTypeImport = hasTypeImportKind(node);\n const specifierIsTypeImport = hasTypeImportKind(specifier);\n\n if (nodeIsTypeImport && specifierIsTypeImport) {\n this.raise(\n specifier.start,\n FlowErrors.ImportTypeShorthandOnlyInPureImport,\n );\n }\n\n if (nodeIsTypeImport || specifierIsTypeImport) {\n this.checkReservedType(\n specifier.local.name,\n specifier.local.start,\n /* declaration */ true,\n );\n }\n\n if (isBinding && !nodeIsTypeImport && !specifierIsTypeImport) {\n this.checkReservedWord(\n specifier.local.name,\n specifier.start,\n true,\n true,\n );\n }\n\n this.checkLVal(specifier.local, \"import specifier\", BIND_LEXICAL);\n node.specifiers.push(this.finishNode(specifier, \"ImportSpecifier\"));\n }\n\n parseBindingAtom(): N.Pattern {\n switch (this.state.type) {\n case tt._this:\n // \"this\" may be the name of a parameter, so allow it.\n return this.parseIdentifier(/* liberal */ true);\n default:\n return super.parseBindingAtom();\n }\n }\n\n // parse function type parameters - function foo<T>() {}\n parseFunctionParams(node: N.Function, allowModifiers?: boolean): void {\n // $FlowFixMe\n const kind = node.kind;\n if (kind !== \"get\" && kind !== \"set\" && this.isRelational(\"<\")) {\n node.typeParameters = this.flowParseTypeParameterDeclaration();\n }\n super.parseFunctionParams(node, allowModifiers);\n }\n\n // parse flow type annotations on variable declarator heads - let foo: string = bar\n parseVarId(\n decl: N.VariableDeclarator,\n kind: \"var\" | \"let\" | \"const\",\n ): void {\n super.parseVarId(decl, kind);\n if (this.match(tt.colon)) {\n decl.id.typeAnnotation = this.flowParseTypeAnnotation();\n this.resetEndLocation(decl.id); // set end position to end of type\n }\n }\n\n // parse the return type of an async arrow function - let foo = (async (): number => {});\n parseAsyncArrowFromCallExpression(\n node: N.ArrowFunctionExpression,\n call: N.CallExpression,\n ): N.ArrowFunctionExpression {\n if (this.match(tt.colon)) {\n const oldNoAnonFunctionType = this.state.noAnonFunctionType;\n this.state.noAnonFunctionType = true;\n node.returnType = this.flowParseTypeAnnotation();\n this.state.noAnonFunctionType = oldNoAnonFunctionType;\n }\n\n return super.parseAsyncArrowFromCallExpression(node, call);\n }\n\n // todo description\n shouldParseAsyncArrow(): boolean {\n return this.match(tt.colon) || super.shouldParseAsyncArrow();\n }\n\n // We need to support type parameter declarations for arrow functions. This\n // is tricky. There are three situations we need to handle\n //\n // 1. This is either JSX or an arrow function. We'll try JSX first. If that\n // fails, we'll try an arrow function. If that fails, we'll throw the JSX\n // error.\n // 2. This is an arrow function. We'll parse the type parameter declaration,\n // parse the rest, make sure the rest is an arrow function, and go from\n // there\n // 3. This is neither. Just call the super method\n parseMaybeAssign(\n refExpressionErrors?: ?ExpressionErrors,\n afterLeftParse?: Function,\n refNeedsArrowPos?: ?Pos,\n ): N.Expression {\n let state = null;\n\n let jsx;\n\n if (\n this.hasPlugin(\"jsx\") &&\n (this.match(tt.jsxTagStart) || this.isRelational(\"<\"))\n ) {\n state = this.state.clone();\n\n jsx = this.tryParse(\n () =>\n super.parseMaybeAssign(\n refExpressionErrors,\n afterLeftParse,\n refNeedsArrowPos,\n ),\n state,\n );\n /*:: invariant(!jsx.aborted) */\n\n if (!jsx.error) return jsx.node;\n\n // Remove `tc.j_expr` and `tc.j_oTag` from context added\n // by parsing `jsxTagStart` to stop the JSX plugin from\n // messing with the tokens\n const { context } = this.state;\n if (context[context.length - 1] === tc.j_oTag) {\n context.length -= 2;\n } else if (context[context.length - 1] === tc.j_expr) {\n context.length -= 1;\n }\n }\n\n if (jsx?.error || this.isRelational(\"<\")) {\n state = state || this.state.clone();\n\n let typeParameters;\n\n const arrow = this.tryParse(abort => {\n typeParameters = this.flowParseTypeParameterDeclaration();\n\n const arrowExpression = this.forwardNoArrowParamsConversionAt(\n typeParameters,\n () => {\n const result = super.parseMaybeAssign(\n refExpressionErrors,\n afterLeftParse,\n refNeedsArrowPos,\n );\n\n this.resetStartLocationFromNode(result, typeParameters);\n\n return result;\n },\n );\n\n // <T>(() => {}: any);\n if (\n arrowExpression.type !== \"ArrowFunctionExpression\" &&\n arrowExpression.extra?.parenthesized\n ) {\n abort();\n }\n\n // The above can return a TypeCastExpression when the arrow\n // expression is not wrapped in parens. See also `this.parseParenItem`.\n const expr = this.maybeUnwrapTypeCastExpression(arrowExpression);\n expr.typeParameters = typeParameters;\n this.resetStartLocationFromNode(expr, typeParameters);\n\n return arrowExpression;\n }, state);\n\n let arrowExpression: ?(\n | N.ArrowFunctionExpression\n | N.TypeCastExpression\n ) = null;\n\n if (\n arrow.node &&\n this.maybeUnwrapTypeCastExpression(arrow.node).type ===\n \"ArrowFunctionExpression\"\n ) {\n if (!arrow.error && !arrow.aborted) {\n // <T> async () => {}\n if (arrow.node.async) {\n /*:: invariant(typeParameters) */\n this.raise(\n typeParameters.start,\n FlowErrors.UnexpectedTypeParameterBeforeAsyncArrowFunction,\n );\n }\n\n return arrow.node;\n }\n\n arrowExpression = arrow.node;\n }\n\n // If we are here, both JSX and Flow parsing attempts failed.\n // Give the precedence to the JSX error, except if JSX had an\n // unrecoverable error while Flow didn't.\n // If the error is recoverable, we can only re-report it if there is\n // a node we can return.\n\n if (jsx?.node) {\n /*:: invariant(jsx.failState) */\n this.state = jsx.failState;\n return jsx.node;\n }\n\n if (arrowExpression) {\n /*:: invariant(arrow.failState) */\n this.state = arrow.failState;\n return arrowExpression;\n }\n\n if (jsx?.thrown) throw jsx.error;\n if (arrow.thrown) throw arrow.error;\n\n /*:: invariant(typeParameters) */\n throw this.raise(\n typeParameters.start,\n FlowErrors.UnexpectedTokenAfterTypeParameter,\n );\n }\n\n return super.parseMaybeAssign(\n refExpressionErrors,\n afterLeftParse,\n refNeedsArrowPos,\n );\n }\n\n // handle return types for arrow functions\n parseArrow(node: N.ArrowFunctionExpression): ?N.ArrowFunctionExpression {\n if (this.match(tt.colon)) {\n const result = this.tryParse(() => {\n const oldNoAnonFunctionType = this.state.noAnonFunctionType;\n this.state.noAnonFunctionType = true;\n\n const typeNode = this.startNode();\n\n [\n // $FlowFixMe (destructuring not supported yet)\n typeNode.typeAnnotation,\n // $FlowFixMe (destructuring not supported yet)\n node.predicate,\n ] = this.flowParseTypeAndPredicateInitialiser();\n\n this.state.noAnonFunctionType = oldNoAnonFunctionType;\n\n if (this.canInsertSemicolon()) this.unexpected();\n if (!this.match(tt.arrow)) this.unexpected();\n\n return typeNode;\n });\n\n if (result.thrown) return null;\n /*:: invariant(result.node) */\n\n if (result.error) this.state = result.failState;\n\n // assign after it is clear it is an arrow\n node.returnType = result.node.typeAnnotation\n ? this.finishNode(result.node, \"TypeAnnotation\")\n : null;\n }\n\n return super.parseArrow(node);\n }\n\n shouldParseArrow(): boolean {\n return this.match(tt.colon) || super.shouldParseArrow();\n }\n\n setArrowFunctionParameters(\n node: N.ArrowFunctionExpression,\n params: N.Expression[],\n ): void {\n if (this.state.noArrowParamsConversionAt.indexOf(node.start) !== -1) {\n node.params = params;\n } else {\n super.setArrowFunctionParameters(node, params);\n }\n }\n\n checkParams(\n node: N.Function,\n allowDuplicates: boolean,\n isArrowFunction: ?boolean,\n ): void {\n if (\n isArrowFunction &&\n this.state.noArrowParamsConversionAt.indexOf(node.start) !== -1\n ) {\n return;\n }\n\n // ensure the `this` param is first, if it exists\n for (let i = 0; i < node.params.length; i++) {\n if (this.isThisParam(node.params[i]) && i > 0) {\n this.raise(node.params[i].start, FlowErrors.ThisParamMustBeFirst);\n }\n }\n\n return super.checkParams(...arguments);\n }\n\n parseParenAndDistinguishExpression(canBeArrow: boolean): N.Expression {\n return super.parseParenAndDistinguishExpression(\n canBeArrow && this.state.noArrowAt.indexOf(this.state.start) === -1,\n );\n }\n\n parseSubscripts(\n base: N.Expression,\n startPos: number,\n startLoc: Position,\n noCalls?: ?boolean,\n ): N.Expression {\n if (\n base.type === \"Identifier\" &&\n base.name === \"async\" &&\n this.state.noArrowAt.indexOf(startPos) !== -1\n ) {\n this.next();\n\n const node = this.startNodeAt(startPos, startLoc);\n node.callee = base;\n node.arguments = this.parseCallExpressionArguments(tt.parenR, false);\n base = this.finishNode(node, \"CallExpression\");\n } else if (\n base.type === \"Identifier\" &&\n base.name === \"async\" &&\n this.isRelational(\"<\")\n ) {\n const state = this.state.clone();\n const arrow = this.tryParse(\n abort =>\n this.parseAsyncArrowWithTypeParameters(startPos, startLoc) ||\n abort(),\n state,\n );\n\n if (!arrow.error && !arrow.aborted) return arrow.node;\n\n const result = this.tryParse(\n () => super.parseSubscripts(base, startPos, startLoc, noCalls),\n state,\n );\n\n if (result.node && !result.error) return result.node;\n\n if (arrow.node) {\n this.state = arrow.failState;\n return arrow.node;\n }\n\n if (result.node) {\n this.state = result.failState;\n return result.node;\n }\n\n throw arrow.error || result.error;\n }\n\n return super.parseSubscripts(base, startPos, startLoc, noCalls);\n }\n\n parseSubscript(\n base: N.Expression,\n startPos: number,\n startLoc: Position,\n noCalls: ?boolean,\n subscriptState: N.ParseSubscriptState,\n ): N.Expression {\n if (this.match(tt.questionDot) && this.isLookaheadToken_lt()) {\n subscriptState.optionalChainMember = true;\n if (noCalls) {\n subscriptState.stop = true;\n return base;\n }\n this.next();\n const node: N.OptionalCallExpression = this.startNodeAt(\n startPos,\n startLoc,\n );\n node.callee = base;\n node.typeArguments = this.flowParseTypeParameterInstantiation();\n this.expect(tt.parenL);\n // $FlowFixMe\n node.arguments = this.parseCallExpressionArguments(tt.parenR, false);\n node.optional = true;\n return this.finishCallExpression(node, /* optional */ true);\n } else if (\n !noCalls &&\n this.shouldParseTypes() &&\n this.isRelational(\"<\")\n ) {\n const node = this.startNodeAt(startPos, startLoc);\n node.callee = base;\n\n const result = this.tryParse(() => {\n node.typeArguments =\n this.flowParseTypeParameterInstantiationCallOrNew();\n this.expect(tt.parenL);\n node.arguments = this.parseCallExpressionArguments(tt.parenR, false);\n if (subscriptState.optionalChainMember) node.optional = false;\n return this.finishCallExpression(\n node,\n subscriptState.optionalChainMember,\n );\n });\n\n if (result.node) {\n if (result.error) this.state = result.failState;\n return result.node;\n }\n }\n\n return super.parseSubscript(\n base,\n startPos,\n startLoc,\n noCalls,\n subscriptState,\n );\n }\n\n parseNewArguments(node: N.NewExpression): void {\n let targs = null;\n if (this.shouldParseTypes() && this.isRelational(\"<\")) {\n targs = this.tryParse(() =>\n this.flowParseTypeParameterInstantiationCallOrNew(),\n ).node;\n }\n node.typeArguments = targs;\n\n super.parseNewArguments(node);\n }\n\n parseAsyncArrowWithTypeParameters(\n startPos: number,\n startLoc: Position,\n ): ?N.ArrowFunctionExpression {\n const node = this.startNodeAt(startPos, startLoc);\n this.parseFunctionParams(node);\n if (!this.parseArrow(node)) return;\n return this.parseArrowExpression(\n node,\n /* params */ undefined,\n /* isAsync */ true,\n );\n }\n\n readToken_mult_modulo(code: number): void {\n const next = this.input.charCodeAt(this.state.pos + 1);\n if (\n code === charCodes.asterisk &&\n next === charCodes.slash &&\n this.state.hasFlowComment\n ) {\n this.state.hasFlowComment = false;\n this.state.pos += 2;\n this.nextToken();\n return;\n }\n\n super.readToken_mult_modulo(code);\n }\n\n readToken_pipe_amp(code: number): void {\n const next = this.input.charCodeAt(this.state.pos + 1);\n if (\n code === charCodes.verticalBar &&\n next === charCodes.rightCurlyBrace\n ) {\n // '|}'\n this.finishOp(tt.braceBarR, 2);\n return;\n }\n\n super.readToken_pipe_amp(code);\n }\n\n parseTopLevel(file: N.File, program: N.Program): N.File {\n const fileNode = super.parseTopLevel(file, program);\n if (this.state.hasFlowComment) {\n this.raise(this.state.pos, FlowErrors.UnterminatedFlowComment);\n }\n return fileNode;\n }\n\n skipBlockComment(): void {\n if (this.hasPlugin(\"flowComments\") && this.skipFlowComment()) {\n if (this.state.hasFlowComment) {\n this.unexpected(null, FlowErrors.NestedFlowComment);\n }\n this.hasFlowCommentCompletion();\n this.state.pos += this.skipFlowComment();\n this.state.hasFlowComment = true;\n return;\n }\n\n if (this.state.hasFlowComment) {\n const end = this.input.indexOf(\"*-/\", (this.state.pos += 2));\n if (end === -1) {\n throw this.raise(this.state.pos - 2, Errors.UnterminatedComment);\n }\n this.state.pos = end + 3;\n return;\n }\n\n super.skipBlockComment();\n }\n\n skipFlowComment(): number | boolean {\n const { pos } = this.state;\n let shiftToFirstNonWhiteSpace = 2;\n while (\n [charCodes.space, charCodes.tab].includes(\n this.input.charCodeAt(pos + shiftToFirstNonWhiteSpace),\n )\n ) {\n shiftToFirstNonWhiteSpace++;\n }\n\n const ch2 = this.input.charCodeAt(shiftToFirstNonWhiteSpace + pos);\n const ch3 = this.input.charCodeAt(shiftToFirstNonWhiteSpace + pos + 1);\n\n if (ch2 === charCodes.colon && ch3 === charCodes.colon) {\n return shiftToFirstNonWhiteSpace + 2; // check for /*::\n }\n if (\n this.input.slice(\n shiftToFirstNonWhiteSpace + pos,\n shiftToFirstNonWhiteSpace + pos + 12,\n ) === \"flow-include\"\n ) {\n return shiftToFirstNonWhiteSpace + 12; // check for /*flow-include\n }\n if (ch2 === charCodes.colon && ch3 !== charCodes.colon) {\n return shiftToFirstNonWhiteSpace; // check for /*:, advance up to :\n }\n return false;\n }\n\n hasFlowCommentCompletion(): void {\n const end = this.input.indexOf(\"*/\", this.state.pos);\n if (end === -1) {\n throw this.raise(this.state.pos, Errors.UnterminatedComment);\n }\n }\n\n // Flow enum parsing\n\n flowEnumErrorBooleanMemberNotInitialized(\n pos: number,\n { enumName, memberName }: { enumName: string, memberName: string },\n ): void {\n this.raise(\n pos,\n FlowErrors.EnumBooleanMemberNotInitialized,\n memberName,\n enumName,\n );\n }\n\n flowEnumErrorInvalidMemberName(\n pos: number,\n { enumName, memberName }: { enumName: string, memberName: string },\n ): void {\n const suggestion = memberName[0].toUpperCase() + memberName.slice(1);\n this.raise(\n pos,\n FlowErrors.EnumInvalidMemberName,\n memberName,\n suggestion,\n enumName,\n );\n }\n\n flowEnumErrorDuplicateMemberName(\n pos: number,\n { enumName, memberName }: { enumName: string, memberName: string },\n ): void {\n this.raise(pos, FlowErrors.EnumDuplicateMemberName, memberName, enumName);\n }\n\n flowEnumErrorInconsistentMemberValues(\n pos: number,\n { enumName }: { enumName: string },\n ): void {\n this.raise(pos, FlowErrors.EnumInconsistentMemberValues, enumName);\n }\n\n flowEnumErrorInvalidExplicitType(\n pos: number,\n {\n enumName,\n suppliedType,\n }: { enumName: string, suppliedType: null | string },\n ) {\n return this.raise(\n pos,\n suppliedType === null\n ? FlowErrors.EnumInvalidExplicitTypeUnknownSupplied\n : FlowErrors.EnumInvalidExplicitType,\n enumName,\n suppliedType,\n );\n }\n\n flowEnumErrorInvalidMemberInitializer(\n pos: number,\n { enumName, explicitType, memberName }: EnumContext,\n ) {\n let message = null;\n switch (explicitType) {\n case \"boolean\":\n case \"number\":\n case \"string\":\n message = FlowErrors.EnumInvalidMemberInitializerPrimaryType;\n break;\n case \"symbol\":\n message = FlowErrors.EnumInvalidMemberInitializerSymbolType;\n break;\n default:\n // null\n message = FlowErrors.EnumInvalidMemberInitializerUnknownType;\n }\n return this.raise(pos, message, enumName, memberName, explicitType);\n }\n\n flowEnumErrorNumberMemberNotInitialized(\n pos: number,\n { enumName, memberName }: { enumName: string, memberName: string },\n ): void {\n this.raise(\n pos,\n FlowErrors.EnumNumberMemberNotInitialized,\n enumName,\n memberName,\n );\n }\n\n flowEnumErrorStringMemberInconsistentlyInitailized(\n pos: number,\n { enumName }: { enumName: string },\n ): void {\n this.raise(\n pos,\n FlowErrors.EnumStringMemberInconsistentlyInitailized,\n enumName,\n );\n }\n\n flowEnumMemberInit(): EnumMemberInit {\n const startPos = this.state.start;\n const endOfInit = () => this.match(tt.comma) || this.match(tt.braceR);\n switch (this.state.type) {\n case tt.num: {\n const literal = this.parseNumericLiteral(this.state.value);\n if (endOfInit()) {\n return { type: \"number\", pos: literal.start, value: literal };\n }\n return { type: \"invalid\", pos: startPos };\n }\n case tt.string: {\n const literal = this.parseStringLiteral(this.state.value);\n if (endOfInit()) {\n return { type: \"string\", pos: literal.start, value: literal };\n }\n return { type: \"invalid\", pos: startPos };\n }\n case tt._true:\n case tt._false: {\n const literal = this.parseBooleanLiteral(this.match(tt._true));\n if (endOfInit()) {\n return {\n type: \"boolean\",\n pos: literal.start,\n value: literal,\n };\n }\n return { type: \"invalid\", pos: startPos };\n }\n default:\n return { type: \"invalid\", pos: startPos };\n }\n }\n\n flowEnumMemberRaw(): { id: N.Node, init: EnumMemberInit } {\n const pos = this.state.start;\n const id = this.parseIdentifier(true);\n const init = this.eat(tt.eq)\n ? this.flowEnumMemberInit()\n : { type: \"none\", pos };\n return { id, init };\n }\n\n flowEnumCheckExplicitTypeMismatch(\n pos: number,\n context: EnumContext,\n expectedType: EnumExplicitType,\n ): void {\n const { explicitType } = context;\n if (explicitType === null) {\n return;\n }\n if (explicitType !== expectedType) {\n this.flowEnumErrorInvalidMemberInitializer(pos, context);\n }\n }\n\n flowEnumMembers({\n enumName,\n explicitType,\n }: {\n enumName: string,\n explicitType: EnumExplicitType,\n }): {|\n members: {|\n booleanMembers: Array<N.Node>,\n numberMembers: Array<N.Node>,\n stringMembers: Array<N.Node>,\n defaultedMembers: Array<N.Node>,\n |},\n hasUnknownMembers: boolean,\n |} {\n const seenNames = new Set();\n const members = {\n booleanMembers: [],\n numberMembers: [],\n stringMembers: [],\n defaultedMembers: [],\n };\n let hasUnknownMembers = false;\n while (!this.match(tt.braceR)) {\n if (this.eat(tt.ellipsis)) {\n hasUnknownMembers = true;\n break;\n }\n const memberNode = this.startNode();\n const { id, init } = this.flowEnumMemberRaw();\n const memberName = id.name;\n if (memberName === \"\") {\n continue;\n }\n if (/^[a-z]/.test(memberName)) {\n this.flowEnumErrorInvalidMemberName(id.start, {\n enumName,\n memberName,\n });\n }\n if (seenNames.has(memberName)) {\n this.flowEnumErrorDuplicateMemberName(id.start, {\n enumName,\n memberName,\n });\n }\n seenNames.add(memberName);\n const context = { enumName, explicitType, memberName };\n memberNode.id = id;\n switch (init.type) {\n case \"boolean\": {\n this.flowEnumCheckExplicitTypeMismatch(\n init.pos,\n context,\n \"boolean\",\n );\n memberNode.init = init.value;\n members.booleanMembers.push(\n this.finishNode(memberNode, \"EnumBooleanMember\"),\n );\n break;\n }\n case \"number\": {\n this.flowEnumCheckExplicitTypeMismatch(init.pos, context, \"number\");\n memberNode.init = init.value;\n members.numberMembers.push(\n this.finishNode(memberNode, \"EnumNumberMember\"),\n );\n break;\n }\n case \"string\": {\n this.flowEnumCheckExplicitTypeMismatch(init.pos, context, \"string\");\n memberNode.init = init.value;\n members.stringMembers.push(\n this.finishNode(memberNode, \"EnumStringMember\"),\n );\n break;\n }\n case \"invalid\": {\n throw this.flowEnumErrorInvalidMemberInitializer(init.pos, context);\n }\n case \"none\": {\n switch (explicitType) {\n case \"boolean\":\n this.flowEnumErrorBooleanMemberNotInitialized(\n init.pos,\n context,\n );\n break;\n case \"number\":\n this.flowEnumErrorNumberMemberNotInitialized(init.pos, context);\n break;\n default:\n members.defaultedMembers.push(\n this.finishNode(memberNode, \"EnumDefaultedMember\"),\n );\n }\n }\n }\n\n if (!this.match(tt.braceR)) {\n this.expect(tt.comma);\n }\n }\n return { members, hasUnknownMembers };\n }\n\n flowEnumStringMembers(\n initializedMembers: Array<N.Node>,\n defaultedMembers: Array<N.Node>,\n { enumName }: { enumName: string },\n ): Array<N.Node> {\n if (initializedMembers.length === 0) {\n return defaultedMembers;\n } else if (defaultedMembers.length === 0) {\n return initializedMembers;\n } else if (defaultedMembers.length > initializedMembers.length) {\n for (const member of initializedMembers) {\n this.flowEnumErrorStringMemberInconsistentlyInitailized(\n member.start,\n { enumName },\n );\n }\n return defaultedMembers;\n } else {\n for (const member of defaultedMembers) {\n this.flowEnumErrorStringMemberInconsistentlyInitailized(\n member.start,\n { enumName },\n );\n }\n return initializedMembers;\n }\n }\n\n flowEnumParseExplicitType({\n enumName,\n }: {\n enumName: string,\n }): EnumExplicitType {\n if (this.eatContextual(\"of\")) {\n if (!this.match(tt.name)) {\n throw this.flowEnumErrorInvalidExplicitType(this.state.start, {\n enumName,\n suppliedType: null,\n });\n }\n\n const { value } = this.state;\n this.next();\n\n if (\n value !== \"boolean\" &&\n value !== \"number\" &&\n value !== \"string\" &&\n value !== \"symbol\"\n ) {\n this.flowEnumErrorInvalidExplicitType(this.state.start, {\n enumName,\n suppliedType: value,\n });\n }\n\n return value;\n }\n return null;\n }\n\n flowEnumBody(node: N.Node, { enumName, nameLoc }): N.Node {\n const explicitType = this.flowEnumParseExplicitType({ enumName });\n this.expect(tt.braceL);\n const { members, hasUnknownMembers } = this.flowEnumMembers({\n enumName,\n explicitType,\n });\n node.hasUnknownMembers = hasUnknownMembers;\n\n switch (explicitType) {\n case \"boolean\":\n node.explicitType = true;\n node.members = members.booleanMembers;\n this.expect(tt.braceR);\n return this.finishNode(node, \"EnumBooleanBody\");\n case \"number\":\n node.explicitType = true;\n node.members = members.numberMembers;\n this.expect(tt.braceR);\n return this.finishNode(node, \"EnumNumberBody\");\n case \"string\":\n node.explicitType = true;\n node.members = this.flowEnumStringMembers(\n members.stringMembers,\n members.defaultedMembers,\n { enumName },\n );\n this.expect(tt.braceR);\n return this.finishNode(node, \"EnumStringBody\");\n case \"symbol\":\n node.members = members.defaultedMembers;\n this.expect(tt.braceR);\n return this.finishNode(node, \"EnumSymbolBody\");\n default: {\n // `explicitType` is `null`\n const empty = () => {\n node.members = [];\n this.expect(tt.braceR);\n return this.finishNode(node, \"EnumStringBody\");\n };\n node.explicitType = false;\n\n const boolsLen = members.booleanMembers.length;\n const numsLen = members.numberMembers.length;\n const strsLen = members.stringMembers.length;\n const defaultedLen = members.defaultedMembers.length;\n\n if (!boolsLen && !numsLen && !strsLen && !defaultedLen) {\n return empty();\n } else if (!boolsLen && !numsLen) {\n node.members = this.flowEnumStringMembers(\n members.stringMembers,\n members.defaultedMembers,\n { enumName },\n );\n this.expect(tt.braceR);\n return this.finishNode(node, \"EnumStringBody\");\n } else if (!numsLen && !strsLen && boolsLen >= defaultedLen) {\n for (const member of members.defaultedMembers) {\n this.flowEnumErrorBooleanMemberNotInitialized(member.start, {\n enumName,\n memberName: member.id.name,\n });\n }\n node.members = members.booleanMembers;\n this.expect(tt.braceR);\n return this.finishNode(node, \"EnumBooleanBody\");\n } else if (!boolsLen && !strsLen && numsLen >= defaultedLen) {\n for (const member of members.defaultedMembers) {\n this.flowEnumErrorNumberMemberNotInitialized(member.start, {\n enumName,\n memberName: member.id.name,\n });\n }\n node.members = members.numberMembers;\n this.expect(tt.braceR);\n return this.finishNode(node, \"EnumNumberBody\");\n } else {\n this.flowEnumErrorInconsistentMemberValues(nameLoc, { enumName });\n return empty();\n }\n }\n }\n }\n\n flowParseEnumDeclaration(node: N.Node): N.Node {\n const id = this.parseIdentifier();\n node.id = id;\n node.body = this.flowEnumBody(this.startNode(), {\n enumName: id.name,\n nameLoc: id.start,\n });\n return this.finishNode(node, \"EnumDeclaration\");\n }\n\n // check if the next token is a tt.relation(\"<\")\n isLookaheadToken_lt(): boolean {\n const next = this.nextTokenStart();\n if (this.input.charCodeAt(next) === charCodes.lessThan) {\n const afterNext = this.input.charCodeAt(next + 1);\n return (\n afterNext !== charCodes.lessThan && afterNext !== charCodes.equalsTo\n );\n }\n return false;\n }\n\n maybeUnwrapTypeCastExpression(node: N.Node) {\n return node.type === \"TypeCastExpression\" ? node.expression : node;\n }\n };\n","// @flow\n\nconst entities: { [name: string]: string } = {\n quot: \"\\u0022\",\n amp: \"&\",\n apos: \"\\u0027\",\n lt: \"<\",\n gt: \">\",\n nbsp: \"\\u00A0\",\n iexcl: \"\\u00A1\",\n cent: \"\\u00A2\",\n pound: \"\\u00A3\",\n curren: \"\\u00A4\",\n yen: \"\\u00A5\",\n brvbar: \"\\u00A6\",\n sect: \"\\u00A7\",\n uml: \"\\u00A8\",\n copy: \"\\u00A9\",\n ordf: \"\\u00AA\",\n laquo: \"\\u00AB\",\n not: \"\\u00AC\",\n shy: \"\\u00AD\",\n reg: \"\\u00AE\",\n macr: \"\\u00AF\",\n deg: \"\\u00B0\",\n plusmn: \"\\u00B1\",\n sup2: \"\\u00B2\",\n sup3: \"\\u00B3\",\n acute: \"\\u00B4\",\n micro: \"\\u00B5\",\n para: \"\\u00B6\",\n middot: \"\\u00B7\",\n cedil: \"\\u00B8\",\n sup1: \"\\u00B9\",\n ordm: \"\\u00BA\",\n raquo: \"\\u00BB\",\n frac14: \"\\u00BC\",\n frac12: \"\\u00BD\",\n frac34: \"\\u00BE\",\n iquest: \"\\u00BF\",\n Agrave: \"\\u00C0\",\n Aacute: \"\\u00C1\",\n Acirc: \"\\u00C2\",\n Atilde: \"\\u00C3\",\n Auml: \"\\u00C4\",\n Aring: \"\\u00C5\",\n AElig: \"\\u00C6\",\n Ccedil: \"\\u00C7\",\n Egrave: \"\\u00C8\",\n Eacute: \"\\u00C9\",\n Ecirc: \"\\u00CA\",\n Euml: \"\\u00CB\",\n Igrave: \"\\u00CC\",\n Iacute: \"\\u00CD\",\n Icirc: \"\\u00CE\",\n Iuml: \"\\u00CF\",\n ETH: \"\\u00D0\",\n Ntilde: \"\\u00D1\",\n Ograve: \"\\u00D2\",\n Oacute: \"\\u00D3\",\n Ocirc: \"\\u00D4\",\n Otilde: \"\\u00D5\",\n Ouml: \"\\u00D6\",\n times: \"\\u00D7\",\n Oslash: \"\\u00D8\",\n Ugrave: \"\\u00D9\",\n Uacute: \"\\u00DA\",\n Ucirc: \"\\u00DB\",\n Uuml: \"\\u00DC\",\n Yacute: \"\\u00DD\",\n THORN: \"\\u00DE\",\n szlig: \"\\u00DF\",\n agrave: \"\\u00E0\",\n aacute: \"\\u00E1\",\n acirc: \"\\u00E2\",\n atilde: \"\\u00E3\",\n auml: \"\\u00E4\",\n aring: \"\\u00E5\",\n aelig: \"\\u00E6\",\n ccedil: \"\\u00E7\",\n egrave: \"\\u00E8\",\n eacute: \"\\u00E9\",\n ecirc: \"\\u00EA\",\n euml: \"\\u00EB\",\n igrave: \"\\u00EC\",\n iacute: \"\\u00ED\",\n icirc: \"\\u00EE\",\n iuml: \"\\u00EF\",\n eth: \"\\u00F0\",\n ntilde: \"\\u00F1\",\n ograve: \"\\u00F2\",\n oacute: \"\\u00F3\",\n ocirc: \"\\u00F4\",\n otilde: \"\\u00F5\",\n ouml: \"\\u00F6\",\n divide: \"\\u00F7\",\n oslash: \"\\u00F8\",\n ugrave: \"\\u00F9\",\n uacute: \"\\u00FA\",\n ucirc: \"\\u00FB\",\n uuml: \"\\u00FC\",\n yacute: \"\\u00FD\",\n thorn: \"\\u00FE\",\n yuml: \"\\u00FF\",\n OElig: \"\\u0152\",\n oelig: \"\\u0153\",\n Scaron: \"\\u0160\",\n scaron: \"\\u0161\",\n Yuml: \"\\u0178\",\n fnof: \"\\u0192\",\n circ: \"\\u02C6\",\n tilde: \"\\u02DC\",\n Alpha: \"\\u0391\",\n Beta: \"\\u0392\",\n Gamma: \"\\u0393\",\n Delta: \"\\u0394\",\n Epsilon: \"\\u0395\",\n Zeta: \"\\u0396\",\n Eta: \"\\u0397\",\n Theta: \"\\u0398\",\n Iota: \"\\u0399\",\n Kappa: \"\\u039A\",\n Lambda: \"\\u039B\",\n Mu: \"\\u039C\",\n Nu: \"\\u039D\",\n Xi: \"\\u039E\",\n Omicron: \"\\u039F\",\n Pi: \"\\u03A0\",\n Rho: \"\\u03A1\",\n Sigma: \"\\u03A3\",\n Tau: \"\\u03A4\",\n Upsilon: \"\\u03A5\",\n Phi: \"\\u03A6\",\n Chi: \"\\u03A7\",\n Psi: \"\\u03A8\",\n Omega: \"\\u03A9\",\n alpha: \"\\u03B1\",\n beta: \"\\u03B2\",\n gamma: \"\\u03B3\",\n delta: \"\\u03B4\",\n epsilon: \"\\u03B5\",\n zeta: \"\\u03B6\",\n eta: \"\\u03B7\",\n theta: \"\\u03B8\",\n iota: \"\\u03B9\",\n kappa: \"\\u03BA\",\n lambda: \"\\u03BB\",\n mu: \"\\u03BC\",\n nu: \"\\u03BD\",\n xi: \"\\u03BE\",\n omicron: \"\\u03BF\",\n pi: \"\\u03C0\",\n rho: \"\\u03C1\",\n sigmaf: \"\\u03C2\",\n sigma: \"\\u03C3\",\n tau: \"\\u03C4\",\n upsilon: \"\\u03C5\",\n phi: \"\\u03C6\",\n chi: \"\\u03C7\",\n psi: \"\\u03C8\",\n omega: \"\\u03C9\",\n thetasym: \"\\u03D1\",\n upsih: \"\\u03D2\",\n piv: \"\\u03D6\",\n ensp: \"\\u2002\",\n emsp: \"\\u2003\",\n thinsp: \"\\u2009\",\n zwnj: \"\\u200C\",\n zwj: \"\\u200D\",\n lrm: \"\\u200E\",\n rlm: \"\\u200F\",\n ndash: \"\\u2013\",\n mdash: \"\\u2014\",\n lsquo: \"\\u2018\",\n rsquo: \"\\u2019\",\n sbquo: \"\\u201A\",\n ldquo: \"\\u201C\",\n rdquo: \"\\u201D\",\n bdquo: \"\\u201E\",\n dagger: \"\\u2020\",\n Dagger: \"\\u2021\",\n bull: \"\\u2022\",\n hellip: \"\\u2026\",\n permil: \"\\u2030\",\n prime: \"\\u2032\",\n Prime: \"\\u2033\",\n lsaquo: \"\\u2039\",\n rsaquo: \"\\u203A\",\n oline: \"\\u203E\",\n frasl: \"\\u2044\",\n euro: \"\\u20AC\",\n image: \"\\u2111\",\n weierp: \"\\u2118\",\n real: \"\\u211C\",\n trade: \"\\u2122\",\n alefsym: \"\\u2135\",\n larr: \"\\u2190\",\n uarr: \"\\u2191\",\n rarr: \"\\u2192\",\n darr: \"\\u2193\",\n harr: \"\\u2194\",\n crarr: \"\\u21B5\",\n lArr: \"\\u21D0\",\n uArr: \"\\u21D1\",\n rArr: \"\\u21D2\",\n dArr: \"\\u21D3\",\n hArr: \"\\u21D4\",\n forall: \"\\u2200\",\n part: \"\\u2202\",\n exist: \"\\u2203\",\n empty: \"\\u2205\",\n nabla: \"\\u2207\",\n isin: \"\\u2208\",\n notin: \"\\u2209\",\n ni: \"\\u220B\",\n prod: \"\\u220F\",\n sum: \"\\u2211\",\n minus: \"\\u2212\",\n lowast: \"\\u2217\",\n radic: \"\\u221A\",\n prop: \"\\u221D\",\n infin: \"\\u221E\",\n ang: \"\\u2220\",\n and: \"\\u2227\",\n or: \"\\u2228\",\n cap: \"\\u2229\",\n cup: \"\\u222A\",\n int: \"\\u222B\",\n there4: \"\\u2234\",\n sim: \"\\u223C\",\n cong: \"\\u2245\",\n asymp: \"\\u2248\",\n ne: \"\\u2260\",\n equiv: \"\\u2261\",\n le: \"\\u2264\",\n ge: \"\\u2265\",\n sub: \"\\u2282\",\n sup: \"\\u2283\",\n nsub: \"\\u2284\",\n sube: \"\\u2286\",\n supe: \"\\u2287\",\n oplus: \"\\u2295\",\n otimes: \"\\u2297\",\n perp: \"\\u22A5\",\n sdot: \"\\u22C5\",\n lceil: \"\\u2308\",\n rceil: \"\\u2309\",\n lfloor: \"\\u230A\",\n rfloor: \"\\u230B\",\n lang: \"\\u2329\",\n rang: \"\\u232A\",\n loz: \"\\u25CA\",\n spades: \"\\u2660\",\n clubs: \"\\u2663\",\n hearts: \"\\u2665\",\n diams: \"\\u2666\",\n};\nexport default entities;\n","// @flow\n\nimport type { Options } from \"../options\";\nimport * as N from \"../types\";\nimport { Position } from \"../util/location\";\n\nimport { types as ct, type TokContext } from \"./context\";\nimport { types as tt, type TokenType } from \"./types\";\nimport type { ParsingError, ErrorTemplate } from \"../parser/error\";\n\ntype TopicContextState = {\n // When a topic binding has been currently established,\n // then this is 1. Otherwise, it is 0. This is forwards compatible\n // with a future plugin for multiple lexical topics.\n maxNumOfResolvableTopics: number,\n\n // When a topic binding has been currently established, and if that binding\n // has been used as a topic reference `#`, then this is 0. Otherwise, it is\n // `null`. This is forwards compatible with a future plugin for multiple\n // lexical topics.\n maxTopicIndex: null | 0,\n};\n\nexport default class State {\n strict: boolean;\n curLine: number;\n\n // And, if locations are used, the {line, column} object\n // corresponding to those offsets\n startLoc: Position;\n endLoc: Position;\n\n init(options: Options): void {\n this.strict =\n options.strictMode === false ? false : options.sourceType === \"module\";\n\n this.curLine = options.startLine;\n this.startLoc = this.endLoc = this.curPosition();\n }\n\n errors: ParsingError[] = [];\n\n // Used to signify the start of a potential arrow function\n potentialArrowAt: number = -1;\n\n // Used to signify the start of an expression which looks like a\n // typed arrow function, but it isn't\n // e.g. a ? (b) : c => d\n // ^\n noArrowAt: number[] = [];\n\n // Used to signify the start of an expression whose params, if it looks like\n // an arrow function, shouldn't be converted to assignable nodes.\n // This is used to defer the validation of typed arrow functions inside\n // conditional expressions.\n // e.g. a ? (b) : c => d\n // ^\n noArrowParamsConversionAt: number[] = [];\n\n // Flags to track\n maybeInArrowParameters: boolean = false;\n inPipeline: boolean = false;\n inType: boolean = false;\n noAnonFunctionType: boolean = false;\n inPropertyName: boolean = false;\n hasFlowComment: boolean = false;\n isAmbientContext: boolean = false;\n inAbstractClass: boolean = false;\n\n // For the smartPipelines plugin:\n topicContext: TopicContextState = {\n maxNumOfResolvableTopics: 0,\n maxTopicIndex: null,\n };\n\n // For the F# plugin\n soloAwait: boolean = false;\n inFSharpPipelineDirectBody: boolean = false;\n\n // Labels in scope.\n labels: Array<{\n kind: ?(\"loop\" | \"switch\"),\n name?: ?string,\n statementStart?: number,\n }> = [];\n\n // Leading decorators. Last element of the stack represents the decorators in current context.\n // Supports nesting of decorators, e.g. @foo(@bar class inner {}) class outer {}\n // where @foo belongs to the outer class and @bar to the inner\n decoratorStack: Array<Array<N.Decorator>> = [[]];\n\n // Comment store.\n comments: Array<N.Comment> = [];\n\n // Comment attachment store\n trailingComments: Array<N.Comment> = [];\n leadingComments: Array<N.Comment> = [];\n commentStack: Array<{\n start: number,\n leadingComments: ?Array<N.Comment>,\n trailingComments: ?Array<N.Comment>,\n type: string,\n }> = [];\n // $FlowIgnore this is initialized when the parser starts.\n commentPreviousNode: N.Node = null;\n\n // The current position of the tokenizer in the input.\n pos: number = 0;\n lineStart: number = 0;\n\n // Properties of the current token:\n // Its type\n type: TokenType = tt.eof;\n\n // For tokens that include more information than their type, the value\n value: any = null;\n\n // Its start and end offset\n start: number = 0;\n end: number = 0;\n\n // Position information for the previous token\n // $FlowIgnore this is initialized when generating the second token.\n lastTokEndLoc: Position = null;\n // $FlowIgnore this is initialized when generating the second token.\n lastTokStartLoc: Position = null;\n lastTokStart: number = 0;\n lastTokEnd: number = 0;\n\n // The context stack is used to superficially track syntactic\n // context to predict whether a regular expression is allowed in a\n // given position.\n context: Array<TokContext> = [ct.brace];\n exprAllowed: boolean = true;\n\n // Used to signal to callers of `readWord1` whether the word\n // contained any escape sequences. This is needed because words with\n // escape sequences must not be interpreted as keywords.\n containsEsc: boolean = false;\n\n // This property is used to track the following errors\n // - StrictNumericEscape\n // - StrictOctalLiteral\n //\n // in a literal that occurs prior to/immediately after a \"use strict\" directive.\n\n // todo(JLHwung): set strictErrors to null and avoid recording string errors\n // after a non-directive is parsed\n strictErrors: Map<number, ErrorTemplate> = new Map();\n\n // Tokens length in token store\n tokensLength: number = 0;\n\n curPosition(): Position {\n return new Position(this.curLine, this.pos - this.lineStart);\n }\n\n clone(skipArrays?: boolean): State {\n const state = new State();\n const keys = Object.keys(this);\n for (let i = 0, length = keys.length; i < length; i++) {\n const key = keys[i];\n // $FlowIgnore\n let val = this[key];\n\n if (!skipArrays && Array.isArray(val)) {\n val = val.slice();\n }\n\n // $FlowIgnore\n state[key] = val;\n }\n\n return state;\n }\n}\n\nexport type LookaheadState = {\n pos: number,\n value: any,\n type: TokenType,\n start: number,\n end: number,\n /* Used only in readToken_mult_modulo */\n inType: boolean,\n};\n","// @flow\n\n// Error messages are colocated with the plugin.\n/* eslint-disable @babel/development-internal/dry-error-messages */\n\nimport * as charCodes from \"charcodes\";\n\nimport XHTMLEntities from \"./xhtml\";\nimport type Parser from \"../../parser\";\nimport type { ExpressionErrors } from \"../../parser/util\";\nimport { TokenType, types as tt } from \"../../tokenizer/types\";\nimport { TokContext, types as tc } from \"../../tokenizer/context\";\nimport * as N from \"../../types\";\nimport { isIdentifierChar, isIdentifierStart } from \"../../util/identifier\";\nimport type { Position } from \"../../util/location\";\nimport { isNewLine } from \"../../util/whitespace\";\nimport { Errors, makeErrorTemplates, ErrorCodes } from \"../../parser/error\";\nimport type { LookaheadState } from \"../../tokenizer/state\";\nimport State from \"../../tokenizer/state\";\n\ntype JSXLookaheadState = LookaheadState & { inPropertyName: boolean };\n\nconst HEX_NUMBER = /^[\\da-fA-F]+$/;\nconst DECIMAL_NUMBER = /^\\d+$/;\n\n/* eslint sort-keys: \"error\" */\nconst JsxErrors = makeErrorTemplates(\n {\n AttributeIsEmpty:\n \"JSX attributes must only be assigned a non-empty expression.\",\n MissingClosingTagElement:\n \"Expected corresponding JSX closing tag for <%0>.\",\n MissingClosingTagFragment: \"Expected corresponding JSX closing tag for <>.\",\n UnexpectedSequenceExpression:\n \"Sequence expressions cannot be directly nested inside JSX. Did you mean to wrap it in parentheses (...)?\",\n UnsupportedJsxValue:\n \"JSX value should be either an expression or a quoted JSX text.\",\n UnterminatedJsxContent: \"Unterminated JSX contents.\",\n UnwrappedAdjacentJSXElements:\n \"Adjacent JSX elements must be wrapped in an enclosing tag. Did you want a JSX fragment <>...</>?\",\n },\n /* code */ ErrorCodes.SyntaxError,\n);\n/* eslint-disable sort-keys */\n\n// Be aware that this file is always executed and not only when the plugin is enabled.\n// Therefore this contexts and tokens do always exist.\ntc.j_oTag = new TokContext(\"<tag\");\ntc.j_cTag = new TokContext(\"</tag\");\ntc.j_expr = new TokContext(\"<tag>...</tag>\", true);\n\ntt.jsxName = new TokenType(\"jsxName\");\ntt.jsxText = new TokenType(\"jsxText\", { beforeExpr: true });\ntt.jsxTagStart = new TokenType(\"jsxTagStart\", { startsExpr: true });\ntt.jsxTagEnd = new TokenType(\"jsxTagEnd\");\n\ntt.jsxTagStart.updateContext = context => {\n context.push(tc.j_expr); // treat as beginning of JSX expression\n context.push(tc.j_oTag); // start opening tag context\n};\n\nfunction isFragment(object: ?N.JSXElement): boolean {\n return object\n ? object.type === \"JSXOpeningFragment\" ||\n object.type === \"JSXClosingFragment\"\n : false;\n}\n\n// Transforms JSX element name to string.\n\nfunction getQualifiedJSXName(\n object: N.JSXIdentifier | N.JSXNamespacedName | N.JSXMemberExpression,\n): string {\n if (object.type === \"JSXIdentifier\") {\n return object.name;\n }\n\n if (object.type === \"JSXNamespacedName\") {\n return object.namespace.name + \":\" + object.name.name;\n }\n\n if (object.type === \"JSXMemberExpression\") {\n return (\n getQualifiedJSXName(object.object) +\n \".\" +\n getQualifiedJSXName(object.property)\n );\n }\n\n // istanbul ignore next\n throw new Error(\"Node had unexpected type: \" + object.type);\n}\n\nexport default (superClass: Class<Parser>): Class<Parser> =>\n class extends superClass {\n // Reads inline JSX contents token.\n\n jsxReadToken(): void {\n let out = \"\";\n let chunkStart = this.state.pos;\n for (;;) {\n if (this.state.pos >= this.length) {\n throw this.raise(this.state.start, JsxErrors.UnterminatedJsxContent);\n }\n\n const ch = this.input.charCodeAt(this.state.pos);\n\n switch (ch) {\n case charCodes.lessThan:\n case charCodes.leftCurlyBrace:\n if (this.state.pos === this.state.start) {\n if (ch === charCodes.lessThan && this.state.exprAllowed) {\n ++this.state.pos;\n return this.finishToken(tt.jsxTagStart);\n }\n return super.getTokenFromCode(ch);\n }\n out += this.input.slice(chunkStart, this.state.pos);\n return this.finishToken(tt.jsxText, out);\n\n case charCodes.ampersand:\n out += this.input.slice(chunkStart, this.state.pos);\n out += this.jsxReadEntity();\n chunkStart = this.state.pos;\n break;\n\n case charCodes.greaterThan:\n case charCodes.rightCurlyBrace:\n if (process.env.BABEL_8_BREAKING) {\n const htmlEntity =\n ch === charCodes.rightCurlyBrace ? \"&rbrace;\" : \"&gt;\";\n const char = this.input[this.state.pos];\n this.raise(this.state.pos, {\n code: ErrorCodes.SyntaxError,\n reasonCode: \"UnexpectedToken\",\n template: `Unexpected token \\`${char}\\`. Did you mean \\`${htmlEntity}\\` or \\`{'${char}'}\\`?`,\n });\n }\n /* falls through */\n\n default:\n if (isNewLine(ch)) {\n out += this.input.slice(chunkStart, this.state.pos);\n out += this.jsxReadNewLine(true);\n chunkStart = this.state.pos;\n } else {\n ++this.state.pos;\n }\n }\n }\n }\n\n jsxReadNewLine(normalizeCRLF: boolean): string {\n const ch = this.input.charCodeAt(this.state.pos);\n let out;\n ++this.state.pos;\n if (\n ch === charCodes.carriageReturn &&\n this.input.charCodeAt(this.state.pos) === charCodes.lineFeed\n ) {\n ++this.state.pos;\n out = normalizeCRLF ? \"\\n\" : \"\\r\\n\";\n } else {\n out = String.fromCharCode(ch);\n }\n ++this.state.curLine;\n this.state.lineStart = this.state.pos;\n\n return out;\n }\n\n jsxReadString(quote: number): void {\n let out = \"\";\n let chunkStart = ++this.state.pos;\n for (;;) {\n if (this.state.pos >= this.length) {\n throw this.raise(this.state.start, Errors.UnterminatedString);\n }\n\n const ch = this.input.charCodeAt(this.state.pos);\n if (ch === quote) break;\n if (ch === charCodes.ampersand) {\n out += this.input.slice(chunkStart, this.state.pos);\n out += this.jsxReadEntity();\n chunkStart = this.state.pos;\n } else if (isNewLine(ch)) {\n out += this.input.slice(chunkStart, this.state.pos);\n out += this.jsxReadNewLine(false);\n chunkStart = this.state.pos;\n } else {\n ++this.state.pos;\n }\n }\n out += this.input.slice(chunkStart, this.state.pos++);\n return this.finishToken(tt.string, out);\n }\n\n jsxReadEntity(): string {\n let str = \"\";\n let count = 0;\n let entity;\n let ch = this.input[this.state.pos];\n\n const startPos = ++this.state.pos;\n while (this.state.pos < this.length && count++ < 10) {\n ch = this.input[this.state.pos++];\n if (ch === \";\") {\n if (str[0] === \"#\") {\n if (str[1] === \"x\") {\n str = str.substr(2);\n if (HEX_NUMBER.test(str)) {\n entity = String.fromCodePoint(parseInt(str, 16));\n }\n } else {\n str = str.substr(1);\n if (DECIMAL_NUMBER.test(str)) {\n entity = String.fromCodePoint(parseInt(str, 10));\n }\n }\n } else {\n entity = XHTMLEntities[str];\n }\n break;\n }\n str += ch;\n }\n if (!entity) {\n this.state.pos = startPos;\n return \"&\";\n }\n return entity;\n }\n\n // Read a JSX identifier (valid tag or attribute name).\n //\n // Optimized version since JSX identifiers can\"t contain\n // escape characters and so can be read as single slice.\n // Also assumes that first character was already checked\n // by isIdentifierStart in readToken.\n\n jsxReadWord(): void {\n let ch;\n const start = this.state.pos;\n do {\n ch = this.input.charCodeAt(++this.state.pos);\n } while (isIdentifierChar(ch) || ch === charCodes.dash);\n return this.finishToken(\n tt.jsxName,\n this.input.slice(start, this.state.pos),\n );\n }\n\n // Parse next token as JSX identifier\n\n jsxParseIdentifier(): N.JSXIdentifier {\n const node = this.startNode();\n if (this.match(tt.jsxName)) {\n node.name = this.state.value;\n } else if (this.state.type.keyword) {\n node.name = this.state.type.keyword;\n } else {\n this.unexpected();\n }\n this.next();\n return this.finishNode(node, \"JSXIdentifier\");\n }\n\n // Parse namespaced identifier.\n\n jsxParseNamespacedName(): N.JSXNamespacedName {\n const startPos = this.state.start;\n const startLoc = this.state.startLoc;\n const name = this.jsxParseIdentifier();\n if (!this.eat(tt.colon)) return name;\n\n const node = this.startNodeAt(startPos, startLoc);\n node.namespace = name;\n node.name = this.jsxParseIdentifier();\n return this.finishNode(node, \"JSXNamespacedName\");\n }\n\n // Parses element name in any form - namespaced, member\n // or single identifier.\n\n jsxParseElementName():\n | N.JSXIdentifier\n | N.JSXNamespacedName\n | N.JSXMemberExpression {\n const startPos = this.state.start;\n const startLoc = this.state.startLoc;\n let node = this.jsxParseNamespacedName();\n if (node.type === \"JSXNamespacedName\") {\n return node;\n }\n while (this.eat(tt.dot)) {\n const newNode = this.startNodeAt(startPos, startLoc);\n newNode.object = node;\n newNode.property = this.jsxParseIdentifier();\n node = this.finishNode(newNode, \"JSXMemberExpression\");\n }\n return node;\n }\n\n // Parses any type of JSX attribute value.\n\n jsxParseAttributeValue(): N.Expression {\n let node;\n switch (this.state.type) {\n case tt.braceL:\n node = this.startNode();\n this.next();\n node = this.jsxParseExpressionContainer(node);\n if (node.expression.type === \"JSXEmptyExpression\") {\n this.raise(node.start, JsxErrors.AttributeIsEmpty);\n }\n return node;\n\n case tt.jsxTagStart:\n case tt.string:\n return this.parseExprAtom();\n\n default:\n throw this.raise(this.state.start, JsxErrors.UnsupportedJsxValue);\n }\n }\n\n // JSXEmptyExpression is unique type since it doesn't actually parse anything,\n // and so it should start at the end of last read token (left brace) and finish\n // at the beginning of the next one (right brace).\n\n jsxParseEmptyExpression(): N.JSXEmptyExpression {\n const node = this.startNodeAt(\n this.state.lastTokEnd,\n this.state.lastTokEndLoc,\n );\n return this.finishNodeAt(\n node,\n \"JSXEmptyExpression\",\n this.state.start,\n this.state.startLoc,\n );\n }\n\n // Parse JSX spread child\n\n jsxParseSpreadChild(node: N.JSXSpreadChild): N.JSXSpreadChild {\n this.next(); // ellipsis\n node.expression = this.parseExpression();\n this.expect(tt.braceR);\n\n return this.finishNode(node, \"JSXSpreadChild\");\n }\n\n // Parses JSX expression enclosed into curly brackets.\n\n jsxParseExpressionContainer(\n node: N.JSXExpressionContainer,\n ): N.JSXExpressionContainer {\n if (this.match(tt.braceR)) {\n node.expression = this.jsxParseEmptyExpression();\n } else {\n const expression = this.parseExpression();\n\n if (process.env.BABEL_8_BREAKING) {\n if (\n expression.type === \"SequenceExpression\" &&\n !expression.extra?.parenthesized\n ) {\n this.raise(\n expression.expressions[1].start,\n JsxErrors.UnexpectedSequenceExpression,\n );\n }\n }\n\n node.expression = expression;\n }\n this.expect(tt.braceR);\n\n return this.finishNode(node, \"JSXExpressionContainer\");\n }\n\n // Parses following JSX attribute name-value pair.\n\n jsxParseAttribute(): N.JSXAttribute {\n const node = this.startNode();\n if (this.eat(tt.braceL)) {\n this.expect(tt.ellipsis);\n node.argument = this.parseMaybeAssignAllowIn();\n this.expect(tt.braceR);\n return this.finishNode(node, \"JSXSpreadAttribute\");\n }\n node.name = this.jsxParseNamespacedName();\n node.value = this.eat(tt.eq) ? this.jsxParseAttributeValue() : null;\n return this.finishNode(node, \"JSXAttribute\");\n }\n\n // Parses JSX opening tag starting after \"<\".\n\n jsxParseOpeningElementAt(\n startPos: number,\n startLoc: Position,\n ): N.JSXOpeningElement {\n const node = this.startNodeAt(startPos, startLoc);\n if (this.match(tt.jsxTagEnd)) {\n this.expect(tt.jsxTagEnd);\n return this.finishNode(node, \"JSXOpeningFragment\");\n }\n node.name = this.jsxParseElementName();\n return this.jsxParseOpeningElementAfterName(node);\n }\n\n jsxParseOpeningElementAfterName(\n node: N.JSXOpeningElement,\n ): N.JSXOpeningElement {\n const attributes: N.JSXAttribute[] = [];\n while (!this.match(tt.slash) && !this.match(tt.jsxTagEnd)) {\n attributes.push(this.jsxParseAttribute());\n }\n node.attributes = attributes;\n node.selfClosing = this.eat(tt.slash);\n this.expect(tt.jsxTagEnd);\n return this.finishNode(node, \"JSXOpeningElement\");\n }\n\n // Parses JSX closing tag starting after \"</\".\n\n jsxParseClosingElementAt(\n startPos: number,\n startLoc: Position,\n ): N.JSXClosingElement {\n const node = this.startNodeAt(startPos, startLoc);\n if (this.match(tt.jsxTagEnd)) {\n this.expect(tt.jsxTagEnd);\n return this.finishNode(node, \"JSXClosingFragment\");\n }\n node.name = this.jsxParseElementName();\n this.expect(tt.jsxTagEnd);\n return this.finishNode(node, \"JSXClosingElement\");\n }\n\n // Parses entire JSX element, including it\"s opening tag\n // (starting after \"<\"), attributes, contents and closing tag.\n\n jsxParseElementAt(startPos: number, startLoc: Position): N.JSXElement {\n const node = this.startNodeAt(startPos, startLoc);\n const children = [];\n const openingElement = this.jsxParseOpeningElementAt(startPos, startLoc);\n let closingElement = null;\n\n if (!openingElement.selfClosing) {\n contents: for (;;) {\n switch (this.state.type) {\n case tt.jsxTagStart:\n startPos = this.state.start;\n startLoc = this.state.startLoc;\n this.next();\n if (this.eat(tt.slash)) {\n closingElement = this.jsxParseClosingElementAt(\n startPos,\n startLoc,\n );\n break contents;\n }\n children.push(this.jsxParseElementAt(startPos, startLoc));\n break;\n\n case tt.jsxText:\n children.push(this.parseExprAtom());\n break;\n\n case tt.braceL: {\n const node = this.startNode();\n this.next();\n if (this.match(tt.ellipsis)) {\n children.push(this.jsxParseSpreadChild(node));\n } else {\n children.push(this.jsxParseExpressionContainer(node));\n }\n\n break;\n }\n // istanbul ignore next - should never happen\n default:\n throw this.unexpected();\n }\n }\n\n if (isFragment(openingElement) && !isFragment(closingElement)) {\n this.raise(\n // $FlowIgnore\n closingElement.start,\n JsxErrors.MissingClosingTagFragment,\n );\n } else if (!isFragment(openingElement) && isFragment(closingElement)) {\n this.raise(\n // $FlowIgnore\n closingElement.start,\n JsxErrors.MissingClosingTagElement,\n getQualifiedJSXName(openingElement.name),\n );\n } else if (!isFragment(openingElement) && !isFragment(closingElement)) {\n if (\n // $FlowIgnore\n getQualifiedJSXName(closingElement.name) !==\n getQualifiedJSXName(openingElement.name)\n ) {\n this.raise(\n // $FlowIgnore\n closingElement.start,\n JsxErrors.MissingClosingTagElement,\n getQualifiedJSXName(openingElement.name),\n );\n }\n }\n }\n\n if (isFragment(openingElement)) {\n node.openingFragment = openingElement;\n node.closingFragment = closingElement;\n } else {\n node.openingElement = openingElement;\n node.closingElement = closingElement;\n }\n node.children = children;\n if (this.isRelational(\"<\")) {\n throw this.raise(\n this.state.start,\n JsxErrors.UnwrappedAdjacentJSXElements,\n );\n }\n\n return isFragment(openingElement)\n ? this.finishNode(node, \"JSXFragment\")\n : this.finishNode(node, \"JSXElement\");\n }\n\n // Parses entire JSX element from current position.\n\n jsxParseElement(): N.JSXElement {\n const startPos = this.state.start;\n const startLoc = this.state.startLoc;\n this.next();\n return this.jsxParseElementAt(startPos, startLoc);\n }\n\n // ==================================\n // Overrides\n // ==================================\n\n parseExprAtom(refExpressionErrors: ?ExpressionErrors): N.Expression {\n if (this.match(tt.jsxText)) {\n return this.parseLiteral(this.state.value, \"JSXText\");\n } else if (this.match(tt.jsxTagStart)) {\n return this.jsxParseElement();\n } else if (\n this.isRelational(\"<\") &&\n this.input.charCodeAt(this.state.pos) !== charCodes.exclamationMark\n ) {\n // In case we encounter an lt token here it will always be the start of\n // jsx as the lt sign is not allowed in places that expect an expression\n this.finishToken(tt.jsxTagStart);\n return this.jsxParseElement();\n } else {\n return super.parseExprAtom(refExpressionErrors);\n }\n }\n\n createLookaheadState(state: State): JSXLookaheadState {\n const lookaheadState = ((super.createLookaheadState(\n state,\n ): any): JSXLookaheadState);\n lookaheadState.inPropertyName = state.inPropertyName;\n return lookaheadState;\n }\n\n getTokenFromCode(code: number): void {\n if (this.state.inPropertyName) return super.getTokenFromCode(code);\n\n const context = this.curContext();\n\n if (context === tc.j_expr) {\n return this.jsxReadToken();\n }\n\n if (context === tc.j_oTag || context === tc.j_cTag) {\n if (isIdentifierStart(code)) {\n return this.jsxReadWord();\n }\n\n if (code === charCodes.greaterThan) {\n ++this.state.pos;\n return this.finishToken(tt.jsxTagEnd);\n }\n\n if (\n (code === charCodes.quotationMark || code === charCodes.apostrophe) &&\n context === tc.j_oTag\n ) {\n return this.jsxReadString(code);\n }\n }\n\n if (\n code === charCodes.lessThan &&\n this.state.exprAllowed &&\n this.input.charCodeAt(this.state.pos + 1) !== charCodes.exclamationMark\n ) {\n ++this.state.pos;\n return this.finishToken(tt.jsxTagStart);\n }\n\n return super.getTokenFromCode(code);\n }\n\n updateContext(prevType: TokenType): void {\n super.updateContext(prevType);\n const { context, type } = this.state;\n if (type === tt.braceL) {\n const curContext = context[context.length - 1];\n if (curContext === tc.j_oTag) {\n context.push(tc.brace);\n } else if (curContext === tc.j_expr) {\n context.push(tc.templateQuasi);\n }\n this.state.exprAllowed = true;\n } else if (type === tt.slash && prevType === tt.jsxTagStart) {\n context.length -= 2; // do not consider JSX expr -> JSX open tag -> ... anymore\n context.push(tc.j_cTag); // reconsider as closing tag context\n this.state.exprAllowed = false;\n } else if (type === tt.jsxTagEnd) {\n const out = context.pop();\n if ((out === tc.j_oTag && prevType === tt.slash) || out === tc.j_cTag) {\n context.pop();\n this.state.exprAllowed = context[context.length - 1] === tc.j_expr;\n } else {\n this.state.exprAllowed = true;\n }\n } else if (\n type.keyword &&\n (prevType === tt.dot || prevType === tt.questionDot)\n ) {\n this.state.exprAllowed = false;\n } else {\n this.state.exprAllowed = type.beforeExpr;\n }\n }\n };\n","// @flow\n\nimport ScopeHandler, { Scope } from \"../../util/scope\";\nimport {\n BIND_KIND_TYPE,\n BIND_FLAGS_TS_ENUM,\n BIND_FLAGS_TS_CONST_ENUM,\n BIND_FLAGS_TS_EXPORT_ONLY,\n BIND_KIND_VALUE,\n BIND_FLAGS_CLASS,\n type ScopeFlags,\n type BindingTypes,\n} from \"../../util/scopeflags\";\nimport * as N from \"../../types\";\n\nclass TypeScriptScope extends Scope {\n types: Set<string> = new Set();\n\n // enums (which are also in .types)\n enums: Set<string> = new Set();\n\n // const enums (which are also in .enums and .types)\n constEnums: Set<string> = new Set();\n\n // classes (which are also in .lexical) and interface (which are also in .types)\n classes: Set<string> = new Set();\n\n // namespaces and ambient functions (or classes) are too difficult to track,\n // especially without type analysis.\n // We need to track them anyway, to avoid \"X is not defined\" errors\n // when exporting them.\n exportOnlyBindings: Set<string> = new Set();\n}\n\n// See https://github.com/babel/babel/pull/9766#discussion_r268920730 for an\n// explanation of how typescript handles scope.\n\nexport default class TypeScriptScopeHandler extends ScopeHandler<TypeScriptScope> {\n createScope(flags: ScopeFlags): TypeScriptScope {\n return new TypeScriptScope(flags);\n }\n\n declareName(name: string, bindingType: BindingTypes, pos: number) {\n const scope = this.currentScope();\n if (bindingType & BIND_FLAGS_TS_EXPORT_ONLY) {\n this.maybeExportDefined(scope, name);\n scope.exportOnlyBindings.add(name);\n return;\n }\n\n super.declareName(...arguments);\n\n if (bindingType & BIND_KIND_TYPE) {\n if (!(bindingType & BIND_KIND_VALUE)) {\n // \"Value\" bindings have already been registered by the superclass.\n this.checkRedeclarationInScope(scope, name, bindingType, pos);\n this.maybeExportDefined(scope, name);\n }\n scope.types.add(name);\n }\n if (bindingType & BIND_FLAGS_TS_ENUM) scope.enums.add(name);\n if (bindingType & BIND_FLAGS_TS_CONST_ENUM) scope.constEnums.add(name);\n if (bindingType & BIND_FLAGS_CLASS) scope.classes.add(name);\n }\n\n isRedeclaredInScope(\n scope: TypeScriptScope,\n name: string,\n bindingType: BindingTypes,\n ): boolean {\n if (scope.enums.has(name)) {\n if (bindingType & BIND_FLAGS_TS_ENUM) {\n // Enums can be merged with other enums if they are both\n // const or both non-const.\n const isConst = !!(bindingType & BIND_FLAGS_TS_CONST_ENUM);\n const wasConst = scope.constEnums.has(name);\n return isConst !== wasConst;\n }\n return true;\n }\n if (bindingType & BIND_FLAGS_CLASS && scope.classes.has(name)) {\n if (scope.lexical.has(name)) {\n // Classes can be merged with interfaces\n return !!(bindingType & BIND_KIND_VALUE);\n } else {\n // Interface can be merged with other classes or interfaces\n return false;\n }\n }\n if (bindingType & BIND_KIND_TYPE && scope.types.has(name)) {\n return true;\n }\n\n return super.isRedeclaredInScope(...arguments);\n }\n\n checkLocalExport(id: N.Identifier) {\n const topLevelScope = this.scopeStack[0];\n const { name } = id;\n if (\n !topLevelScope.types.has(name) &&\n !topLevelScope.exportOnlyBindings.has(name)\n ) {\n super.checkLocalExport(id);\n }\n }\n}\n","// @flow\nexport const PARAM = 0b0000, // Initial Parameter flags\n PARAM_YIELD = 0b0001, // track [Yield] production parameter\n PARAM_AWAIT = 0b0010, // track [Await] production parameter\n PARAM_RETURN = 0b0100, // track [Return] production parameter\n PARAM_IN = 0b1000; // track [In] production parameter\n\n// ProductionParameterHandler is a stack fashioned production parameter tracker\n// https://tc39.es/ecma262/#sec-grammar-notation\n// The tracked parameters are defined above.\n//\n// Whenever [+Await]/[+Yield] appears in the right-hand sides of a production,\n// we must enter a new tracking stack. For example when parsing\n//\n// AsyncFunctionDeclaration [Yield, Await]:\n// async [no LineTerminator here] function BindingIdentifier[?Yield, ?Await]\n// ( FormalParameters[~Yield, +Await] ) { AsyncFunctionBody }\n//\n// we must follow such process:\n//\n// 1. parse async keyword\n// 2. parse function keyword\n// 3. parse bindingIdentifier <= inherit current parameters: [?Await]\n// 4. enter new stack with (PARAM_AWAIT)\n// 5. parse formal parameters <= must have [Await] parameter [+Await]\n// 6. parse function body\n// 7. exit current stack\n\nexport type ParamKind =\n | typeof PARAM\n | typeof PARAM_AWAIT\n | typeof PARAM_IN\n | typeof PARAM_RETURN\n | typeof PARAM_YIELD;\n\nexport default class ProductionParameterHandler {\n stacks: Array<ParamKind> = [];\n enter(flags: ParamKind) {\n this.stacks.push(flags);\n }\n\n exit() {\n this.stacks.pop();\n }\n\n currentFlags(): ParamKind {\n return this.stacks[this.stacks.length - 1];\n }\n\n get hasAwait(): boolean {\n return (this.currentFlags() & PARAM_AWAIT) > 0;\n }\n\n get hasYield(): boolean {\n return (this.currentFlags() & PARAM_YIELD) > 0;\n }\n\n get hasReturn(): boolean {\n return (this.currentFlags() & PARAM_RETURN) > 0;\n }\n\n get hasIn(): boolean {\n return (this.currentFlags() & PARAM_IN) > 0;\n }\n}\n\nexport function functionFlags(\n isAsync: boolean,\n isGenerator: boolean,\n): ParamKind {\n return (isAsync ? PARAM_AWAIT : 0) | (isGenerator ? PARAM_YIELD : 0);\n}\n","// @flow\n\n/*:: declare var invariant; */\n\n// Error messages are colocated with the plugin.\n/* eslint-disable @babel/development-internal/dry-error-messages */\n\nimport type { TokenType } from \"../../tokenizer/types\";\nimport type State from \"../../tokenizer/state\";\nimport { types as tt } from \"../../tokenizer/types\";\nimport { types as ct } from \"../../tokenizer/context\";\nimport * as N from \"../../types\";\nimport type { Pos, Position } from \"../../util/location\";\nimport type Parser from \"../../parser\";\nimport {\n type BindingTypes,\n SCOPE_TS_MODULE,\n SCOPE_OTHER,\n BIND_TS_ENUM,\n BIND_TS_CONST_ENUM,\n BIND_TS_TYPE,\n BIND_TS_INTERFACE,\n BIND_TS_AMBIENT,\n BIND_TS_NAMESPACE,\n BIND_CLASS,\n BIND_LEXICAL,\n} from \"../../util/scopeflags\";\nimport TypeScriptScopeHandler from \"./scope\";\nimport * as charCodes from \"charcodes\";\nimport type { ExpressionErrors } from \"../../parser/util\";\nimport { PARAM } from \"../../util/production-parameter\";\nimport {\n Errors,\n makeErrorTemplates,\n type ErrorTemplate,\n ErrorCodes,\n} from \"../../parser/error\";\n\ntype TsModifier =\n | \"readonly\"\n | \"abstract\"\n | \"declare\"\n | \"static\"\n | \"override\"\n | N.Accessibility;\n\nfunction nonNull<T>(x: ?T): T {\n if (x == null) {\n // $FlowIgnore\n throw new Error(`Unexpected ${x} value.`);\n }\n return x;\n}\n\nfunction assert(x: boolean): void {\n if (!x) {\n throw new Error(\"Assert fail\");\n }\n}\n\ntype ParsingContext =\n | \"EnumMembers\"\n | \"HeritageClauseElement\"\n | \"TupleElementTypes\"\n | \"TypeMembers\"\n | \"TypeParametersOrArguments\";\n\n/* eslint sort-keys: \"error\" */\nconst TSErrors = makeErrorTemplates(\n {\n AbstractMethodHasImplementation:\n \"Method '%0' cannot have an implementation because it is marked abstract.\",\n AccesorCannotDeclareThisParameter:\n \"'get' and 'set' accessors cannot declare 'this' parameters.\",\n AccesorCannotHaveTypeParameters: \"An accessor cannot have type parameters.\",\n ClassMethodHasDeclare: \"Class methods cannot have the 'declare' modifier.\",\n ClassMethodHasReadonly:\n \"Class methods cannot have the 'readonly' modifier.\",\n ConstructorHasTypeParameters:\n \"Type parameters cannot appear on a constructor declaration.\",\n DeclareAccessor: \"'declare' is not allowed in %0ters.\",\n DeclareClassFieldHasInitializer:\n \"Initializers are not allowed in ambient contexts.\",\n DeclareFunctionHasImplementation:\n \"An implementation cannot be declared in ambient contexts.\",\n DuplicateAccessibilityModifier: \"Accessibility modifier already seen.\",\n DuplicateModifier: \"Duplicate modifier: '%0'.\",\n EmptyHeritageClauseType: \"'%0' list cannot be empty.\",\n EmptyTypeArguments: \"Type argument list cannot be empty.\",\n EmptyTypeParameters: \"Type parameter list cannot be empty.\",\n ExpectedAmbientAfterExportDeclare:\n \"'export declare' must be followed by an ambient declaration.\",\n ImportAliasHasImportType: \"An import alias can not use 'import type'.\",\n IncompatibleModifiers: \"'%0' modifier cannot be used with '%1' modifier.\",\n IndexSignatureHasAbstract:\n \"Index signatures cannot have the 'abstract' modifier.\",\n IndexSignatureHasAccessibility:\n \"Index signatures cannot have an accessibility modifier ('%0').\",\n IndexSignatureHasDeclare:\n \"Index signatures cannot have the 'declare' modifier.\",\n IndexSignatureHasOverride:\n \"'override' modifier cannot appear on an index signature.\",\n IndexSignatureHasStatic:\n \"Index signatures cannot have the 'static' modifier.\",\n InvalidModifierOnTypeMember:\n \"'%0' modifier cannot appear on a type member.\",\n InvalidModifiersOrder: \"'%0' modifier must precede '%1' modifier.\",\n InvalidTupleMemberLabel:\n \"Tuple members must be labeled with a simple identifier.\",\n MixedLabeledAndUnlabeledElements:\n \"Tuple members must all have names or all not have names.\",\n NonAbstractClassHasAbstractMethod:\n \"Abstract methods can only appear within an abstract class.\",\n NonClassMethodPropertyHasAbstractModifer:\n \"'abstract' modifier can only appear on a class, method, or property declaration.\",\n OptionalTypeBeforeRequired:\n \"A required element cannot follow an optional element.\",\n OverrideNotInSubClass:\n \"This member cannot have an 'override' modifier because its containing class does not extend another class.\",\n PatternIsOptional:\n \"A binding pattern parameter cannot be optional in an implementation signature.\",\n PrivateElementHasAbstract:\n \"Private elements cannot have the 'abstract' modifier.\",\n PrivateElementHasAccessibility:\n \"Private elements cannot have an accessibility modifier ('%0').\",\n ReadonlyForMethodSignature:\n \"'readonly' modifier can only appear on a property declaration or index signature.\",\n SetAccesorCannotHaveOptionalParameter:\n \"A 'set' accessor cannot have an optional parameter.\",\n SetAccesorCannotHaveRestParameter:\n \"A 'set' accessor cannot have rest parameter.\",\n SetAccesorCannotHaveReturnType:\n \"A 'set' accessor cannot have a return type annotation.\",\n StaticBlockCannotHaveModifier:\n \"Static class blocks cannot have any modifier.\",\n TypeAnnotationAfterAssign:\n \"Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.\",\n TypeImportCannotSpecifyDefaultAndNamed:\n \"A type-only import can specify a default import or named bindings, but not both.\",\n UnexpectedParameterModifier:\n \"A parameter property is only allowed in a constructor implementation.\",\n UnexpectedReadonly:\n \"'readonly' type modifier is only permitted on array and tuple literal types.\",\n UnexpectedTypeAnnotation: \"Did not expect a type annotation here.\",\n UnexpectedTypeCastInParameter:\n \"Unexpected type cast in parameter position.\",\n UnsupportedImportTypeArgument:\n \"Argument in a type import must be a string literal.\",\n UnsupportedParameterPropertyKind:\n \"A parameter property may not be declared using a binding pattern.\",\n UnsupportedSignatureParameterKind:\n \"Name in a signature must be an Identifier, ObjectPattern or ArrayPattern, instead got %0.\",\n },\n /* code */ ErrorCodes.SyntaxError,\n);\n/* eslint-disable sort-keys */\n\n// Doesn't handle \"void\" or \"null\" because those are keywords, not identifiers.\n// It also doesn't handle \"intrinsic\", since usually it's not a keyword.\nfunction keywordTypeFromName(\n value: string,\n): N.TsKeywordTypeType | typeof undefined {\n switch (value) {\n case \"any\":\n return \"TSAnyKeyword\";\n case \"boolean\":\n return \"TSBooleanKeyword\";\n case \"bigint\":\n return \"TSBigIntKeyword\";\n case \"never\":\n return \"TSNeverKeyword\";\n case \"number\":\n return \"TSNumberKeyword\";\n case \"object\":\n return \"TSObjectKeyword\";\n case \"string\":\n return \"TSStringKeyword\";\n case \"symbol\":\n return \"TSSymbolKeyword\";\n case \"undefined\":\n return \"TSUndefinedKeyword\";\n case \"unknown\":\n return \"TSUnknownKeyword\";\n default:\n return undefined;\n }\n}\n\nfunction tsIsAccessModifier(modifier: string): boolean %checks {\n return (\n modifier === \"private\" || modifier === \"public\" || modifier === \"protected\"\n );\n}\n\nexport default (superClass: Class<Parser>): Class<Parser> =>\n class extends superClass {\n getScopeHandler(): Class<TypeScriptScopeHandler> {\n return TypeScriptScopeHandler;\n }\n\n tsIsIdentifier(): boolean {\n // TODO: actually a bit more complex in TypeScript, but shouldn't matter.\n // See https://github.com/Microsoft/TypeScript/issues/15008\n return this.match(tt.name);\n }\n\n tsTokenCanFollowModifier() {\n return (\n (this.match(tt.bracketL) ||\n this.match(tt.braceL) ||\n this.match(tt.star) ||\n this.match(tt.ellipsis) ||\n this.match(tt.privateName) ||\n this.isLiteralPropertyName()) &&\n !this.hasPrecedingLineBreak()\n );\n }\n\n tsNextTokenCanFollowModifier() {\n // Note: TypeScript's implementation is much more complicated because\n // more things are considered modifiers there.\n // This implementation only handles modifiers not handled by @babel/parser itself. And \"static\".\n // TODO: Would be nice to avoid lookahead. Want a hasLineBreakUpNext() method...\n this.next();\n return this.tsTokenCanFollowModifier();\n }\n\n /** Parses a modifier matching one the given modifier names. */\n tsParseModifier<T: TsModifier>(allowedModifiers: T[]): ?T {\n if (!this.match(tt.name)) {\n return undefined;\n }\n\n const modifier = this.state.value;\n if (\n allowedModifiers.indexOf(modifier) !== -1 &&\n this.tsTryParse(this.tsNextTokenCanFollowModifier.bind(this))\n ) {\n return modifier;\n }\n return undefined;\n }\n\n /** Parses a list of modifiers, in any order.\n * If you need a specific order, you must call this function multiple times:\n * this.tsParseModifiers(node, [\"public\"]);\n * this.tsParseModifiers(node, [\"abstract\", \"readonly\"]);\n */\n tsParseModifiers(\n modified: {\n [key: TsModifier]: ?true,\n accessibility?: N.Accessibility,\n },\n allowedModifiers: TsModifier[],\n disallowedModifiers?: TsModifier[],\n errorTemplate?: ErrorTemplate,\n ): void {\n const enforceOrder = (pos, modifier, before, after) => {\n if (modifier === before && modified[after]) {\n this.raise(pos, TSErrors.InvalidModifiersOrder, before, after);\n }\n };\n const incompatible = (pos, modifier, mod1, mod2) => {\n if (\n (modified[mod1] && modifier === mod2) ||\n (modified[mod2] && modifier === mod1)\n ) {\n this.raise(pos, TSErrors.IncompatibleModifiers, mod1, mod2);\n }\n };\n\n for (;;) {\n const startPos = this.state.start;\n const modifier: ?TsModifier = this.tsParseModifier(\n allowedModifiers.concat(disallowedModifiers ?? []),\n );\n\n if (!modifier) break;\n\n if (tsIsAccessModifier(modifier)) {\n if (modified.accessibility) {\n this.raise(startPos, TSErrors.DuplicateAccessibilityModifier);\n } else {\n enforceOrder(startPos, modifier, modifier, \"override\");\n enforceOrder(startPos, modifier, modifier, \"static\");\n\n modified.accessibility = modifier;\n }\n } else {\n if (Object.hasOwnProperty.call(modified, modifier)) {\n this.raise(startPos, TSErrors.DuplicateModifier, modifier);\n } else {\n enforceOrder(startPos, modifier, \"static\", \"readonly\");\n enforceOrder(startPos, modifier, \"static\", \"override\");\n enforceOrder(startPos, modifier, \"override\", \"readonly\");\n enforceOrder(startPos, modifier, \"abstract\", \"override\");\n\n incompatible(startPos, modifier, \"declare\", \"override\");\n incompatible(startPos, modifier, \"static\", \"abstract\");\n }\n modified[modifier] = true;\n }\n\n if (disallowedModifiers?.includes(modifier)) {\n this.raise(\n startPos,\n // $FlowIgnore\n errorTemplate,\n modifier,\n );\n }\n }\n }\n\n tsIsListTerminator(kind: ParsingContext): boolean {\n switch (kind) {\n case \"EnumMembers\":\n case \"TypeMembers\":\n return this.match(tt.braceR);\n case \"HeritageClauseElement\":\n return this.match(tt.braceL);\n case \"TupleElementTypes\":\n return this.match(tt.bracketR);\n case \"TypeParametersOrArguments\":\n return this.isRelational(\">\");\n }\n\n throw new Error(\"Unreachable\");\n }\n\n tsParseList<T: N.Node>(kind: ParsingContext, parseElement: () => T): T[] {\n const result: T[] = [];\n while (!this.tsIsListTerminator(kind)) {\n // Skipping \"parseListElement\" from the TS source since that's just for error handling.\n result.push(parseElement());\n }\n return result;\n }\n\n tsParseDelimitedList<T: N.Node>(\n kind: ParsingContext,\n parseElement: () => T,\n ): T[] {\n return nonNull(\n this.tsParseDelimitedListWorker(\n kind,\n parseElement,\n /* expectSuccess */ true,\n ),\n );\n }\n\n /**\n * If !expectSuccess, returns undefined instead of failing to parse.\n * If expectSuccess, parseElement should always return a defined value.\n */\n tsParseDelimitedListWorker<T: N.Node>(\n kind: ParsingContext,\n parseElement: () => ?T,\n expectSuccess: boolean,\n ): ?(T[]) {\n const result = [];\n\n for (;;) {\n if (this.tsIsListTerminator(kind)) {\n break;\n }\n\n const element = parseElement();\n if (element == null) {\n return undefined;\n }\n result.push(element);\n\n if (this.eat(tt.comma)) {\n continue;\n }\n\n if (this.tsIsListTerminator(kind)) {\n break;\n }\n\n if (expectSuccess) {\n // This will fail with an error about a missing comma\n this.expect(tt.comma);\n }\n return undefined;\n }\n\n return result;\n }\n\n tsParseBracketedList<T: N.Node>(\n kind: ParsingContext,\n parseElement: () => T,\n bracket: boolean,\n skipFirstToken: boolean,\n ): T[] {\n if (!skipFirstToken) {\n if (bracket) {\n this.expect(tt.bracketL);\n } else {\n this.expectRelational(\"<\");\n }\n }\n\n const result = this.tsParseDelimitedList(kind, parseElement);\n\n if (bracket) {\n this.expect(tt.bracketR);\n } else {\n this.expectRelational(\">\");\n }\n\n return result;\n }\n\n tsParseImportType(): N.TsImportType {\n const node: N.TsImportType = this.startNode();\n this.expect(tt._import);\n this.expect(tt.parenL);\n if (!this.match(tt.string)) {\n this.raise(this.state.start, TSErrors.UnsupportedImportTypeArgument);\n }\n\n // For compatibility to estree we cannot call parseLiteral directly here\n node.argument = this.parseExprAtom();\n this.expect(tt.parenR);\n\n if (this.eat(tt.dot)) {\n node.qualifier = this.tsParseEntityName(/* allowReservedWords */ true);\n }\n if (this.isRelational(\"<\")) {\n node.typeParameters = this.tsParseTypeArguments();\n }\n return this.finishNode(node, \"TSImportType\");\n }\n\n tsParseEntityName(allowReservedWords: boolean): N.TsEntityName {\n let entity: N.TsEntityName = this.parseIdentifier();\n while (this.eat(tt.dot)) {\n const node: N.TsQualifiedName = this.startNodeAtNode(entity);\n node.left = entity;\n node.right = this.parseIdentifier(allowReservedWords);\n entity = this.finishNode(node, \"TSQualifiedName\");\n }\n return entity;\n }\n\n tsParseTypeReference(): N.TsTypeReference {\n const node: N.TsTypeReference = this.startNode();\n node.typeName = this.tsParseEntityName(/* allowReservedWords */ false);\n if (!this.hasPrecedingLineBreak() && this.isRelational(\"<\")) {\n node.typeParameters = this.tsParseTypeArguments();\n }\n return this.finishNode(node, \"TSTypeReference\");\n }\n\n tsParseThisTypePredicate(lhs: N.TsThisType): N.TsTypePredicate {\n this.next();\n const node: N.TsTypePredicate = this.startNodeAtNode(lhs);\n node.parameterName = lhs;\n node.typeAnnotation = this.tsParseTypeAnnotation(/* eatColon */ false);\n node.asserts = false;\n return this.finishNode(node, \"TSTypePredicate\");\n }\n\n tsParseThisTypeNode(): N.TsThisType {\n const node: N.TsThisType = this.startNode();\n this.next();\n return this.finishNode(node, \"TSThisType\");\n }\n\n tsParseTypeQuery(): N.TsTypeQuery {\n const node: N.TsTypeQuery = this.startNode();\n this.expect(tt._typeof);\n if (this.match(tt._import)) {\n node.exprName = this.tsParseImportType();\n } else {\n node.exprName = this.tsParseEntityName(/* allowReservedWords */ true);\n }\n return this.finishNode(node, \"TSTypeQuery\");\n }\n\n tsParseTypeParameter(): N.TsTypeParameter {\n const node: N.TsTypeParameter = this.startNode();\n node.name = this.parseIdentifierName(node.start);\n node.constraint = this.tsEatThenParseType(tt._extends);\n node.default = this.tsEatThenParseType(tt.eq);\n return this.finishNode(node, \"TSTypeParameter\");\n }\n\n tsTryParseTypeParameters(): ?N.TsTypeParameterDeclaration {\n if (this.isRelational(\"<\")) {\n return this.tsParseTypeParameters();\n }\n }\n\n tsParseTypeParameters() {\n const node: N.TsTypeParameterDeclaration = this.startNode();\n\n if (this.isRelational(\"<\") || this.match(tt.jsxTagStart)) {\n this.next();\n } else {\n this.unexpected();\n }\n\n node.params = this.tsParseBracketedList(\n \"TypeParametersOrArguments\",\n this.tsParseTypeParameter.bind(this),\n /* bracket */ false,\n /* skipFirstToken */ true,\n );\n if (node.params.length === 0) {\n this.raise(node.start, TSErrors.EmptyTypeParameters);\n }\n return this.finishNode(node, \"TSTypeParameterDeclaration\");\n }\n\n tsTryNextParseConstantContext(): ?N.TsTypeReference {\n if (this.lookahead().type === tt._const) {\n this.next();\n return this.tsParseTypeReference();\n }\n return null;\n }\n\n // Note: In TypeScript implementation we must provide `yieldContext` and `awaitContext`,\n // but here it's always false, because this is only used for types.\n tsFillSignature(\n returnToken: TokenType,\n signature: N.TsSignatureDeclaration,\n ): void {\n // Arrow fns *must* have return token (`=>`). Normal functions can omit it.\n const returnTokenRequired = returnToken === tt.arrow;\n signature.typeParameters = this.tsTryParseTypeParameters();\n this.expect(tt.parenL);\n signature.parameters = this.tsParseBindingListForSignature();\n if (returnTokenRequired) {\n signature.typeAnnotation =\n this.tsParseTypeOrTypePredicateAnnotation(returnToken);\n } else if (this.match(returnToken)) {\n signature.typeAnnotation =\n this.tsParseTypeOrTypePredicateAnnotation(returnToken);\n }\n }\n\n tsParseBindingListForSignature(): $ReadOnlyArray<\n N.Identifier | N.RestElement | N.ObjectPattern | N.ArrayPattern,\n > {\n return this.parseBindingList(tt.parenR, charCodes.rightParenthesis).map(\n pattern => {\n if (\n pattern.type !== \"Identifier\" &&\n pattern.type !== \"RestElement\" &&\n pattern.type !== \"ObjectPattern\" &&\n pattern.type !== \"ArrayPattern\"\n ) {\n this.raise(\n pattern.start,\n TSErrors.UnsupportedSignatureParameterKind,\n pattern.type,\n );\n }\n return (pattern: any);\n },\n );\n }\n\n tsParseTypeMemberSemicolon(): void {\n if (!this.eat(tt.comma) && !this.isLineTerminator()) {\n this.expect(tt.semi);\n }\n }\n\n tsParseSignatureMember(\n kind: \"TSCallSignatureDeclaration\" | \"TSConstructSignatureDeclaration\",\n node: N.TsCallSignatureDeclaration | N.TsConstructSignatureDeclaration,\n ): N.TsCallSignatureDeclaration | N.TsConstructSignatureDeclaration {\n this.tsFillSignature(tt.colon, node);\n this.tsParseTypeMemberSemicolon();\n return this.finishNode(node, kind);\n }\n\n tsIsUnambiguouslyIndexSignature() {\n this.next(); // Skip '{'\n return this.eat(tt.name) && this.match(tt.colon);\n }\n\n tsTryParseIndexSignature(node: N.Node): ?N.TsIndexSignature {\n if (\n !(\n this.match(tt.bracketL) &&\n this.tsLookAhead(this.tsIsUnambiguouslyIndexSignature.bind(this))\n )\n ) {\n return undefined;\n }\n\n this.expect(tt.bracketL);\n const id = this.parseIdentifier();\n id.typeAnnotation = this.tsParseTypeAnnotation();\n this.resetEndLocation(id); // set end position to end of type\n\n this.expect(tt.bracketR);\n node.parameters = [id];\n\n const type = this.tsTryParseTypeAnnotation();\n if (type) node.typeAnnotation = type;\n this.tsParseTypeMemberSemicolon();\n return this.finishNode(node, \"TSIndexSignature\");\n }\n\n tsParsePropertyOrMethodSignature(\n node: N.TsPropertySignature | N.TsMethodSignature,\n readonly: boolean,\n ): N.TsPropertySignature | N.TsMethodSignature {\n if (this.eat(tt.question)) node.optional = true;\n const nodeAny: any = node;\n\n if (this.match(tt.parenL) || this.isRelational(\"<\")) {\n if (readonly) {\n this.raise(node.start, TSErrors.ReadonlyForMethodSignature);\n }\n const method: N.TsMethodSignature = nodeAny;\n if (method.kind && this.isRelational(\"<\")) {\n this.raise(this.state.pos, TSErrors.AccesorCannotHaveTypeParameters);\n }\n this.tsFillSignature(tt.colon, method);\n this.tsParseTypeMemberSemicolon();\n if (method.kind === \"get\") {\n if (method.parameters.length > 0) {\n this.raise(this.state.pos, Errors.BadGetterArity);\n if (this.isThisParam(method.parameters[0])) {\n this.raise(\n this.state.pos,\n TSErrors.AccesorCannotDeclareThisParameter,\n );\n }\n }\n } else if (method.kind === \"set\") {\n if (method.parameters.length !== 1) {\n this.raise(this.state.pos, Errors.BadSetterArity);\n } else {\n const firstParameter = method.parameters[0];\n if (this.isThisParam(firstParameter)) {\n this.raise(\n this.state.pos,\n TSErrors.AccesorCannotDeclareThisParameter,\n );\n }\n if (\n firstParameter.type === \"Identifier\" &&\n firstParameter.optional\n ) {\n this.raise(\n this.state.pos,\n TSErrors.SetAccesorCannotHaveOptionalParameter,\n );\n }\n if (firstParameter.type === \"RestElement\") {\n this.raise(\n this.state.pos,\n TSErrors.SetAccesorCannotHaveRestParameter,\n );\n }\n }\n if (method.typeAnnotation) {\n this.raise(\n method.typeAnnotation.start,\n TSErrors.SetAccesorCannotHaveReturnType,\n );\n }\n } else {\n method.kind = \"method\";\n }\n return this.finishNode(method, \"TSMethodSignature\");\n } else {\n const property: N.TsPropertySignature = nodeAny;\n if (readonly) property.readonly = true;\n const type = this.tsTryParseTypeAnnotation();\n if (type) property.typeAnnotation = type;\n this.tsParseTypeMemberSemicolon();\n return this.finishNode(property, \"TSPropertySignature\");\n }\n }\n\n tsParseTypeMember(): N.TsTypeElement {\n const node: any = this.startNode();\n\n if (this.match(tt.parenL) || this.isRelational(\"<\")) {\n return this.tsParseSignatureMember(\"TSCallSignatureDeclaration\", node);\n }\n\n if (this.match(tt._new)) {\n const id: N.Identifier = this.startNode();\n this.next();\n if (this.match(tt.parenL) || this.isRelational(\"<\")) {\n return this.tsParseSignatureMember(\n \"TSConstructSignatureDeclaration\",\n node,\n );\n } else {\n node.key = this.createIdentifier(id, \"new\");\n return this.tsParsePropertyOrMethodSignature(node, false);\n }\n }\n\n this.tsParseModifiers(\n node,\n [\"readonly\"],\n [\n \"declare\",\n \"abstract\",\n \"private\",\n \"protected\",\n \"public\",\n \"static\",\n \"override\",\n ],\n TSErrors.InvalidModifierOnTypeMember,\n );\n\n const idx = this.tsTryParseIndexSignature(node);\n if (idx) {\n return idx;\n }\n\n this.parsePropertyName(node, /* isPrivateNameAllowed */ false);\n if (\n !node.computed &&\n node.key.type === \"Identifier\" &&\n (node.key.name === \"get\" || node.key.name === \"set\") &&\n this.tsTokenCanFollowModifier()\n ) {\n node.kind = node.key.name;\n this.parsePropertyName(node, /* isPrivateNameAllowed */ false);\n }\n return this.tsParsePropertyOrMethodSignature(node, !!node.readonly);\n }\n\n tsParseTypeLiteral(): N.TsTypeLiteral {\n const node: N.TsTypeLiteral = this.startNode();\n node.members = this.tsParseObjectTypeMembers();\n return this.finishNode(node, \"TSTypeLiteral\");\n }\n\n tsParseObjectTypeMembers(): $ReadOnlyArray<N.TsTypeElement> {\n this.expect(tt.braceL);\n const members = this.tsParseList(\n \"TypeMembers\",\n this.tsParseTypeMember.bind(this),\n );\n this.expect(tt.braceR);\n return members;\n }\n\n tsIsStartOfMappedType(): boolean {\n this.next();\n if (this.eat(tt.plusMin)) {\n return this.isContextual(\"readonly\");\n }\n if (this.isContextual(\"readonly\")) {\n this.next();\n }\n if (!this.match(tt.bracketL)) {\n return false;\n }\n this.next();\n if (!this.tsIsIdentifier()) {\n return false;\n }\n this.next();\n return this.match(tt._in);\n }\n\n tsParseMappedTypeParameter(): N.TsTypeParameter {\n const node: N.TsTypeParameter = this.startNode();\n node.name = this.parseIdentifierName(node.start);\n node.constraint = this.tsExpectThenParseType(tt._in);\n return this.finishNode(node, \"TSTypeParameter\");\n }\n\n tsParseMappedType(): N.TsMappedType {\n const node: N.TsMappedType = this.startNode();\n\n this.expect(tt.braceL);\n\n if (this.match(tt.plusMin)) {\n node.readonly = this.state.value;\n this.next();\n this.expectContextual(\"readonly\");\n } else if (this.eatContextual(\"readonly\")) {\n node.readonly = true;\n }\n\n this.expect(tt.bracketL);\n node.typeParameter = this.tsParseMappedTypeParameter();\n node.nameType = this.eatContextual(\"as\") ? this.tsParseType() : null;\n\n this.expect(tt.bracketR);\n\n if (this.match(tt.plusMin)) {\n node.optional = this.state.value;\n this.next();\n this.expect(tt.question);\n } else if (this.eat(tt.question)) {\n node.optional = true;\n }\n\n node.typeAnnotation = this.tsTryParseType();\n this.semicolon();\n this.expect(tt.braceR);\n\n return this.finishNode(node, \"TSMappedType\");\n }\n\n tsParseTupleType(): N.TsTupleType {\n const node: N.TsTupleType = this.startNode();\n node.elementTypes = this.tsParseBracketedList(\n \"TupleElementTypes\",\n this.tsParseTupleElementType.bind(this),\n /* bracket */ true,\n /* skipFirstToken */ false,\n );\n\n // Validate the elementTypes to ensure that no mandatory elements\n // follow optional elements\n let seenOptionalElement = false;\n let labeledElements = null;\n node.elementTypes.forEach(elementNode => {\n let { type } = elementNode;\n\n if (\n seenOptionalElement &&\n type !== \"TSRestType\" &&\n type !== \"TSOptionalType\" &&\n !(type === \"TSNamedTupleMember\" && elementNode.optional)\n ) {\n this.raise(elementNode.start, TSErrors.OptionalTypeBeforeRequired);\n }\n\n // Flow doesn't support ||=\n seenOptionalElement =\n seenOptionalElement ||\n (type === \"TSNamedTupleMember\" && elementNode.optional) ||\n type === \"TSOptionalType\";\n\n // When checking labels, check the argument of the spread operator\n if (type === \"TSRestType\") {\n elementNode = elementNode.typeAnnotation;\n type = elementNode.type;\n }\n\n const isLabeled = type === \"TSNamedTupleMember\";\n // Flow doesn't support ??=\n labeledElements = labeledElements ?? isLabeled;\n if (labeledElements !== isLabeled) {\n this.raise(\n elementNode.start,\n TSErrors.MixedLabeledAndUnlabeledElements,\n );\n }\n });\n\n return this.finishNode(node, \"TSTupleType\");\n }\n\n tsParseTupleElementType(): N.TsType | N.TsNamedTupleMember {\n // parses `...TsType[]`\n\n const { start: startPos, startLoc } = this.state;\n\n const rest = this.eat(tt.ellipsis);\n let type = this.tsParseType();\n const optional = this.eat(tt.question);\n const labeled = this.eat(tt.colon);\n\n if (labeled) {\n const labeledNode: N.TsNamedTupleMember = this.startNodeAtNode(type);\n labeledNode.optional = optional;\n\n if (\n type.type === \"TSTypeReference\" &&\n !type.typeParameters &&\n type.typeName.type === \"Identifier\"\n ) {\n labeledNode.label = (type.typeName: N.Identifier);\n } else {\n this.raise(type.start, TSErrors.InvalidTupleMemberLabel);\n // This produces an invalid AST, but at least we don't drop\n // nodes representing the invalid source.\n // $FlowIgnore\n labeledNode.label = type;\n }\n\n labeledNode.elementType = this.tsParseType();\n type = this.finishNode(labeledNode, \"TSNamedTupleMember\");\n } else if (optional) {\n const optionalTypeNode: N.TsOptionalType = this.startNodeAtNode(type);\n optionalTypeNode.typeAnnotation = type;\n type = this.finishNode(optionalTypeNode, \"TSOptionalType\");\n }\n\n if (rest) {\n const restNode: N.TsRestType = this.startNodeAt(startPos, startLoc);\n restNode.typeAnnotation = type;\n type = this.finishNode(restNode, \"TSRestType\");\n }\n\n return type;\n }\n\n tsParseParenthesizedType(): N.TsParenthesizedType {\n const node = this.startNode();\n this.expect(tt.parenL);\n node.typeAnnotation = this.tsParseType();\n this.expect(tt.parenR);\n return this.finishNode(node, \"TSParenthesizedType\");\n }\n\n tsParseFunctionOrConstructorType(\n type: \"TSFunctionType\" | \"TSConstructorType\",\n abstract?: boolean,\n ): N.TsFunctionOrConstructorType {\n const node: N.TsFunctionOrConstructorType = this.startNode();\n if (type === \"TSConstructorType\") {\n // $FlowIgnore\n node.abstract = !!abstract;\n if (abstract) this.next();\n this.next(); // eat `new`\n }\n this.tsFillSignature(tt.arrow, node);\n return this.finishNode(node, type);\n }\n\n tsParseLiteralTypeNode(): N.TsLiteralType {\n const node: N.TsLiteralType = this.startNode();\n node.literal = (() => {\n switch (this.state.type) {\n case tt.num:\n case tt.bigint:\n case tt.string:\n case tt._true:\n case tt._false:\n // For compatibility to estree we cannot call parseLiteral directly here\n return this.parseExprAtom();\n default:\n throw this.unexpected();\n }\n })();\n return this.finishNode(node, \"TSLiteralType\");\n }\n\n tsParseTemplateLiteralType(): N.TsType {\n const node: N.TsLiteralType = this.startNode();\n node.literal = this.parseTemplate(false);\n return this.finishNode(node, \"TSLiteralType\");\n }\n\n parseTemplateSubstitution(): N.TsType {\n if (this.state.inType) return this.tsParseType();\n return super.parseTemplateSubstitution();\n }\n\n tsParseThisTypeOrThisTypePredicate(): N.TsThisType | N.TsTypePredicate {\n const thisKeyword = this.tsParseThisTypeNode();\n if (this.isContextual(\"is\") && !this.hasPrecedingLineBreak()) {\n return this.tsParseThisTypePredicate(thisKeyword);\n } else {\n return thisKeyword;\n }\n }\n\n tsParseNonArrayType(): N.TsType {\n switch (this.state.type) {\n case tt.name:\n case tt._void:\n case tt._null: {\n const type = this.match(tt._void)\n ? \"TSVoidKeyword\"\n : this.match(tt._null)\n ? \"TSNullKeyword\"\n : keywordTypeFromName(this.state.value);\n if (\n type !== undefined &&\n this.lookaheadCharCode() !== charCodes.dot\n ) {\n const node: N.TsKeywordType = this.startNode();\n this.next();\n return this.finishNode(node, type);\n }\n return this.tsParseTypeReference();\n }\n case tt.string:\n case tt.num:\n case tt.bigint:\n case tt._true:\n case tt._false:\n return this.tsParseLiteralTypeNode();\n case tt.plusMin:\n if (this.state.value === \"-\") {\n const node: N.TsLiteralType = this.startNode();\n const nextToken = this.lookahead();\n if (nextToken.type !== tt.num && nextToken.type !== tt.bigint) {\n throw this.unexpected();\n }\n node.literal = this.parseMaybeUnary();\n return this.finishNode(node, \"TSLiteralType\");\n }\n break;\n case tt._this:\n return this.tsParseThisTypeOrThisTypePredicate();\n case tt._typeof:\n return this.tsParseTypeQuery();\n case tt._import:\n return this.tsParseImportType();\n case tt.braceL:\n return this.tsLookAhead(this.tsIsStartOfMappedType.bind(this))\n ? this.tsParseMappedType()\n : this.tsParseTypeLiteral();\n case tt.bracketL:\n return this.tsParseTupleType();\n case tt.parenL:\n if (process.env.BABEL_8_BREAKING) {\n if (!this.options.createParenthesizedExpressions) {\n const startPos = this.state.start;\n this.next();\n const type = this.tsParseType();\n this.expect(tt.parenR);\n this.addExtra(type, \"parenthesized\", true);\n this.addExtra(type, \"parenStart\", startPos);\n return type;\n }\n }\n\n return this.tsParseParenthesizedType();\n case tt.backQuote:\n return this.tsParseTemplateLiteralType();\n }\n\n throw this.unexpected();\n }\n\n tsParseArrayTypeOrHigher(): N.TsType {\n let type = this.tsParseNonArrayType();\n while (!this.hasPrecedingLineBreak() && this.eat(tt.bracketL)) {\n if (this.match(tt.bracketR)) {\n const node: N.TsArrayType = this.startNodeAtNode(type);\n node.elementType = type;\n this.expect(tt.bracketR);\n type = this.finishNode(node, \"TSArrayType\");\n } else {\n const node: N.TsIndexedAccessType = this.startNodeAtNode(type);\n node.objectType = type;\n node.indexType = this.tsParseType();\n this.expect(tt.bracketR);\n type = this.finishNode(node, \"TSIndexedAccessType\");\n }\n }\n return type;\n }\n\n tsParseTypeOperator(\n operator: \"keyof\" | \"unique\" | \"readonly\",\n ): N.TsTypeOperator {\n const node: N.TsTypeOperator = this.startNode();\n this.expectContextual(operator);\n node.operator = operator;\n node.typeAnnotation = this.tsParseTypeOperatorOrHigher();\n\n if (operator === \"readonly\") {\n this.tsCheckTypeAnnotationForReadOnly(node);\n }\n\n return this.finishNode(node, \"TSTypeOperator\");\n }\n\n tsCheckTypeAnnotationForReadOnly(node: N.Node) {\n switch (node.typeAnnotation.type) {\n case \"TSTupleType\":\n case \"TSArrayType\":\n return;\n default:\n this.raise(node.start, TSErrors.UnexpectedReadonly);\n }\n }\n\n tsParseInferType(): N.TsInferType {\n const node = this.startNode();\n this.expectContextual(\"infer\");\n const typeParameter = this.startNode();\n typeParameter.name = this.parseIdentifierName(typeParameter.start);\n node.typeParameter = this.finishNode(typeParameter, \"TSTypeParameter\");\n return this.finishNode(node, \"TSInferType\");\n }\n\n tsParseTypeOperatorOrHigher(): N.TsType {\n const operator = [\"keyof\", \"unique\", \"readonly\"].find(kw =>\n this.isContextual(kw),\n );\n return operator\n ? this.tsParseTypeOperator(operator)\n : this.isContextual(\"infer\")\n ? this.tsParseInferType()\n : this.tsParseArrayTypeOrHigher();\n }\n\n tsParseUnionOrIntersectionType(\n kind: \"TSUnionType\" | \"TSIntersectionType\",\n parseConstituentType: () => N.TsType,\n operator: TokenType,\n ): N.TsType {\n const node: N.TsUnionType | N.TsIntersectionType = this.startNode();\n const hasLeadingOperator = this.eat(operator);\n const types = [];\n do {\n types.push(parseConstituentType());\n } while (this.eat(operator));\n if (types.length === 1 && !hasLeadingOperator) {\n return types[0];\n }\n node.types = types;\n return this.finishNode(node, kind);\n }\n\n tsParseIntersectionTypeOrHigher(): N.TsType {\n return this.tsParseUnionOrIntersectionType(\n \"TSIntersectionType\",\n this.tsParseTypeOperatorOrHigher.bind(this),\n tt.bitwiseAND,\n );\n }\n\n tsParseUnionTypeOrHigher() {\n return this.tsParseUnionOrIntersectionType(\n \"TSUnionType\",\n this.tsParseIntersectionTypeOrHigher.bind(this),\n tt.bitwiseOR,\n );\n }\n\n tsIsStartOfFunctionType() {\n if (this.isRelational(\"<\")) {\n return true;\n }\n return (\n this.match(tt.parenL) &&\n this.tsLookAhead(this.tsIsUnambiguouslyStartOfFunctionType.bind(this))\n );\n }\n\n tsSkipParameterStart(): boolean {\n if (this.match(tt.name) || this.match(tt._this)) {\n this.next();\n return true;\n }\n\n if (this.match(tt.braceL)) {\n let braceStackCounter = 1;\n this.next();\n\n while (braceStackCounter > 0) {\n if (this.match(tt.braceL)) {\n ++braceStackCounter;\n } else if (this.match(tt.braceR)) {\n --braceStackCounter;\n }\n this.next();\n }\n return true;\n }\n\n if (this.match(tt.bracketL)) {\n let braceStackCounter = 1;\n this.next();\n\n while (braceStackCounter > 0) {\n if (this.match(tt.bracketL)) {\n ++braceStackCounter;\n } else if (this.match(tt.bracketR)) {\n --braceStackCounter;\n }\n this.next();\n }\n return true;\n }\n\n return false;\n }\n\n tsIsUnambiguouslyStartOfFunctionType(): boolean {\n this.next();\n if (this.match(tt.parenR) || this.match(tt.ellipsis)) {\n // ( )\n // ( ...\n return true;\n }\n if (this.tsSkipParameterStart()) {\n if (\n this.match(tt.colon) ||\n this.match(tt.comma) ||\n this.match(tt.question) ||\n this.match(tt.eq)\n ) {\n // ( xxx :\n // ( xxx ,\n // ( xxx ?\n // ( xxx =\n return true;\n }\n if (this.match(tt.parenR)) {\n this.next();\n if (this.match(tt.arrow)) {\n // ( xxx ) =>\n return true;\n }\n }\n }\n return false;\n }\n\n tsParseTypeOrTypePredicateAnnotation(\n returnToken: TokenType,\n ): N.TsTypeAnnotation {\n return this.tsInType(() => {\n const t: N.TsTypeAnnotation = this.startNode();\n this.expect(returnToken);\n\n const node = this.startNode<N.TsTypePredicate>();\n\n const asserts = !!this.tsTryParse(\n this.tsParseTypePredicateAsserts.bind(this),\n );\n\n if (asserts && this.match(tt._this)) {\n // When asserts is false, thisKeyword is handled by tsParseNonArrayType\n // : asserts this is type\n let thisTypePredicate = this.tsParseThisTypeOrThisTypePredicate();\n // if it turns out to be a `TSThisType`, wrap it with `TSTypePredicate`\n // : asserts this\n if (thisTypePredicate.type === \"TSThisType\") {\n node.parameterName = (thisTypePredicate: N.TsThisType);\n node.asserts = true;\n (node: N.TsTypePredicate).typeAnnotation = null;\n thisTypePredicate = this.finishNode(node, \"TSTypePredicate\");\n } else {\n this.resetStartLocationFromNode(thisTypePredicate, node);\n (thisTypePredicate: N.TsTypePredicate).asserts = true;\n }\n t.typeAnnotation = thisTypePredicate;\n return this.finishNode(t, \"TSTypeAnnotation\");\n }\n\n const typePredicateVariable =\n this.tsIsIdentifier() &&\n this.tsTryParse(this.tsParseTypePredicatePrefix.bind(this));\n\n if (!typePredicateVariable) {\n if (!asserts) {\n // : type\n return this.tsParseTypeAnnotation(/* eatColon */ false, t);\n }\n\n // : asserts foo\n node.parameterName = this.parseIdentifier();\n node.asserts = asserts;\n (node: N.TsTypePredicate).typeAnnotation = null;\n t.typeAnnotation = this.finishNode(node, \"TSTypePredicate\");\n return this.finishNode(t, \"TSTypeAnnotation\");\n }\n\n // : asserts foo is type\n const type = this.tsParseTypeAnnotation(/* eatColon */ false);\n node.parameterName = typePredicateVariable;\n node.typeAnnotation = type;\n node.asserts = asserts;\n t.typeAnnotation = this.finishNode(node, \"TSTypePredicate\");\n return this.finishNode(t, \"TSTypeAnnotation\");\n });\n }\n\n tsTryParseTypeOrTypePredicateAnnotation(): ?N.TsTypeAnnotation {\n return this.match(tt.colon)\n ? this.tsParseTypeOrTypePredicateAnnotation(tt.colon)\n : undefined;\n }\n\n tsTryParseTypeAnnotation(): ?N.TsTypeAnnotation {\n return this.match(tt.colon) ? this.tsParseTypeAnnotation() : undefined;\n }\n\n tsTryParseType(): ?N.TsType {\n return this.tsEatThenParseType(tt.colon);\n }\n\n tsParseTypePredicatePrefix(): ?N.Identifier {\n const id = this.parseIdentifier();\n if (this.isContextual(\"is\") && !this.hasPrecedingLineBreak()) {\n this.next();\n return id;\n }\n }\n\n tsParseTypePredicateAsserts(): boolean {\n if (\n !this.match(tt.name) ||\n this.state.value !== \"asserts\" ||\n this.hasPrecedingLineBreak()\n ) {\n return false;\n }\n const containsEsc = this.state.containsEsc;\n this.next();\n if (!this.match(tt.name) && !this.match(tt._this)) {\n return false;\n }\n\n if (containsEsc) {\n this.raise(\n this.state.lastTokStart,\n Errors.InvalidEscapedReservedWord,\n \"asserts\",\n );\n }\n\n return true;\n }\n\n tsParseTypeAnnotation(\n eatColon = true,\n t: N.TsTypeAnnotation = this.startNode(),\n ): N.TsTypeAnnotation {\n this.tsInType(() => {\n if (eatColon) this.expect(tt.colon);\n t.typeAnnotation = this.tsParseType();\n });\n return this.finishNode(t, \"TSTypeAnnotation\");\n }\n\n /** Be sure to be in a type context before calling this, using `tsInType`. */\n tsParseType(): N.TsType {\n // Need to set `state.inType` so that we don't parse JSX in a type context.\n assert(this.state.inType);\n const type = this.tsParseNonConditionalType();\n if (this.hasPrecedingLineBreak() || !this.eat(tt._extends)) {\n return type;\n }\n const node: N.TsConditionalType = this.startNodeAtNode(type);\n node.checkType = type;\n node.extendsType = this.tsParseNonConditionalType();\n this.expect(tt.question);\n node.trueType = this.tsParseType();\n this.expect(tt.colon);\n node.falseType = this.tsParseType();\n return this.finishNode(node, \"TSConditionalType\");\n }\n\n isAbstractConstructorSignature(): boolean {\n return this.isContextual(\"abstract\") && this.lookahead().type === tt._new;\n }\n\n tsParseNonConditionalType(): N.TsType {\n if (this.tsIsStartOfFunctionType()) {\n return this.tsParseFunctionOrConstructorType(\"TSFunctionType\");\n }\n if (this.match(tt._new)) {\n // As in `new () => Date`\n return this.tsParseFunctionOrConstructorType(\"TSConstructorType\");\n } else if (this.isAbstractConstructorSignature()) {\n // As in `abstract new () => Date`\n return this.tsParseFunctionOrConstructorType(\n \"TSConstructorType\",\n /* abstract */ true,\n );\n }\n return this.tsParseUnionTypeOrHigher();\n }\n\n tsParseTypeAssertion(): N.TsTypeAssertion {\n const node: N.TsTypeAssertion = this.startNode();\n const _const = this.tsTryNextParseConstantContext();\n node.typeAnnotation = _const || this.tsNextThenParseType();\n this.expectRelational(\">\");\n node.expression = this.parseMaybeUnary();\n return this.finishNode(node, \"TSTypeAssertion\");\n }\n\n tsParseHeritageClause(\n descriptor: string,\n ): $ReadOnlyArray<N.TsExpressionWithTypeArguments> {\n const originalStart = this.state.start;\n\n const delimitedList = this.tsParseDelimitedList(\n \"HeritageClauseElement\",\n this.tsParseExpressionWithTypeArguments.bind(this),\n );\n\n if (!delimitedList.length) {\n this.raise(originalStart, TSErrors.EmptyHeritageClauseType, descriptor);\n }\n\n return delimitedList;\n }\n\n tsParseExpressionWithTypeArguments(): N.TsExpressionWithTypeArguments {\n const node: N.TsExpressionWithTypeArguments = this.startNode();\n // Note: TS uses parseLeftHandSideExpressionOrHigher,\n // then has grammar errors later if it's not an EntityName.\n node.expression = this.tsParseEntityName(/* allowReservedWords */ false);\n if (this.isRelational(\"<\")) {\n node.typeParameters = this.tsParseTypeArguments();\n }\n\n return this.finishNode(node, \"TSExpressionWithTypeArguments\");\n }\n\n tsParseInterfaceDeclaration(\n node: N.TsInterfaceDeclaration,\n ): N.TsInterfaceDeclaration {\n node.id = this.parseIdentifier();\n this.checkLVal(\n node.id,\n \"typescript interface declaration\",\n BIND_TS_INTERFACE,\n );\n node.typeParameters = this.tsTryParseTypeParameters();\n if (this.eat(tt._extends)) {\n node.extends = this.tsParseHeritageClause(\"extends\");\n }\n const body: N.TSInterfaceBody = this.startNode();\n body.body = this.tsInType(this.tsParseObjectTypeMembers.bind(this));\n node.body = this.finishNode(body, \"TSInterfaceBody\");\n return this.finishNode(node, \"TSInterfaceDeclaration\");\n }\n\n tsParseTypeAliasDeclaration(\n node: N.TsTypeAliasDeclaration,\n ): N.TsTypeAliasDeclaration {\n node.id = this.parseIdentifier();\n this.checkLVal(node.id, \"typescript type alias\", BIND_TS_TYPE);\n\n node.typeParameters = this.tsTryParseTypeParameters();\n node.typeAnnotation = this.tsInType(() => {\n this.expect(tt.eq);\n\n if (\n this.isContextual(\"intrinsic\") &&\n this.lookahead().type !== tt.dot\n ) {\n const node: N.TsKeywordType = this.startNode();\n this.next();\n return this.finishNode(node, \"TSIntrinsicKeyword\");\n }\n\n return this.tsParseType();\n });\n\n this.semicolon();\n return this.finishNode(node, \"TSTypeAliasDeclaration\");\n }\n\n tsInNoContext<T>(cb: () => T): T {\n const oldContext = this.state.context;\n this.state.context = [oldContext[0]];\n try {\n return cb();\n } finally {\n this.state.context = oldContext;\n }\n }\n\n /**\n * Runs `cb` in a type context.\n * This should be called one token *before* the first type token,\n * so that the call to `next()` is run in type context.\n */\n tsInType<T>(cb: () => T): T {\n const oldInType = this.state.inType;\n this.state.inType = true;\n try {\n return cb();\n } finally {\n this.state.inType = oldInType;\n }\n }\n\n tsEatThenParseType(token: TokenType): N.TsType | typeof undefined {\n return !this.match(token) ? undefined : this.tsNextThenParseType();\n }\n\n tsExpectThenParseType(token: TokenType): N.TsType {\n return this.tsDoThenParseType(() => this.expect(token));\n }\n\n tsNextThenParseType(): N.TsType {\n return this.tsDoThenParseType(() => this.next());\n }\n\n tsDoThenParseType(cb: () => void): N.TsType {\n return this.tsInType(() => {\n cb();\n return this.tsParseType();\n });\n }\n\n tsParseEnumMember(): N.TsEnumMember {\n const node: N.TsEnumMember = this.startNode();\n // Computed property names are grammar errors in an enum, so accept just string literal or identifier.\n node.id = this.match(tt.string)\n ? this.parseExprAtom()\n : this.parseIdentifier(/* liberal */ true);\n if (this.eat(tt.eq)) {\n node.initializer = this.parseMaybeAssignAllowIn();\n }\n return this.finishNode(node, \"TSEnumMember\");\n }\n\n tsParseEnumDeclaration(\n node: N.TsEnumDeclaration,\n isConst: boolean,\n ): N.TsEnumDeclaration {\n if (isConst) node.const = true;\n node.id = this.parseIdentifier();\n this.checkLVal(\n node.id,\n \"typescript enum declaration\",\n isConst ? BIND_TS_CONST_ENUM : BIND_TS_ENUM,\n );\n\n this.expect(tt.braceL);\n node.members = this.tsParseDelimitedList(\n \"EnumMembers\",\n this.tsParseEnumMember.bind(this),\n );\n this.expect(tt.braceR);\n return this.finishNode(node, \"TSEnumDeclaration\");\n }\n\n tsParseModuleBlock(): N.TsModuleBlock {\n const node: N.TsModuleBlock = this.startNode();\n this.scope.enter(SCOPE_OTHER);\n\n this.expect(tt.braceL);\n // Inside of a module block is considered \"top-level\", meaning it can have imports and exports.\n this.parseBlockOrModuleBlockBody(\n (node.body = []),\n /* directives */ undefined,\n /* topLevel */ true,\n /* end */ tt.braceR,\n );\n this.scope.exit();\n return this.finishNode(node, \"TSModuleBlock\");\n }\n\n tsParseModuleOrNamespaceDeclaration(\n node: N.TsModuleDeclaration,\n nested?: boolean = false,\n ): N.TsModuleDeclaration {\n node.id = this.parseIdentifier();\n\n if (!nested) {\n this.checkLVal(\n node.id,\n \"module or namespace declaration\",\n BIND_TS_NAMESPACE,\n );\n }\n\n if (this.eat(tt.dot)) {\n const inner = this.startNode();\n this.tsParseModuleOrNamespaceDeclaration(inner, true);\n node.body = inner;\n } else {\n this.scope.enter(SCOPE_TS_MODULE);\n this.prodParam.enter(PARAM);\n node.body = this.tsParseModuleBlock();\n this.prodParam.exit();\n this.scope.exit();\n }\n return this.finishNode(node, \"TSModuleDeclaration\");\n }\n\n tsParseAmbientExternalModuleDeclaration(\n node: N.TsModuleDeclaration,\n ): N.TsModuleDeclaration {\n if (this.isContextual(\"global\")) {\n node.global = true;\n node.id = this.parseIdentifier();\n } else if (this.match(tt.string)) {\n node.id = this.parseExprAtom();\n } else {\n this.unexpected();\n }\n if (this.match(tt.braceL)) {\n this.scope.enter(SCOPE_TS_MODULE);\n this.prodParam.enter(PARAM);\n node.body = this.tsParseModuleBlock();\n this.prodParam.exit();\n this.scope.exit();\n } else {\n this.semicolon();\n }\n\n return this.finishNode(node, \"TSModuleDeclaration\");\n }\n\n tsParseImportEqualsDeclaration(\n node: N.TsImportEqualsDeclaration,\n isExport?: boolean,\n ): N.TsImportEqualsDeclaration {\n node.isExport = isExport || false;\n node.id = this.parseIdentifier();\n this.checkLVal(node.id, \"import equals declaration\", BIND_LEXICAL);\n this.expect(tt.eq);\n const moduleReference = this.tsParseModuleReference();\n if (\n node.importKind === \"type\" &&\n moduleReference.type !== \"TSExternalModuleReference\"\n ) {\n this.raise(moduleReference.start, TSErrors.ImportAliasHasImportType);\n }\n node.moduleReference = moduleReference;\n this.semicolon();\n return this.finishNode(node, \"TSImportEqualsDeclaration\");\n }\n\n tsIsExternalModuleReference(): boolean {\n return (\n this.isContextual(\"require\") &&\n this.lookaheadCharCode() === charCodes.leftParenthesis\n );\n }\n\n tsParseModuleReference(): N.TsModuleReference {\n return this.tsIsExternalModuleReference()\n ? this.tsParseExternalModuleReference()\n : this.tsParseEntityName(/* allowReservedWords */ false);\n }\n\n tsParseExternalModuleReference(): N.TsExternalModuleReference {\n const node: N.TsExternalModuleReference = this.startNode();\n this.expectContextual(\"require\");\n this.expect(tt.parenL);\n if (!this.match(tt.string)) {\n throw this.unexpected();\n }\n // For compatibility to estree we cannot call parseLiteral directly here\n node.expression = this.parseExprAtom();\n this.expect(tt.parenR);\n return this.finishNode(node, \"TSExternalModuleReference\");\n }\n\n // Utilities\n\n tsLookAhead<T>(f: () => T): T {\n const state = this.state.clone();\n const res = f();\n this.state = state;\n return res;\n }\n\n tsTryParseAndCatch<T: ?N.NodeBase>(f: () => T): ?T {\n const result = this.tryParse(abort => f() || abort());\n\n if (result.aborted || !result.node) return undefined;\n if (result.error) this.state = result.failState;\n return result.node;\n }\n\n tsTryParse<T>(f: () => ?T): ?T {\n const state = this.state.clone();\n const result = f();\n if (result !== undefined && result !== false) {\n return result;\n } else {\n this.state = state;\n return undefined;\n }\n }\n\n tsTryParseDeclare(nany: any): ?N.Declaration {\n if (this.isLineTerminator()) {\n return;\n }\n let starttype = this.state.type;\n let kind;\n\n if (this.isContextual(\"let\")) {\n starttype = tt._var;\n kind = \"let\";\n }\n\n return this.tsInAmbientContext(() => {\n switch (starttype) {\n case tt._function:\n nany.declare = true;\n return this.parseFunctionStatement(\n nany,\n /* async */ false,\n /* declarationPosition */ true,\n );\n case tt._class:\n // While this is also set by tsParseExpressionStatement, we need to set it\n // before parsing the class declaration to now how to register it in the scope.\n nany.declare = true;\n return this.parseClass(\n nany,\n /* isStatement */ true,\n /* optionalId */ false,\n );\n case tt._const:\n if (this.match(tt._const) && this.isLookaheadContextual(\"enum\")) {\n // `const enum = 0;` not allowed because \"enum\" is a strict mode reserved word.\n this.expect(tt._const);\n this.expectContextual(\"enum\");\n return this.tsParseEnumDeclaration(nany, /* isConst */ true);\n }\n // falls through\n case tt._var:\n kind = kind || this.state.value;\n return this.parseVarStatement(nany, kind);\n case tt.name: {\n const value = this.state.value;\n if (value === \"global\") {\n return this.tsParseAmbientExternalModuleDeclaration(nany);\n } else {\n return this.tsParseDeclaration(nany, value, /* next */ true);\n }\n }\n }\n });\n }\n\n // Note: this won't be called unless the keyword is allowed in `shouldParseExportDeclaration`.\n tsTryParseExportDeclaration(): ?N.Declaration {\n return this.tsParseDeclaration(\n this.startNode(),\n this.state.value,\n /* next */ true,\n );\n }\n\n tsParseExpressionStatement(node: any, expr: N.Identifier): ?N.Declaration {\n switch (expr.name) {\n case \"declare\": {\n const declaration = this.tsTryParseDeclare(node);\n if (declaration) {\n declaration.declare = true;\n return declaration;\n }\n break;\n }\n case \"global\":\n // `global { }` (with no `declare`) may appear inside an ambient module declaration.\n // Would like to use tsParseAmbientExternalModuleDeclaration here, but already ran past \"global\".\n if (this.match(tt.braceL)) {\n this.scope.enter(SCOPE_TS_MODULE);\n this.prodParam.enter(PARAM);\n const mod: N.TsModuleDeclaration = node;\n mod.global = true;\n mod.id = expr;\n mod.body = this.tsParseModuleBlock();\n this.scope.exit();\n this.prodParam.exit();\n return this.finishNode(mod, \"TSModuleDeclaration\");\n }\n break;\n\n default:\n return this.tsParseDeclaration(node, expr.name, /* next */ false);\n }\n }\n\n // Common to tsTryParseDeclare, tsTryParseExportDeclaration, and tsParseExpressionStatement.\n tsParseDeclaration(\n node: any,\n value: string,\n next: boolean,\n ): ?N.Declaration {\n // no declaration apart from enum can be followed by a line break.\n switch (value) {\n case \"abstract\":\n if (\n this.tsCheckLineTerminator(next) &&\n (this.match(tt._class) || this.match(tt.name))\n ) {\n return this.tsParseAbstractDeclaration(node);\n }\n break;\n\n case \"enum\":\n if (next || this.match(tt.name)) {\n if (next) this.next();\n return this.tsParseEnumDeclaration(node, /* isConst */ false);\n }\n break;\n\n case \"interface\":\n if (this.tsCheckLineTerminator(next) && this.match(tt.name)) {\n return this.tsParseInterfaceDeclaration(node);\n }\n break;\n\n case \"module\":\n if (this.tsCheckLineTerminator(next)) {\n if (this.match(tt.string)) {\n return this.tsParseAmbientExternalModuleDeclaration(node);\n } else if (this.match(tt.name)) {\n return this.tsParseModuleOrNamespaceDeclaration(node);\n }\n }\n break;\n\n case \"namespace\":\n if (this.tsCheckLineTerminator(next) && this.match(tt.name)) {\n return this.tsParseModuleOrNamespaceDeclaration(node);\n }\n break;\n\n case \"type\":\n if (this.tsCheckLineTerminator(next) && this.match(tt.name)) {\n return this.tsParseTypeAliasDeclaration(node);\n }\n break;\n }\n }\n\n tsCheckLineTerminator(next: boolean) {\n if (next) {\n if (this.hasFollowingLineBreak()) return false;\n this.next();\n return true;\n }\n return !this.isLineTerminator();\n }\n\n tsTryParseGenericAsyncArrowFunction(\n startPos: number,\n startLoc: Position,\n ): ?N.ArrowFunctionExpression {\n if (!this.isRelational(\"<\")) {\n return undefined;\n }\n\n const oldMaybeInArrowParameters = this.state.maybeInArrowParameters;\n this.state.maybeInArrowParameters = true;\n\n const res: ?N.ArrowFunctionExpression = this.tsTryParseAndCatch(() => {\n const node: N.ArrowFunctionExpression = this.startNodeAt(\n startPos,\n startLoc,\n );\n node.typeParameters = this.tsParseTypeParameters();\n // Don't use overloaded parseFunctionParams which would look for \"<\" again.\n super.parseFunctionParams(node);\n node.returnType = this.tsTryParseTypeOrTypePredicateAnnotation();\n this.expect(tt.arrow);\n return node;\n });\n\n this.state.maybeInArrowParameters = oldMaybeInArrowParameters;\n\n if (!res) {\n return undefined;\n }\n\n return this.parseArrowExpression(\n res,\n /* params are already set */ null,\n /* async */ true,\n );\n }\n\n tsParseTypeArguments(): N.TsTypeParameterInstantiation {\n const node = this.startNode();\n node.params = this.tsInType(() =>\n // Temporarily remove a JSX parsing context, which makes us scan different tokens.\n this.tsInNoContext(() => {\n this.expectRelational(\"<\");\n return this.tsParseDelimitedList(\n \"TypeParametersOrArguments\",\n this.tsParseType.bind(this),\n );\n }),\n );\n if (node.params.length === 0) {\n this.raise(node.start, TSErrors.EmptyTypeArguments);\n }\n this.expectRelational(\">\");\n return this.finishNode(node, \"TSTypeParameterInstantiation\");\n }\n\n tsIsDeclarationStart(): boolean {\n if (this.match(tt.name)) {\n switch (this.state.value) {\n case \"abstract\":\n case \"declare\":\n case \"enum\":\n case \"interface\":\n case \"module\":\n case \"namespace\":\n case \"type\":\n return true;\n }\n }\n\n return false;\n }\n\n // ======================================================\n // OVERRIDES\n // ======================================================\n\n isExportDefaultSpecifier(): boolean {\n if (this.tsIsDeclarationStart()) return false;\n return super.isExportDefaultSpecifier();\n }\n\n parseAssignableListItem(\n allowModifiers: ?boolean,\n decorators: N.Decorator[],\n ): N.Pattern | N.TSParameterProperty {\n // Store original location/position to include modifiers in range\n const startPos = this.state.start;\n const startLoc = this.state.startLoc;\n\n let accessibility: ?N.Accessibility;\n let readonly = false;\n if (allowModifiers !== undefined) {\n accessibility = this.parseAccessModifier();\n readonly = !!this.tsParseModifier([\"readonly\"]);\n if (allowModifiers === false && (accessibility || readonly)) {\n this.raise(startPos, TSErrors.UnexpectedParameterModifier);\n }\n }\n\n const left = this.parseMaybeDefault();\n this.parseAssignableListItemTypes(left);\n const elt = this.parseMaybeDefault(left.start, left.loc.start, left);\n if (accessibility || readonly) {\n const pp: N.TSParameterProperty = this.startNodeAt(startPos, startLoc);\n if (decorators.length) {\n pp.decorators = decorators;\n }\n if (accessibility) pp.accessibility = accessibility;\n if (readonly) pp.readonly = readonly;\n if (elt.type !== \"Identifier\" && elt.type !== \"AssignmentPattern\") {\n this.raise(pp.start, TSErrors.UnsupportedParameterPropertyKind);\n }\n pp.parameter = ((elt: any): N.Identifier | N.AssignmentPattern);\n return this.finishNode(pp, \"TSParameterProperty\");\n }\n\n if (decorators.length) {\n left.decorators = decorators;\n }\n\n return elt;\n }\n\n parseFunctionBodyAndFinish(\n node: N.BodilessFunctionOrMethodBase,\n type: string,\n isMethod?: boolean = false,\n ): void {\n if (this.match(tt.colon)) {\n node.returnType = this.tsParseTypeOrTypePredicateAnnotation(tt.colon);\n }\n\n const bodilessType =\n type === \"FunctionDeclaration\"\n ? \"TSDeclareFunction\"\n : type === \"ClassMethod\"\n ? \"TSDeclareMethod\"\n : undefined;\n if (bodilessType && !this.match(tt.braceL) && this.isLineTerminator()) {\n this.finishNode(node, bodilessType);\n return;\n }\n if (bodilessType === \"TSDeclareFunction\" && this.state.isAmbientContext) {\n this.raise(node.start, TSErrors.DeclareFunctionHasImplementation);\n if (\n // $FlowIgnore\n node.declare\n ) {\n super.parseFunctionBodyAndFinish(node, bodilessType, isMethod);\n return;\n }\n }\n\n super.parseFunctionBodyAndFinish(node, type, isMethod);\n }\n\n registerFunctionStatementId(node: N.Function): void {\n if (!node.body && node.id) {\n // Function ids are validated after parsing their body.\n // For bodyless function, we need to do it here.\n this.checkLVal(node.id, \"function name\", BIND_TS_AMBIENT);\n } else {\n super.registerFunctionStatementId(...arguments);\n }\n }\n\n tsCheckForInvalidTypeCasts(items: $ReadOnlyArray<?N.Expression>) {\n items.forEach(node => {\n if (node?.type === \"TSTypeCastExpression\") {\n this.raise(\n node.typeAnnotation.start,\n TSErrors.UnexpectedTypeAnnotation,\n );\n }\n });\n }\n\n toReferencedList(\n exprList: $ReadOnlyArray<?N.Expression>,\n isInParens?: boolean, // eslint-disable-line no-unused-vars\n ): $ReadOnlyArray<?N.Expression> {\n // Handles invalid scenarios like: `f(a:b)`, `(a:b);`, and `(a:b,c:d)`.\n //\n // Note that `f<T>(a:b)` goes through a different path and is handled\n // in `parseSubscript` directly.\n this.tsCheckForInvalidTypeCasts(exprList);\n return exprList;\n }\n\n parseArrayLike(...args): N.ArrayExpression | N.TupleExpression {\n const node = super.parseArrayLike(...args);\n\n if (node.type === \"ArrayExpression\") {\n this.tsCheckForInvalidTypeCasts(node.elements);\n }\n\n return node;\n }\n\n parseSubscript(\n base: N.Expression,\n startPos: number,\n startLoc: Position,\n noCalls: ?boolean,\n state: N.ParseSubscriptState,\n ): N.Expression {\n if (!this.hasPrecedingLineBreak() && this.match(tt.bang)) {\n this.next();\n\n const nonNullExpression: N.TsNonNullExpression = this.startNodeAt(\n startPos,\n startLoc,\n );\n nonNullExpression.expression = base;\n return this.finishNode(nonNullExpression, \"TSNonNullExpression\");\n }\n\n if (this.isRelational(\"<\")) {\n // tsTryParseAndCatch is expensive, so avoid if not necessary.\n // There are number of things we are going to \"maybe\" parse, like type arguments on\n // tagged template expressions. If any of them fail, walk it back and continue.\n const result = this.tsTryParseAndCatch(() => {\n if (!noCalls && this.atPossibleAsyncArrow(base)) {\n // Almost certainly this is a generic async function `async <T>() => ...\n // But it might be a call with a type argument `async<T>();`\n const asyncArrowFn = this.tsTryParseGenericAsyncArrowFunction(\n startPos,\n startLoc,\n );\n if (asyncArrowFn) {\n return asyncArrowFn;\n }\n }\n\n const node: N.CallExpression = this.startNodeAt(startPos, startLoc);\n node.callee = base;\n\n const typeArguments = this.tsParseTypeArguments();\n\n if (typeArguments) {\n if (!noCalls && this.eat(tt.parenL)) {\n // possibleAsync always false here, because we would have handled it above.\n // $FlowIgnore (won't be any undefined arguments)\n node.arguments = this.parseCallExpressionArguments(\n tt.parenR,\n /* possibleAsync */ false,\n );\n\n // Handles invalid case: `f<T>(a:b)`\n this.tsCheckForInvalidTypeCasts(node.arguments);\n\n node.typeParameters = typeArguments;\n if (state.optionalChainMember) {\n // $FlowIgnore\n node.optional = false;\n }\n return this.finishCallExpression(node, state.optionalChainMember);\n } else if (this.match(tt.backQuote)) {\n const result = this.parseTaggedTemplateExpression(\n base,\n startPos,\n startLoc,\n state,\n );\n result.typeParameters = typeArguments;\n return result;\n }\n }\n\n this.unexpected();\n });\n\n if (result) return result;\n }\n\n return super.parseSubscript(base, startPos, startLoc, noCalls, state);\n }\n\n parseNewArguments(node: N.NewExpression): void {\n if (this.isRelational(\"<\")) {\n // tsTryParseAndCatch is expensive, so avoid if not necessary.\n // 99% certain this is `new C<T>();`. But may be `new C < T;`, which is also legal.\n const typeParameters = this.tsTryParseAndCatch(() => {\n const args = this.tsParseTypeArguments();\n if (!this.match(tt.parenL)) this.unexpected();\n return args;\n });\n if (typeParameters) {\n node.typeParameters = typeParameters;\n }\n }\n\n super.parseNewArguments(node);\n }\n\n parseExprOp(\n left: N.Expression,\n leftStartPos: number,\n leftStartLoc: Position,\n minPrec: number,\n ) {\n if (\n nonNull(tt._in.binop) > minPrec &&\n !this.hasPrecedingLineBreak() &&\n this.isContextual(\"as\")\n ) {\n const node: N.TsAsExpression = this.startNodeAt(\n leftStartPos,\n leftStartLoc,\n );\n node.expression = left;\n const _const = this.tsTryNextParseConstantContext();\n if (_const) {\n node.typeAnnotation = _const;\n } else {\n node.typeAnnotation = this.tsNextThenParseType();\n }\n this.finishNode(node, \"TSAsExpression\");\n // rescan `<`, `>` because they were scanned when this.state.inType was true\n this.reScan_lt_gt();\n return this.parseExprOp(node, leftStartPos, leftStartLoc, minPrec);\n }\n\n return super.parseExprOp(left, leftStartPos, leftStartLoc, minPrec);\n }\n\n checkReservedWord(\n word: string, // eslint-disable-line no-unused-vars\n startLoc: number, // eslint-disable-line no-unused-vars\n checkKeywords: boolean, // eslint-disable-line no-unused-vars\n // eslint-disable-next-line no-unused-vars\n isBinding: boolean,\n ): void {\n // Don't bother checking for TypeScript code.\n // Strict mode words may be allowed as in `declare namespace N { const static: number; }`.\n // And we have a type checker anyway, so don't bother having the parser do it.\n }\n\n /*\n Don't bother doing this check in TypeScript code because:\n 1. We may have a nested export statement with the same name:\n export const x = 0;\n export namespace N {\n export const x = 1;\n }\n 2. We have a type checker to warn us about this sort of thing.\n */\n checkDuplicateExports() {}\n\n parseImport(node: N.Node): N.AnyImport {\n node.importKind = \"value\";\n if (this.match(tt.name) || this.match(tt.star) || this.match(tt.braceL)) {\n let ahead = this.lookahead();\n\n if (\n this.isContextual(\"type\") &&\n // import type, { a } from \"b\";\n ahead.type !== tt.comma &&\n // import type from \"a\";\n !(ahead.type === tt.name && ahead.value === \"from\") &&\n // import type = require(\"a\");\n ahead.type !== tt.eq\n ) {\n node.importKind = \"type\";\n this.next();\n ahead = this.lookahead();\n }\n\n if (this.match(tt.name) && ahead.type === tt.eq) {\n return this.tsParseImportEqualsDeclaration(node);\n }\n }\n\n const importNode = super.parseImport(node);\n /*:: invariant(importNode.type !== \"TSImportEqualsDeclaration\") */\n\n // `import type` can only be used on imports with named imports or with a\n // default import - but not both\n if (\n importNode.importKind === \"type\" &&\n importNode.specifiers.length > 1 &&\n importNode.specifiers[0].type === \"ImportDefaultSpecifier\"\n ) {\n this.raise(\n importNode.start,\n TSErrors.TypeImportCannotSpecifyDefaultAndNamed,\n );\n }\n\n return importNode;\n }\n\n parseExport(node: N.Node): N.AnyExport {\n if (this.match(tt._import)) {\n // `export import A = B;`\n this.next(); // eat `tt._import`\n if (\n this.isContextual(\"type\") &&\n this.lookaheadCharCode() !== charCodes.equalsTo\n ) {\n node.importKind = \"type\";\n this.next(); // eat \"type\"\n } else {\n node.importKind = \"value\";\n }\n return this.tsParseImportEqualsDeclaration(node, /* isExport */ true);\n } else if (this.eat(tt.eq)) {\n // `export = x;`\n const assign: N.TsExportAssignment = node;\n assign.expression = this.parseExpression();\n this.semicolon();\n return this.finishNode(assign, \"TSExportAssignment\");\n } else if (this.eatContextual(\"as\")) {\n // `export as namespace A;`\n const decl: N.TsNamespaceExportDeclaration = node;\n // See `parseNamespaceExportDeclaration` in TypeScript's own parser\n this.expectContextual(\"namespace\");\n decl.id = this.parseIdentifier();\n this.semicolon();\n return this.finishNode(decl, \"TSNamespaceExportDeclaration\");\n } else {\n if (this.isContextual(\"type\") && this.lookahead().type === tt.braceL) {\n this.next();\n node.exportKind = \"type\";\n } else {\n node.exportKind = \"value\";\n }\n\n return super.parseExport(node);\n }\n }\n\n isAbstractClass(): boolean {\n return (\n this.isContextual(\"abstract\") && this.lookahead().type === tt._class\n );\n }\n\n parseExportDefaultExpression(): N.Expression | N.Declaration {\n if (this.isAbstractClass()) {\n const cls = this.startNode();\n this.next(); // Skip \"abstract\"\n cls.abstract = true;\n this.parseClass(cls, true, true);\n return cls;\n }\n\n // export default interface allowed in:\n // https://github.com/Microsoft/TypeScript/pull/16040\n if (this.state.value === \"interface\") {\n const result = this.tsParseDeclaration(\n this.startNode(),\n this.state.value,\n true,\n );\n\n if (result) return result;\n }\n\n return super.parseExportDefaultExpression();\n }\n\n parseStatementContent(context: ?string, topLevel: ?boolean): N.Statement {\n if (this.state.type === tt._const) {\n const ahead = this.lookahead();\n if (ahead.type === tt.name && ahead.value === \"enum\") {\n const node: N.TsEnumDeclaration = this.startNode();\n this.expect(tt._const);\n this.expectContextual(\"enum\");\n return this.tsParseEnumDeclaration(node, /* isConst */ true);\n }\n }\n return super.parseStatementContent(context, topLevel);\n }\n\n parseAccessModifier(): ?N.Accessibility {\n return this.tsParseModifier([\"public\", \"protected\", \"private\"]);\n }\n\n tsHasSomeModifiers(member: any, modifiers: TsModifier[]): boolean {\n return modifiers.some(modifier => {\n if (tsIsAccessModifier(modifier)) {\n return member.accessibility === modifier;\n }\n return !!member[modifier];\n });\n }\n\n parseClassMember(\n classBody: N.ClassBody,\n member: any,\n state: N.ParseClassMemberState,\n ): void {\n const invalidModifersForStaticBlocks = [\n \"declare\",\n \"private\",\n \"public\",\n \"protected\",\n \"override\",\n \"abstract\",\n \"readonly\",\n ];\n this.tsParseModifiers(\n member,\n invalidModifersForStaticBlocks.concat([\"static\"]),\n );\n\n const callParseClassMemberWithIsStatic = () => {\n const isStatic = !!member.static;\n if (isStatic && this.eat(tt.braceL)) {\n if (this.tsHasSomeModifiers(member, invalidModifersForStaticBlocks)) {\n this.raise(this.state.pos, TSErrors.StaticBlockCannotHaveModifier);\n }\n this.parseClassStaticBlock(classBody, ((member: any): N.StaticBlock));\n } else {\n this.parseClassMemberWithIsStatic(classBody, member, state, isStatic);\n }\n };\n if (member.declare) {\n this.tsInAmbientContext(callParseClassMemberWithIsStatic);\n } else {\n callParseClassMemberWithIsStatic();\n }\n }\n\n parseClassMemberWithIsStatic(\n classBody: N.ClassBody,\n member: N.ClassMember | N.TsIndexSignature,\n state: N.ParseClassMemberState,\n isStatic: boolean,\n ): void {\n const idx = this.tsTryParseIndexSignature(member);\n if (idx) {\n classBody.body.push(idx);\n\n if ((member: any).abstract) {\n this.raise(member.start, TSErrors.IndexSignatureHasAbstract);\n }\n if ((member: any).accessibility) {\n this.raise(\n member.start,\n TSErrors.IndexSignatureHasAccessibility,\n (member: any).accessibility,\n );\n }\n if ((member: any).declare) {\n this.raise(member.start, TSErrors.IndexSignatureHasDeclare);\n }\n if ((member: any).override) {\n this.raise(member.start, TSErrors.IndexSignatureHasOverride);\n }\n\n return;\n }\n\n if (!this.state.inAbstractClass && (member: any).abstract) {\n this.raise(member.start, TSErrors.NonAbstractClassHasAbstractMethod);\n }\n\n if ((member: any).override) {\n if (!state.hadSuperClass) {\n this.raise(member.start, TSErrors.OverrideNotInSubClass);\n }\n }\n\n /*:: invariant(member.type !== \"TSIndexSignature\") */\n\n super.parseClassMemberWithIsStatic(classBody, member, state, isStatic);\n }\n\n parsePostMemberNameModifiers(\n methodOrProp: N.ClassMethod | N.ClassProperty | N.ClassPrivateProperty,\n ): void {\n const optional = this.eat(tt.question);\n if (optional) methodOrProp.optional = true;\n\n if ((methodOrProp: any).readonly && this.match(tt.parenL)) {\n this.raise(methodOrProp.start, TSErrors.ClassMethodHasReadonly);\n }\n\n if ((methodOrProp: any).declare && this.match(tt.parenL)) {\n this.raise(methodOrProp.start, TSErrors.ClassMethodHasDeclare);\n }\n }\n\n // Note: The reason we do this in `parseExpressionStatement` and not `parseStatement`\n // is that e.g. `type()` is valid JS, so we must try parsing that first.\n // If it's really a type, we will parse `type` as the statement, and can correct it here\n // by parsing the rest.\n parseExpressionStatement(\n node: N.ExpressionStatement,\n expr: N.Expression,\n ): N.Statement {\n const decl =\n expr.type === \"Identifier\"\n ? this.tsParseExpressionStatement(node, expr)\n : undefined;\n return decl || super.parseExpressionStatement(node, expr);\n }\n\n // export type\n // Should be true for anything parsed by `tsTryParseExportDeclaration`.\n shouldParseExportDeclaration(): boolean {\n if (this.tsIsDeclarationStart()) return true;\n return super.shouldParseExportDeclaration();\n }\n\n // An apparent conditional expression could actually be an optional parameter in an arrow function.\n parseConditional(\n expr: N.Expression,\n startPos: number,\n startLoc: Position,\n refNeedsArrowPos?: ?Pos,\n ): N.Expression {\n // only do the expensive clone if there is a question mark\n // and if we come from inside parens\n if (!refNeedsArrowPos || !this.match(tt.question)) {\n return super.parseConditional(\n expr,\n startPos,\n startLoc,\n refNeedsArrowPos,\n );\n }\n\n const result = this.tryParse(() =>\n super.parseConditional(expr, startPos, startLoc),\n );\n\n if (!result.node) {\n // $FlowIgnore\n refNeedsArrowPos.start = result.error.pos || this.state.start;\n return expr;\n }\n if (result.error) this.state = result.failState;\n return result.node;\n }\n\n // Note: These \"type casts\" are *not* valid TS expressions.\n // But we parse them here and change them when completing the arrow function.\n parseParenItem(\n node: N.Expression,\n startPos: number,\n startLoc: Position,\n ): N.Expression {\n node = super.parseParenItem(node, startPos, startLoc);\n if (this.eat(tt.question)) {\n node.optional = true;\n // Include questionmark in location of node\n // Don't use this.finishNode() as otherwise we might process comments twice and\n // include already consumed parens\n this.resetEndLocation(node);\n }\n\n if (this.match(tt.colon)) {\n const typeCastNode: N.TsTypeCastExpression = this.startNodeAt(\n startPos,\n startLoc,\n );\n typeCastNode.expression = node;\n typeCastNode.typeAnnotation = this.tsParseTypeAnnotation();\n\n return this.finishNode(typeCastNode, \"TSTypeCastExpression\");\n }\n\n return node;\n }\n\n parseExportDeclaration(node: N.ExportNamedDeclaration): ?N.Declaration {\n // Store original location/position\n const startPos = this.state.start;\n const startLoc = this.state.startLoc;\n\n // \"export declare\" is equivalent to just \"export\".\n const isDeclare = this.eatContextual(\"declare\");\n\n if (\n isDeclare &&\n (this.isContextual(\"declare\") || !this.shouldParseExportDeclaration())\n ) {\n throw this.raise(\n this.state.start,\n TSErrors.ExpectedAmbientAfterExportDeclare,\n );\n }\n\n let declaration: ?N.Declaration;\n\n if (this.match(tt.name)) {\n declaration = this.tsTryParseExportDeclaration();\n }\n if (!declaration) {\n declaration = super.parseExportDeclaration(node);\n }\n if (\n declaration &&\n (declaration.type === \"TSInterfaceDeclaration\" ||\n declaration.type === \"TSTypeAliasDeclaration\" ||\n isDeclare)\n ) {\n node.exportKind = \"type\";\n }\n\n if (declaration && isDeclare) {\n // Reset location to include `declare` in range\n this.resetStartLocation(declaration, startPos, startLoc);\n\n declaration.declare = true;\n }\n\n return declaration;\n }\n\n parseClassId(\n node: N.Class,\n isStatement: boolean,\n optionalId: ?boolean,\n ): void {\n if ((!isStatement || optionalId) && this.isContextual(\"implements\")) {\n return;\n }\n\n super.parseClassId(\n node,\n isStatement,\n optionalId,\n (node: any).declare ? BIND_TS_AMBIENT : BIND_CLASS,\n );\n const typeParameters = this.tsTryParseTypeParameters();\n if (typeParameters) node.typeParameters = typeParameters;\n }\n\n parseClassPropertyAnnotation(\n node: N.ClassProperty | N.ClassPrivateProperty,\n ): void {\n if (!node.optional && this.eat(tt.bang)) {\n node.definite = true;\n }\n\n const type = this.tsTryParseTypeAnnotation();\n if (type) node.typeAnnotation = type;\n }\n\n parseClassProperty(node: N.ClassProperty): N.ClassProperty {\n this.parseClassPropertyAnnotation(node);\n\n if (this.state.isAmbientContext && this.match(tt.eq)) {\n this.raise(this.state.start, TSErrors.DeclareClassFieldHasInitializer);\n }\n\n return super.parseClassProperty(node);\n }\n\n parseClassPrivateProperty(\n node: N.ClassPrivateProperty,\n ): N.ClassPrivateProperty {\n // $FlowIgnore\n if (node.abstract) {\n this.raise(node.start, TSErrors.PrivateElementHasAbstract);\n }\n\n // $FlowIgnore\n if (node.accessibility) {\n this.raise(\n node.start,\n TSErrors.PrivateElementHasAccessibility,\n node.accessibility,\n );\n }\n\n this.parseClassPropertyAnnotation(node);\n return super.parseClassPrivateProperty(node);\n }\n\n pushClassMethod(\n classBody: N.ClassBody,\n method: N.ClassMethod,\n isGenerator: boolean,\n isAsync: boolean,\n isConstructor: boolean,\n allowsDirectSuper: boolean,\n ): void {\n const typeParameters = this.tsTryParseTypeParameters();\n if (typeParameters && isConstructor) {\n this.raise(typeParameters.start, TSErrors.ConstructorHasTypeParameters);\n }\n\n // $FlowIgnore\n if (method.declare && (method.kind === \"get\" || method.kind === \"set\")) {\n this.raise(method.start, TSErrors.DeclareAccessor, method.kind);\n }\n if (typeParameters) method.typeParameters = typeParameters;\n super.pushClassMethod(\n classBody,\n method,\n isGenerator,\n isAsync,\n isConstructor,\n allowsDirectSuper,\n );\n }\n\n pushClassPrivateMethod(\n classBody: N.ClassBody,\n method: N.ClassPrivateMethod,\n isGenerator: boolean,\n isAsync: boolean,\n ): void {\n const typeParameters = this.tsTryParseTypeParameters();\n if (typeParameters) method.typeParameters = typeParameters;\n super.pushClassPrivateMethod(classBody, method, isGenerator, isAsync);\n }\n\n parseClassSuper(node: N.Class): void {\n super.parseClassSuper(node);\n if (node.superClass && this.isRelational(\"<\")) {\n node.superTypeParameters = this.tsParseTypeArguments();\n }\n if (this.eatContextual(\"implements\")) {\n node.implements = this.tsParseHeritageClause(\"implements\");\n }\n }\n\n parseObjPropValue(prop: N.ObjectMember, ...args): void {\n const typeParameters = this.tsTryParseTypeParameters();\n if (typeParameters) prop.typeParameters = typeParameters;\n\n super.parseObjPropValue(prop, ...args);\n }\n\n parseFunctionParams(node: N.Function, allowModifiers?: boolean): void {\n const typeParameters = this.tsTryParseTypeParameters();\n if (typeParameters) node.typeParameters = typeParameters;\n super.parseFunctionParams(node, allowModifiers);\n }\n\n // `let x: number;`\n parseVarId(\n decl: N.VariableDeclarator,\n kind: \"var\" | \"let\" | \"const\",\n ): void {\n super.parseVarId(decl, kind);\n if (decl.id.type === \"Identifier\" && this.eat(tt.bang)) {\n decl.definite = true;\n }\n\n const type = this.tsTryParseTypeAnnotation();\n if (type) {\n decl.id.typeAnnotation = type;\n this.resetEndLocation(decl.id); // set end position to end of type\n }\n }\n\n // parse the return type of an async arrow function - let foo = (async (): number => {});\n parseAsyncArrowFromCallExpression(\n node: N.ArrowFunctionExpression,\n call: N.CallExpression,\n ): N.ArrowFunctionExpression {\n if (this.match(tt.colon)) {\n node.returnType = this.tsParseTypeAnnotation();\n }\n return super.parseAsyncArrowFromCallExpression(node, call);\n }\n\n parseMaybeAssign(...args): N.Expression {\n // Note: When the JSX plugin is on, type assertions (`<T> x`) aren't valid syntax.\n\n let state: ?State;\n let jsx;\n let typeCast;\n\n if (\n this.hasPlugin(\"jsx\") &&\n (this.match(tt.jsxTagStart) || this.isRelational(\"<\"))\n ) {\n // Prefer to parse JSX if possible. But may be an arrow fn.\n state = this.state.clone();\n\n jsx = this.tryParse(() => super.parseMaybeAssign(...args), state);\n /*:: invariant(!jsx.aborted) */\n\n if (!jsx.error) return jsx.node;\n\n // Remove `tc.j_expr` and `tc.j_oTag` from context added\n // by parsing `jsxTagStart` to stop the JSX plugin from\n // messing with the tokens\n const { context } = this.state;\n if (context[context.length - 1] === ct.j_oTag) {\n context.length -= 2;\n } else if (context[context.length - 1] === ct.j_expr) {\n context.length -= 1;\n }\n }\n\n if (!jsx?.error && !this.isRelational(\"<\")) {\n return super.parseMaybeAssign(...args);\n }\n\n // Either way, we're looking at a '<': tt.jsxTagStart or relational.\n\n let typeParameters: N.TsTypeParameterDeclaration;\n state = state || this.state.clone();\n\n const arrow = this.tryParse(abort => {\n // This is similar to TypeScript's `tryParseParenthesizedArrowFunctionExpression`.\n typeParameters = this.tsParseTypeParameters();\n const expr = super.parseMaybeAssign(...args);\n\n if (\n expr.type !== \"ArrowFunctionExpression\" ||\n expr.extra?.parenthesized\n ) {\n abort();\n }\n\n // Correct TypeScript code should have at least 1 type parameter, but don't crash on bad code.\n if (typeParameters?.params.length !== 0) {\n this.resetStartLocationFromNode(expr, typeParameters);\n }\n expr.typeParameters = typeParameters;\n return expr;\n }, state);\n\n if (!arrow.error && !arrow.aborted) return arrow.node;\n\n if (!jsx) {\n // Try parsing a type cast instead of an arrow function.\n // This will never happen outside of JSX.\n // (Because in JSX the '<' should be a jsxTagStart and not a relational.\n assert(!this.hasPlugin(\"jsx\"));\n\n // This will start with a type assertion (via parseMaybeUnary).\n // But don't directly call `this.tsParseTypeAssertion` because we want to handle any binary after it.\n typeCast = this.tryParse(() => super.parseMaybeAssign(...args), state);\n /*:: invariant(!typeCast.aborted) */\n if (!typeCast.error) return typeCast.node;\n }\n\n if (jsx?.node) {\n /*:: invariant(jsx.failState) */\n this.state = jsx.failState;\n return jsx.node;\n }\n\n if (arrow.node) {\n /*:: invariant(arrow.failState) */\n this.state = arrow.failState;\n return arrow.node;\n }\n\n if (typeCast?.node) {\n /*:: invariant(typeCast.failState) */\n this.state = typeCast.failState;\n return typeCast.node;\n }\n\n if (jsx?.thrown) throw jsx.error;\n if (arrow.thrown) throw arrow.error;\n if (typeCast?.thrown) throw typeCast.error;\n\n throw jsx?.error || arrow.error || typeCast?.error;\n }\n\n // Handle type assertions\n parseMaybeUnary(refExpressionErrors?: ?ExpressionErrors): N.Expression {\n if (!this.hasPlugin(\"jsx\") && this.isRelational(\"<\")) {\n return this.tsParseTypeAssertion();\n } else {\n return super.parseMaybeUnary(refExpressionErrors);\n }\n }\n\n parseArrow(node: N.ArrowFunctionExpression): ?N.ArrowFunctionExpression {\n if (this.match(tt.colon)) {\n // This is different from how the TS parser does it.\n // TS uses lookahead. The Babel Parser parses it as a parenthesized expression and converts.\n\n const result = this.tryParse(abort => {\n const returnType = this.tsParseTypeOrTypePredicateAnnotation(\n tt.colon,\n );\n if (this.canInsertSemicolon() || !this.match(tt.arrow)) abort();\n return returnType;\n });\n\n if (result.aborted) return;\n\n if (!result.thrown) {\n if (result.error) this.state = result.failState;\n node.returnType = result.node;\n }\n }\n\n return super.parseArrow(node);\n }\n\n // Allow type annotations inside of a parameter list.\n parseAssignableListItemTypes(param: N.Pattern) {\n if (this.eat(tt.question)) {\n if (\n param.type !== \"Identifier\" &&\n !this.state.isAmbientContext &&\n !this.state.inType\n ) {\n this.raise(param.start, TSErrors.PatternIsOptional);\n }\n\n ((param: any): N.Identifier).optional = true;\n }\n const type = this.tsTryParseTypeAnnotation();\n if (type) param.typeAnnotation = type;\n this.resetEndLocation(param);\n\n return param;\n }\n\n toAssignable(node: N.Node, isLHS: boolean = false): N.Node {\n switch (node.type) {\n case \"TSTypeCastExpression\":\n return super.toAssignable(this.typeCastToParameter(node), isLHS);\n case \"TSParameterProperty\":\n return super.toAssignable(node, isLHS);\n case \"ParenthesizedExpression\":\n return this.toAssignableParenthesizedExpression(node, isLHS);\n case \"TSAsExpression\":\n case \"TSNonNullExpression\":\n case \"TSTypeAssertion\":\n node.expression = this.toAssignable(node.expression, isLHS);\n return node;\n default:\n return super.toAssignable(node, isLHS);\n }\n }\n\n toAssignableParenthesizedExpression(node: N.Node, isLHS: boolean) {\n switch (node.expression.type) {\n case \"TSAsExpression\":\n case \"TSNonNullExpression\":\n case \"TSTypeAssertion\":\n case \"ParenthesizedExpression\":\n node.expression = this.toAssignable(node.expression, isLHS);\n return node;\n default:\n return super.toAssignable(node, isLHS);\n }\n }\n\n checkLVal(\n expr: N.Expression,\n contextDescription: string,\n ...args:\n | [BindingTypes | void]\n | [BindingTypes | void, ?Set<string>, boolean | void, boolean | void]\n ): void {\n switch (expr.type) {\n case \"TSTypeCastExpression\":\n // Allow \"typecasts\" to appear on the left of assignment expressions,\n // because it may be in an arrow function.\n // e.g. `const f = (foo: number = 0) => foo;`\n return;\n case \"TSParameterProperty\":\n this.checkLVal(expr.parameter, \"parameter property\", ...args);\n return;\n case \"TSAsExpression\":\n case \"TSTypeAssertion\":\n if (\n /*bindingType*/ !args[0] &&\n contextDescription !== \"parenthesized expression\" &&\n !expr.extra?.parenthesized\n ) {\n this.raise(expr.start, Errors.InvalidLhs, contextDescription);\n break;\n }\n this.checkLVal(expr.expression, \"parenthesized expression\", ...args);\n return;\n case \"TSNonNullExpression\":\n this.checkLVal(expr.expression, contextDescription, ...args);\n return;\n default:\n super.checkLVal(expr, contextDescription, ...args);\n return;\n }\n }\n\n parseBindingAtom(): N.Pattern {\n switch (this.state.type) {\n case tt._this:\n // \"this\" may be the name of a parameter, so allow it.\n return this.parseIdentifier(/* liberal */ true);\n default:\n return super.parseBindingAtom();\n }\n }\n\n parseMaybeDecoratorArguments(expr: N.Expression): N.Expression {\n if (this.isRelational(\"<\")) {\n const typeArguments = this.tsParseTypeArguments();\n\n if (this.match(tt.parenL)) {\n const call = super.parseMaybeDecoratorArguments(expr);\n call.typeParameters = typeArguments;\n return call;\n }\n\n this.unexpected(this.state.start, tt.parenL);\n }\n\n return super.parseMaybeDecoratorArguments(expr);\n }\n\n checkCommaAfterRest(close) {\n if (\n this.state.isAmbientContext &&\n this.match(tt.comma) &&\n this.lookaheadCharCode() === close\n ) {\n this.next();\n } else {\n super.checkCommaAfterRest(close);\n }\n }\n\n // === === === === === === === === === === === === === === === ===\n // Note: All below methods are duplicates of something in flow.js.\n // Not sure what the best way to combine these is.\n // === === === === === === === === === === === === === === === ===\n\n isClassMethod(): boolean {\n return this.isRelational(\"<\") || super.isClassMethod();\n }\n\n isClassProperty(): boolean {\n return (\n this.match(tt.bang) || this.match(tt.colon) || super.isClassProperty()\n );\n }\n\n parseMaybeDefault(...args): N.Pattern {\n const node = super.parseMaybeDefault(...args);\n\n if (\n node.type === \"AssignmentPattern\" &&\n node.typeAnnotation &&\n node.right.start < node.typeAnnotation.start\n ) {\n this.raise(\n node.typeAnnotation.start,\n TSErrors.TypeAnnotationAfterAssign,\n );\n }\n\n return node;\n }\n\n // ensure that inside types, we bypass the jsx parser plugin\n getTokenFromCode(code: number): void {\n if (\n this.state.inType &&\n (code === charCodes.greaterThan || code === charCodes.lessThan)\n ) {\n return this.finishOp(tt.relational, 1);\n } else {\n return super.getTokenFromCode(code);\n }\n }\n\n // used after we have finished parsing types\n reScan_lt_gt() {\n if (this.match(tt.relational)) {\n const code = this.input.charCodeAt(this.state.start);\n if (code === charCodes.lessThan || code === charCodes.greaterThan) {\n this.state.pos -= 1;\n this.readToken_lt_gt(code);\n }\n }\n }\n\n toAssignableList(exprList: N.Expression[]): $ReadOnlyArray<N.Pattern> {\n for (let i = 0; i < exprList.length; i++) {\n const expr = exprList[i];\n if (!expr) continue;\n switch (expr.type) {\n case \"TSTypeCastExpression\":\n exprList[i] = this.typeCastToParameter(expr);\n break;\n case \"TSAsExpression\":\n case \"TSTypeAssertion\":\n if (!this.state.maybeInArrowParameters) {\n exprList[i] = this.typeCastToParameter(expr);\n } else {\n this.raise(expr.start, TSErrors.UnexpectedTypeCastInParameter);\n }\n break;\n }\n }\n return super.toAssignableList(...arguments);\n }\n\n typeCastToParameter(node: N.TsTypeCastExpression): N.Node {\n node.expression.typeAnnotation = node.typeAnnotation;\n\n this.resetEndLocation(\n node.expression,\n node.typeAnnotation.end,\n node.typeAnnotation.loc.end,\n );\n\n return node.expression;\n }\n\n shouldParseArrow() {\n return this.match(tt.colon) || super.shouldParseArrow();\n }\n\n shouldParseAsyncArrow(): boolean {\n return this.match(tt.colon) || super.shouldParseAsyncArrow();\n }\n\n canHaveLeadingDecorator() {\n // Avoid unnecessary lookahead in checking for abstract class unless needed!\n return super.canHaveLeadingDecorator() || this.isAbstractClass();\n }\n\n jsxParseOpeningElementAfterName(\n node: N.JSXOpeningElement,\n ): N.JSXOpeningElement {\n if (this.isRelational(\"<\")) {\n const typeArguments = this.tsTryParseAndCatch(() =>\n this.tsParseTypeArguments(),\n );\n if (typeArguments) node.typeParameters = typeArguments;\n }\n return super.jsxParseOpeningElementAfterName(node);\n }\n\n getGetterSetterExpectedParamCount(\n method: N.ObjectMethod | N.ClassMethod,\n ): number {\n const baseCount = super.getGetterSetterExpectedParamCount(method);\n const params = this.getObjectOrClassMethodParams(method);\n const firstParam = params[0];\n const hasContextParam = firstParam && this.isThisParam(firstParam);\n\n return hasContextParam ? baseCount + 1 : baseCount;\n }\n\n parseCatchClauseParam(): N.Pattern {\n const param = super.parseCatchClauseParam();\n const type = this.tsTryParseTypeAnnotation();\n\n if (type) {\n param.typeAnnotation = type;\n this.resetEndLocation(param);\n }\n\n return param;\n }\n\n tsInAmbientContext<T>(cb: () => T): T {\n const oldIsAmbientContext = this.state.isAmbientContext;\n this.state.isAmbientContext = true;\n try {\n return cb();\n } finally {\n this.state.isAmbientContext = oldIsAmbientContext;\n }\n }\n\n parseClass<T: N.Class>(node: T, ...args: any[]): T {\n const oldInAbstractClass = this.state.inAbstractClass;\n this.state.inAbstractClass = !!(node: any).abstract;\n try {\n return super.parseClass(node, ...args);\n } finally {\n this.state.inAbstractClass = oldInAbstractClass;\n }\n }\n\n tsParseAbstractDeclaration(\n node: any,\n ): N.ClassDeclaration | N.TsInterfaceDeclaration | typeof undefined {\n if (this.match(tt._class)) {\n node.abstract = true;\n return this.parseClass<N.ClassDeclaration>(\n (node: N.ClassDeclaration),\n /* isStatement */ true,\n /* optionalId */ false,\n );\n } else if (this.isContextual(\"interface\")) {\n // for invalid abstract interface\n\n // To avoid\n // abstract interface\n // Foo {}\n if (!this.hasFollowingLineBreak()) {\n node.abstract = true;\n this.raise(\n node.start,\n TSErrors.NonClassMethodPropertyHasAbstractModifer,\n );\n this.next();\n return this.tsParseInterfaceDeclaration(\n (node: N.TsInterfaceDeclaration),\n );\n }\n } else {\n this.unexpected(null, tt._class);\n }\n }\n\n parseMethod(...args: any[]) {\n const method = super.parseMethod(...args);\n if (method.abstract) {\n const hasBody = this.hasPlugin(\"estree\")\n ? !!method.value.body\n : !!method.body;\n if (hasBody) {\n const { key } = method;\n this.raise(\n method.start,\n TSErrors.AbstractMethodHasImplementation,\n key.type === \"Identifier\"\n ? key.name\n : `[${this.input.slice(key.start, key.end)}]`,\n );\n }\n }\n return method;\n }\n\n shouldParseAsAmbientContext(): boolean {\n return !!this.getPluginOption(\"typescript\", \"dts\");\n }\n\n parse() {\n if (this.shouldParseAsAmbientContext()) {\n this.state.isAmbientContext = true;\n }\n return super.parse();\n }\n\n getExpression() {\n if (this.shouldParseAsAmbientContext()) {\n this.state.isAmbientContext = true;\n }\n return super.getExpression();\n }\n };\n","// @flow\n\nimport * as charCodes from \"charcodes\";\n\nimport { types as tt, TokenType } from \"../tokenizer/types\";\nimport type Parser from \"../parser\";\nimport * as N from \"../types\";\nimport { makeErrorTemplates, ErrorCodes } from \"../parser/error\";\n\ntt.placeholder = new TokenType(\"%%\", { startsExpr: true });\n\nexport type PlaceholderTypes =\n | \"Identifier\"\n | \"StringLiteral\"\n | \"Expression\"\n | \"Statement\"\n | \"Declaration\"\n | \"BlockStatement\"\n | \"ClassBody\"\n | \"Pattern\";\n\n// $PropertyType doesn't support enums. Use a fake \"switch\" (GetPlaceholderNode)\n//type MaybePlaceholder<T: PlaceholderTypes> = $PropertyType<N, T> | N.Placeholder<T>;\n\ntype _Switch<Value, Cases, Index> = $Call<\n (\n $ElementType<$ElementType<Cases, Index>, 0>,\n ) => $ElementType<$ElementType<Cases, Index>, 1>,\n Value,\n>;\ntype $Switch<Value, Cases> = _Switch<Value, Cases, *>;\n\ntype NodeOf<T: PlaceholderTypes> = $Switch<\n T,\n [\n [\"Identifier\", N.Identifier],\n [\"StringLiteral\", N.StringLiteral],\n [\"Expression\", N.Expression],\n [\"Statement\", N.Statement],\n [\"Declaration\", N.Declaration],\n [\"BlockStatement\", N.BlockStatement],\n [\"ClassBody\", N.ClassBody],\n [\"Pattern\", N.Pattern],\n ],\n>;\n\n// Placeholder<T> breaks everything, because its type is incompatible with\n// the substituted nodes.\ntype MaybePlaceholder<T: PlaceholderTypes> = NodeOf<T>; // | Placeholder<T>\n\nconst PlaceHolderErrors = makeErrorTemplates(\n {\n ClassNameIsRequired: \"A class name is required.\",\n },\n /* code */ ErrorCodes.SyntaxError,\n);\n\nexport default (superClass: Class<Parser>): Class<Parser> =>\n class extends superClass {\n parsePlaceholder<T: PlaceholderTypes>(\n expectedNode: T,\n ): /*?N.Placeholder<T>*/ ?MaybePlaceholder<T> {\n if (this.match(tt.placeholder)) {\n const node = this.startNode();\n this.next();\n this.assertNoSpace(\"Unexpected space in placeholder.\");\n\n // We can't use this.parseIdentifier because\n // we don't want nested placeholders.\n node.name = super.parseIdentifier(/* liberal */ true);\n\n this.assertNoSpace(\"Unexpected space in placeholder.\");\n this.expect(tt.placeholder);\n return this.finishPlaceholder(node, expectedNode);\n }\n }\n\n finishPlaceholder<T: PlaceholderTypes>(\n node: N.Node,\n expectedNode: T,\n ): /*N.Placeholder<T>*/ MaybePlaceholder<T> {\n const isFinished = !!(node.expectedNode && node.type === \"Placeholder\");\n node.expectedNode = expectedNode;\n\n return isFinished ? node : this.finishNode(node, \"Placeholder\");\n }\n\n /* ============================================================ *\n * tokenizer/index.js *\n * ============================================================ */\n\n getTokenFromCode(code: number) {\n if (\n code === charCodes.percentSign &&\n this.input.charCodeAt(this.state.pos + 1) === charCodes.percentSign\n ) {\n return this.finishOp(tt.placeholder, 2);\n }\n\n return super.getTokenFromCode(...arguments);\n }\n\n /* ============================================================ *\n * parser/expression.js *\n * ============================================================ */\n\n parseExprAtom(): MaybePlaceholder<\"Expression\"> {\n return (\n this.parsePlaceholder(\"Expression\") || super.parseExprAtom(...arguments)\n );\n }\n\n parseIdentifier(): MaybePlaceholder<\"Identifier\"> {\n // NOTE: This function only handles identifiers outside of\n // expressions and binding patterns, since they are already\n // handled by the parseExprAtom and parseBindingAtom functions.\n // This is needed, for example, to parse \"class %%NAME%% {}\".\n return (\n this.parsePlaceholder(\"Identifier\") ||\n super.parseIdentifier(...arguments)\n );\n }\n\n checkReservedWord(word: string): void {\n // Sometimes we call #checkReservedWord(node.name), expecting\n // that node is an Identifier. If it is a Placeholder, name\n // will be undefined.\n if (word !== undefined) super.checkReservedWord(...arguments);\n }\n\n /* ============================================================ *\n * parser/lval.js *\n * ============================================================ */\n\n parseBindingAtom(): MaybePlaceholder<\"Pattern\"> {\n return (\n this.parsePlaceholder(\"Pattern\") || super.parseBindingAtom(...arguments)\n );\n }\n\n checkLVal(expr: N.Expression): void {\n if (expr.type !== \"Placeholder\") super.checkLVal(...arguments);\n }\n\n toAssignable(node: N.Node): N.Node {\n if (\n node &&\n node.type === \"Placeholder\" &&\n node.expectedNode === \"Expression\"\n ) {\n node.expectedNode = \"Pattern\";\n return node;\n }\n return super.toAssignable(...arguments);\n }\n\n /* ============================================================ *\n * parser/statement.js *\n * ============================================================ */\n\n isLet(context: ?string): boolean {\n if (super.isLet(context)) {\n return true;\n }\n\n // Replicate the original checks that lead to looking ahead for an\n // identifier.\n if (!this.isContextual(\"let\")) {\n return false;\n }\n if (context) return false;\n\n // Accept \"let %%\" as the start of \"let %%placeholder%%\", as though the\n // placeholder were an identifier.\n const nextToken = this.lookahead();\n if (nextToken.type === tt.placeholder) {\n return true;\n }\n\n return false;\n }\n\n verifyBreakContinue(node: N.BreakStatement | N.ContinueStatement) {\n if (node.label && node.label.type === \"Placeholder\") return;\n super.verifyBreakContinue(...arguments);\n }\n\n parseExpressionStatement(\n node: MaybePlaceholder<\"Statement\">,\n expr: N.Expression,\n ): MaybePlaceholder<\"Statement\"> {\n if (\n expr.type !== \"Placeholder\" ||\n (expr.extra && expr.extra.parenthesized)\n ) {\n return super.parseExpressionStatement(...arguments);\n }\n\n if (this.match(tt.colon)) {\n const stmt: N.LabeledStatement = node;\n stmt.label = this.finishPlaceholder(expr, \"Identifier\");\n this.next();\n stmt.body = this.parseStatement(\"label\");\n return this.finishNode(stmt, \"LabeledStatement\");\n }\n\n this.semicolon();\n\n node.name = expr.name;\n return this.finishPlaceholder(node, \"Statement\");\n }\n\n parseBlock(): MaybePlaceholder<\"BlockStatement\"> {\n return (\n this.parsePlaceholder(\"BlockStatement\") ||\n super.parseBlock(...arguments)\n );\n }\n\n parseFunctionId(): ?MaybePlaceholder<\"Identifier\"> {\n return (\n this.parsePlaceholder(\"Identifier\") ||\n super.parseFunctionId(...arguments)\n );\n }\n\n parseClass<T: N.Class>(\n node: T,\n isStatement: /* T === ClassDeclaration */ boolean,\n optionalId?: boolean,\n ): T {\n const type = isStatement ? \"ClassDeclaration\" : \"ClassExpression\";\n\n this.next();\n this.takeDecorators(node);\n const oldStrict = this.state.strict;\n\n const placeholder = this.parsePlaceholder(\"Identifier\");\n if (placeholder) {\n if (\n this.match(tt._extends) ||\n this.match(tt.placeholder) ||\n this.match(tt.braceL)\n ) {\n node.id = placeholder;\n } else if (optionalId || !isStatement) {\n node.id = null;\n node.body = this.finishPlaceholder(placeholder, \"ClassBody\");\n return this.finishNode(node, type);\n } else {\n this.unexpected(null, PlaceHolderErrors.ClassNameIsRequired);\n }\n } else {\n this.parseClassId(node, isStatement, optionalId);\n }\n\n this.parseClassSuper(node);\n node.body =\n this.parsePlaceholder(\"ClassBody\") ||\n this.parseClassBody(!!node.superClass, oldStrict);\n return this.finishNode(node, type);\n }\n\n parseExport(node: N.Node): N.Node {\n const placeholder = this.parsePlaceholder(\"Identifier\");\n if (!placeholder) return super.parseExport(...arguments);\n\n if (!this.isContextual(\"from\") && !this.match(tt.comma)) {\n // export %%DECL%%;\n node.specifiers = [];\n node.source = null;\n node.declaration = this.finishPlaceholder(placeholder, \"Declaration\");\n return this.finishNode(node, \"ExportNamedDeclaration\");\n }\n\n // export %%NAME%% from \"foo\";\n this.expectPlugin(\"exportDefaultFrom\");\n const specifier = this.startNode();\n specifier.exported = placeholder;\n node.specifiers = [this.finishNode(specifier, \"ExportDefaultSpecifier\")];\n\n return super.parseExport(node);\n }\n\n isExportDefaultSpecifier(): boolean {\n if (this.match(tt._default)) {\n const next = this.nextTokenStart();\n if (this.isUnparsedContextual(next, \"from\")) {\n if (\n this.input.startsWith(\n tt.placeholder.label,\n this.nextTokenStartSince(next + 4),\n )\n ) {\n return true;\n }\n }\n }\n return super.isExportDefaultSpecifier();\n }\n\n maybeParseExportDefaultSpecifier(node: N.Node): boolean {\n if (node.specifiers && node.specifiers.length > 0) {\n // \"export %%NAME%%\" has already been parsed by #parseExport.\n return true;\n }\n return super.maybeParseExportDefaultSpecifier(...arguments);\n }\n\n checkExport(node: N.ExportNamedDeclaration): void {\n const { specifiers } = node;\n if (specifiers?.length) {\n node.specifiers = specifiers.filter(\n node => node.exported.type === \"Placeholder\",\n );\n }\n super.checkExport(node);\n node.specifiers = specifiers;\n }\n\n parseImport(\n node: N.Node,\n ): N.ImportDeclaration | N.TsImportEqualsDeclaration {\n const placeholder = this.parsePlaceholder(\"Identifier\");\n if (!placeholder) return super.parseImport(...arguments);\n\n node.specifiers = [];\n\n if (!this.isContextual(\"from\") && !this.match(tt.comma)) {\n // import %%STRING%%;\n node.source = this.finishPlaceholder(placeholder, \"StringLiteral\");\n this.semicolon();\n return this.finishNode(node, \"ImportDeclaration\");\n }\n\n // import %%DEFAULT%% ...\n const specifier = this.startNodeAtNode(placeholder);\n specifier.local = placeholder;\n this.finishNode(specifier, \"ImportDefaultSpecifier\");\n node.specifiers.push(specifier);\n\n if (this.eat(tt.comma)) {\n // import %%DEFAULT%%, * as ...\n const hasStarImport = this.maybeParseStarImportSpecifier(node);\n\n // import %%DEFAULT%%, { ...\n if (!hasStarImport) this.parseNamedImportSpecifiers(node);\n }\n\n this.expectContextual(\"from\");\n node.source = this.parseImportSource();\n this.semicolon();\n return this.finishNode(node, \"ImportDeclaration\");\n }\n\n parseImportSource(): MaybePlaceholder<\"StringLiteral\"> {\n // import ... from %%STRING%%;\n\n return (\n this.parsePlaceholder(\"StringLiteral\") ||\n super.parseImportSource(...arguments)\n );\n }\n };\n","import type Parser from \"../parser\";\nimport { types as tt } from \"../tokenizer/types\";\nimport * as N from \"../types\";\n\nexport default (superClass: Class<Parser>): Class<Parser> =>\n class extends superClass {\n parseV8Intrinsic(): N.Expression {\n if (this.match(tt.modulo)) {\n const v8IntrinsicStart = this.state.start;\n // let the `loc` of Identifier starts from `%`\n const node = this.startNode();\n this.eat(tt.modulo);\n if (this.match(tt.name)) {\n const name = this.parseIdentifierName(this.state.start);\n const identifier = this.createIdentifier(node, name);\n identifier.type = \"V8IntrinsicIdentifier\";\n if (this.match(tt.parenL)) {\n return identifier;\n }\n }\n this.unexpected(v8IntrinsicStart);\n }\n }\n\n /* ============================================================ *\n * parser/expression.js *\n * ============================================================ */\n\n parseExprAtom(): N.Expression {\n return this.parseV8Intrinsic() || super.parseExprAtom(...arguments);\n }\n };\n","// @flow\n\nimport type Parser from \"./parser\";\n\nexport type Plugin = string | [string, Object];\n\nexport type PluginList = $ReadOnlyArray<Plugin>;\n\nexport type MixinPlugin = (superClass: Class<Parser>) => Class<Parser>;\n\nexport function hasPlugin(plugins: PluginList, name: string): boolean {\n return plugins.some(plugin => {\n if (Array.isArray(plugin)) {\n return plugin[0] === name;\n } else {\n return plugin === name;\n }\n });\n}\n\nexport function getPluginOption(\n plugins: PluginList,\n name: string,\n option: string,\n) {\n const plugin = plugins.find(plugin => {\n if (Array.isArray(plugin)) {\n return plugin[0] === name;\n } else {\n return plugin === name;\n }\n });\n\n if (plugin && Array.isArray(plugin)) {\n return plugin[1][option];\n }\n\n return null;\n}\n\nconst PIPELINE_PROPOSALS = [\"minimal\", \"smart\", \"fsharp\"];\nconst RECORD_AND_TUPLE_SYNTAX_TYPES = [\"hash\", \"bar\"];\n\nexport function validatePlugins(plugins: PluginList) {\n if (hasPlugin(plugins, \"decorators\")) {\n if (hasPlugin(plugins, \"decorators-legacy\")) {\n throw new Error(\n \"Cannot use the decorators and decorators-legacy plugin together\",\n );\n }\n\n const decoratorsBeforeExport = getPluginOption(\n plugins,\n \"decorators\",\n \"decoratorsBeforeExport\",\n );\n if (decoratorsBeforeExport == null) {\n throw new Error(\n \"The 'decorators' plugin requires a 'decoratorsBeforeExport' option,\" +\n \" whose value must be a boolean. If you are migrating from\" +\n \" Babylon/Babel 6 or want to use the old decorators proposal, you\" +\n \" should use the 'decorators-legacy' plugin instead of 'decorators'.\",\n );\n } else if (typeof decoratorsBeforeExport !== \"boolean\") {\n throw new Error(\"'decoratorsBeforeExport' must be a boolean.\");\n }\n }\n\n if (hasPlugin(plugins, \"flow\") && hasPlugin(plugins, \"typescript\")) {\n throw new Error(\"Cannot combine flow and typescript plugins.\");\n }\n\n if (hasPlugin(plugins, \"placeholders\") && hasPlugin(plugins, \"v8intrinsic\")) {\n throw new Error(\"Cannot combine placeholders and v8intrinsic plugins.\");\n }\n\n if (\n hasPlugin(plugins, \"pipelineOperator\") &&\n !PIPELINE_PROPOSALS.includes(\n getPluginOption(plugins, \"pipelineOperator\", \"proposal\"),\n )\n ) {\n throw new Error(\n \"'pipelineOperator' requires 'proposal' option whose value should be one of: \" +\n PIPELINE_PROPOSALS.map(p => `'${p}'`).join(\", \"),\n );\n }\n\n if (hasPlugin(plugins, \"moduleAttributes\")) {\n if (process.env.BABEL_8_BREAKING) {\n throw new Error(\n \"`moduleAttributes` has been removed in Babel 8, please use `importAssertions` parser plugin, or `@babel/plugin-syntax-import-assertions`.\",\n );\n } else {\n if (hasPlugin(plugins, \"importAssertions\")) {\n throw new Error(\n \"Cannot combine importAssertions and moduleAttributes plugins.\",\n );\n }\n const moduleAttributesVerionPluginOption = getPluginOption(\n plugins,\n \"moduleAttributes\",\n \"version\",\n );\n if (moduleAttributesVerionPluginOption !== \"may-2020\") {\n throw new Error(\n \"The 'moduleAttributes' plugin requires a 'version' option,\" +\n \" representing the last proposal update. Currently, the\" +\n \" only supported value is 'may-2020'.\",\n );\n }\n }\n }\n\n if (\n hasPlugin(plugins, \"recordAndTuple\") &&\n !RECORD_AND_TUPLE_SYNTAX_TYPES.includes(\n getPluginOption(plugins, \"recordAndTuple\", \"syntaxType\"),\n )\n ) {\n throw new Error(\n \"'recordAndTuple' requires 'syntaxType' option whose value should be one of: \" +\n RECORD_AND_TUPLE_SYNTAX_TYPES.map(p => `'${p}'`).join(\", \"),\n );\n }\n\n if (\n hasPlugin(plugins, \"asyncDoExpressions\") &&\n !hasPlugin(plugins, \"doExpressions\")\n ) {\n const error = new Error(\n \"'asyncDoExpressions' requires 'doExpressions', please add 'doExpressions' to parser plugins.\",\n );\n // $FlowIgnore\n error.missingPlugins = \"doExpressions\"; // so @babel/core can provide better error message\n throw error;\n }\n}\n\n// These plugins are defined using a mixin which extends the parser class.\n\nimport estree from \"./plugins/estree\";\nimport flow from \"./plugins/flow\";\nimport jsx from \"./plugins/jsx\";\nimport typescript from \"./plugins/typescript\";\nimport placeholders from \"./plugins/placeholders\";\nimport v8intrinsic from \"./plugins/v8intrinsic\";\n\n// NOTE: order is important. estree must come first; placeholders must come last.\nexport const mixinPlugins: { [name: string]: MixinPlugin } = {\n estree,\n jsx,\n flow,\n typescript,\n v8intrinsic,\n placeholders,\n};\n\nexport const mixinPluginNames: $ReadOnlyArray<string> =\n Object.keys(mixinPlugins);\n","// @flow\n\nimport type { PluginList } from \"./plugin-utils\";\n\n// A second optional argument can be given to further configure\n// the parser process. These options are recognized:\n\nexport type SourceType = \"script\" | \"module\" | \"unambiguous\";\n\nexport type Options = {\n sourceType: SourceType,\n sourceFilename?: string,\n startLine: number,\n allowAwaitOutsideFunction: boolean,\n allowReturnOutsideFunction: boolean,\n allowImportExportEverywhere: boolean,\n allowSuperOutsideMethod: boolean,\n allowUndeclaredExports: boolean,\n plugins: PluginList,\n strictMode: ?boolean,\n ranges: boolean,\n tokens: boolean,\n createParenthesizedExpressions: boolean,\n errorRecovery: boolean,\n};\n\nexport const defaultOptions: Options = {\n // Source type (\"script\" or \"module\") for different semantics\n sourceType: \"script\",\n // Source filename.\n sourceFilename: undefined,\n // Line from which to start counting source. Useful for\n // integration with other tools.\n startLine: 1,\n // When enabled, await at the top level is not considered an\n // error.\n allowAwaitOutsideFunction: false,\n // When enabled, a return at the top level is not considered an\n // error.\n allowReturnOutsideFunction: false,\n // When enabled, import/export statements are not constrained to\n // appearing at the top of the program.\n allowImportExportEverywhere: false,\n // TODO\n allowSuperOutsideMethod: false,\n // When enabled, export statements can reference undeclared variables.\n allowUndeclaredExports: false,\n // An array of plugins to enable\n plugins: [],\n // TODO\n strictMode: null,\n // Nodes have their start and end characters offsets recorded in\n // `start` and `end` properties (directly on the node, rather than\n // the `loc` object, which holds line/column data. To also add a\n // [semi-standardized][range] `range` property holding a `[start,\n // end]` array with the same numbers, set the `ranges` option to\n // `true`.\n //\n // [range]: https://bugzilla.mozilla.org/show_bug.cgi?id=745678\n ranges: false,\n // Adds all parsed tokens to a `tokens` property on the `File` node\n tokens: false,\n // Whether to create ParenthesizedExpression AST nodes (if false\n // the parser sets extra.parenthesized on the expression nodes instead).\n createParenthesizedExpressions: false,\n // When enabled, errors are attached to the AST instead of being directly thrown.\n // Some errors will still throw, because @babel/parser can't always recover.\n errorRecovery: false,\n};\n\n// Interpret and default an options object\n\nexport function getOptions(opts: ?Options): Options {\n const options: any = {};\n for (const key of Object.keys(defaultOptions)) {\n options[key] = opts && opts[key] != null ? opts[key] : defaultOptions[key];\n }\n return options;\n}\n","// @flow\n\n/*:: declare var invariant; */\n\nimport type { Options } from \"../options\";\nimport * as N from \"../types\";\nimport type { Position } from \"../util/location\";\nimport * as charCodes from \"charcodes\";\nimport { isIdentifierStart, isIdentifierChar } from \"../util/identifier\";\nimport { types as tt, keywords as keywordTypes, type TokenType } from \"./types\";\nimport { type TokContext, types as ct } from \"./context\";\nimport ParserErrors, { Errors, type ErrorTemplate } from \"../parser/error\";\nimport { SourceLocation } from \"../util/location\";\nimport {\n lineBreak,\n lineBreakG,\n isNewLine,\n isWhitespace,\n skipWhiteSpace,\n} from \"../util/whitespace\";\nimport State from \"./state\";\nimport type { LookaheadState } from \"./state\";\n\nconst VALID_REGEX_FLAGS = new Set([\"g\", \"m\", \"s\", \"i\", \"y\", \"u\", \"d\"]);\n\n// The following character codes are forbidden from being\n// an immediate sibling of NumericLiteralSeparator _\n\nconst forbiddenNumericSeparatorSiblings = {\n decBinOct: [\n charCodes.dot,\n charCodes.uppercaseB,\n charCodes.uppercaseE,\n charCodes.uppercaseO,\n charCodes.underscore, // multiple separators are not allowed\n charCodes.lowercaseB,\n charCodes.lowercaseE,\n charCodes.lowercaseO,\n ],\n hex: [\n charCodes.dot,\n charCodes.uppercaseX,\n charCodes.underscore, // multiple separators are not allowed\n charCodes.lowercaseX,\n ],\n};\n\nconst allowedNumericSeparatorSiblings = {};\nallowedNumericSeparatorSiblings.bin = [\n // 0 - 1\n charCodes.digit0,\n charCodes.digit1,\n];\nallowedNumericSeparatorSiblings.oct = [\n // 0 - 7\n ...allowedNumericSeparatorSiblings.bin,\n\n charCodes.digit2,\n charCodes.digit3,\n charCodes.digit4,\n charCodes.digit5,\n charCodes.digit6,\n charCodes.digit7,\n];\nallowedNumericSeparatorSiblings.dec = [\n // 0 - 9\n ...allowedNumericSeparatorSiblings.oct,\n\n charCodes.digit8,\n charCodes.digit9,\n];\n\nallowedNumericSeparatorSiblings.hex = [\n // 0 - 9, A - F, a - f,\n ...allowedNumericSeparatorSiblings.dec,\n\n charCodes.uppercaseA,\n charCodes.uppercaseB,\n charCodes.uppercaseC,\n charCodes.uppercaseD,\n charCodes.uppercaseE,\n charCodes.uppercaseF,\n\n charCodes.lowercaseA,\n charCodes.lowercaseB,\n charCodes.lowercaseC,\n charCodes.lowercaseD,\n charCodes.lowercaseE,\n charCodes.lowercaseF,\n];\n\n// Object type used to represent tokens. Note that normally, tokens\n// simply exist as properties on the parser object. This is only\n// used for the onToken callback and the external tokenizer.\n\nexport class Token {\n constructor(state: State) {\n this.type = state.type;\n this.value = state.value;\n this.start = state.start;\n this.end = state.end;\n this.loc = new SourceLocation(state.startLoc, state.endLoc);\n }\n\n declare type: TokenType;\n declare value: any;\n declare start: number;\n declare end: number;\n declare loc: SourceLocation;\n}\n\n// ## Tokenizer\n\nexport default class Tokenizer extends ParserErrors {\n // Forward-declarations\n // parser/util.js\n /*::\n +hasPrecedingLineBreak: () => boolean;\n +unexpected: (pos?: ?number, messageOrType?: ErrorTemplate | TokenType) => empty;\n +expectPlugin: (name: string, pos?: ?number) => true;\n */\n\n isLookahead: boolean;\n\n // Token store.\n tokens: Array<Token | N.Comment> = [];\n\n constructor(options: Options, input: string) {\n super();\n this.state = new State();\n this.state.init(options);\n this.input = input;\n this.length = input.length;\n this.isLookahead = false;\n }\n\n pushToken(token: Token | N.Comment) {\n // Pop out invalid tokens trapped by try-catch parsing.\n // Those parsing branches are mainly created by typescript and flow plugins.\n this.tokens.length = this.state.tokensLength;\n this.tokens.push(token);\n ++this.state.tokensLength;\n }\n\n // Move to the next token\n\n next(): void {\n this.checkKeywordEscapes();\n if (this.options.tokens) {\n this.pushToken(new Token(this.state));\n }\n\n this.state.lastTokEnd = this.state.end;\n this.state.lastTokStart = this.state.start;\n this.state.lastTokEndLoc = this.state.endLoc;\n this.state.lastTokStartLoc = this.state.startLoc;\n this.nextToken();\n }\n\n // TODO\n\n eat(type: TokenType): boolean {\n if (this.match(type)) {\n this.next();\n return true;\n } else {\n return false;\n }\n }\n\n // TODO\n\n match(type: TokenType): boolean {\n return this.state.type === type;\n }\n\n /**\n * Create a LookaheadState from current parser state\n *\n * @param {State} state\n * @returns {LookaheadState}\n * @memberof Tokenizer\n */\n createLookaheadState(state: State): LookaheadState {\n return {\n pos: state.pos,\n value: null,\n type: state.type,\n start: state.start,\n end: state.end,\n lastTokEnd: state.end,\n context: [this.curContext()],\n inType: state.inType,\n };\n }\n\n /**\n * lookahead peeks the next token, skipping changes to token context and\n * comment stack. For performance it returns a limited LookaheadState\n * instead of full parser state.\n *\n * The { column, line } Loc info is not included in lookahead since such usage\n * is rare. Although it may return other location properties e.g. `curLine` and\n * `lineStart`, these properties are not listed in the LookaheadState interface\n * and thus the returned value is _NOT_ reliable.\n *\n * The tokenizer should make best efforts to avoid using any parser state\n * other than those defined in LookaheadState\n *\n * @returns {LookaheadState}\n * @memberof Tokenizer\n */\n lookahead(): LookaheadState {\n const old = this.state;\n // For performance we use a simpified tokenizer state structure\n // $FlowIgnore\n this.state = this.createLookaheadState(old);\n\n this.isLookahead = true;\n this.nextToken();\n this.isLookahead = false;\n\n const curr = this.state;\n this.state = old;\n return curr;\n }\n\n nextTokenStart(): number {\n return this.nextTokenStartSince(this.state.pos);\n }\n\n nextTokenStartSince(pos: number): number {\n skipWhiteSpace.lastIndex = pos;\n const skip = skipWhiteSpace.exec(this.input);\n // $FlowIgnore: The skipWhiteSpace ensures to match any string\n return pos + skip[0].length;\n }\n\n lookaheadCharCode(): number {\n return this.input.charCodeAt(this.nextTokenStart());\n }\n\n codePointAtPos(pos: number): number {\n // The implementation is based on\n // https://source.chromium.org/chromium/chromium/src/+/master:v8/src/builtins/builtins-string-gen.cc;l=1455;drc=221e331b49dfefadbc6fa40b0c68e6f97606d0b3;bpv=0;bpt=1\n // We reimplement `codePointAt` because `codePointAt` is a V8 builtin which is not inlined by TurboFan (as of M91)\n // since `input` is mostly ASCII, an inlined `charCodeAt` wins here\n let cp = this.input.charCodeAt(pos);\n if ((cp & 0xfc00) === 0xd800 && ++pos < this.input.length) {\n const trail = this.input.charCodeAt(pos);\n if ((trail & 0xfc00) === 0xdc00) {\n cp = 0x10000 + ((cp & 0x3ff) << 10) + (trail & 0x3ff);\n }\n }\n return cp;\n }\n\n // Toggle strict mode. Re-reads the next number or string to please\n // pedantic tests (`\"use strict\"; 010;` should fail).\n\n setStrict(strict: boolean): void {\n this.state.strict = strict;\n if (strict) {\n // Throw an error for any string decimal escape found before/immediately\n // after a \"use strict\" directive. Strict mode will be set at parse\n // time for any literals that occur after the next node of the strict\n // directive.\n this.state.strictErrors.forEach((message, pos) =>\n /* eslint-disable @babel/development-internal/dry-error-messages */\n this.raise(pos, message),\n );\n this.state.strictErrors.clear();\n }\n }\n\n curContext(): TokContext {\n return this.state.context[this.state.context.length - 1];\n }\n\n // Read a single token, updating the parser object's token-related\n // properties.\n\n nextToken(): void {\n const curContext = this.curContext();\n if (!curContext.preserveSpace) this.skipSpace();\n this.state.start = this.state.pos;\n if (!this.isLookahead) this.state.startLoc = this.state.curPosition();\n if (this.state.pos >= this.length) {\n this.finishToken(tt.eof);\n return;\n }\n\n if (curContext === ct.template) {\n this.readTmplToken();\n } else {\n this.getTokenFromCode(this.codePointAtPos(this.state.pos));\n }\n }\n\n pushComment(\n block: boolean,\n text: string,\n start: number,\n end: number,\n startLoc: Position,\n endLoc: Position,\n ): void {\n const comment = {\n type: block ? \"CommentBlock\" : \"CommentLine\",\n value: text,\n start: start,\n end: end,\n loc: new SourceLocation(startLoc, endLoc),\n };\n\n if (this.options.tokens) this.pushToken(comment);\n this.state.comments.push(comment);\n this.addComment(comment);\n }\n\n skipBlockComment(): void {\n let startLoc;\n if (!this.isLookahead) startLoc = this.state.curPosition();\n const start = this.state.pos;\n const end = this.input.indexOf(\"*/\", this.state.pos + 2);\n if (end === -1) throw this.raise(start, Errors.UnterminatedComment);\n\n this.state.pos = end + 2;\n lineBreakG.lastIndex = start;\n let match;\n while (\n (match = lineBreakG.exec(this.input)) &&\n match.index < this.state.pos\n ) {\n ++this.state.curLine;\n this.state.lineStart = match.index + match[0].length;\n }\n\n // If we are doing a lookahead right now we need to advance the position (above code)\n // but we do not want to push the comment to the state.\n if (this.isLookahead) return;\n /*:: invariant(startLoc) */\n\n this.pushComment(\n true,\n this.input.slice(start + 2, end),\n start,\n this.state.pos,\n startLoc,\n this.state.curPosition(),\n );\n }\n\n skipLineComment(startSkip: number): void {\n const start = this.state.pos;\n let startLoc;\n if (!this.isLookahead) startLoc = this.state.curPosition();\n let ch = this.input.charCodeAt((this.state.pos += startSkip));\n if (this.state.pos < this.length) {\n while (!isNewLine(ch) && ++this.state.pos < this.length) {\n ch = this.input.charCodeAt(this.state.pos);\n }\n }\n\n // If we are doing a lookahead right now we need to advance the position (above code)\n // but we do not want to push the comment to the state.\n if (this.isLookahead) return;\n /*:: invariant(startLoc) */\n\n this.pushComment(\n false,\n this.input.slice(start + startSkip, this.state.pos),\n start,\n this.state.pos,\n startLoc,\n this.state.curPosition(),\n );\n }\n\n // Called at the start of the parse and after every token. Skips\n // whitespace and comments, and.\n\n skipSpace(): void {\n loop: while (this.state.pos < this.length) {\n const ch = this.input.charCodeAt(this.state.pos);\n switch (ch) {\n case charCodes.space:\n case charCodes.nonBreakingSpace:\n case charCodes.tab:\n ++this.state.pos;\n break;\n case charCodes.carriageReturn:\n if (\n this.input.charCodeAt(this.state.pos + 1) === charCodes.lineFeed\n ) {\n ++this.state.pos;\n }\n // fall through\n case charCodes.lineFeed:\n case charCodes.lineSeparator:\n case charCodes.paragraphSeparator:\n ++this.state.pos;\n ++this.state.curLine;\n this.state.lineStart = this.state.pos;\n break;\n\n case charCodes.slash:\n switch (this.input.charCodeAt(this.state.pos + 1)) {\n case charCodes.asterisk:\n this.skipBlockComment();\n break;\n\n case charCodes.slash:\n this.skipLineComment(2);\n break;\n\n default:\n break loop;\n }\n break;\n\n default:\n if (isWhitespace(ch)) {\n ++this.state.pos;\n } else {\n break loop;\n }\n }\n }\n }\n\n // Called at the end of every token. Sets `end`, `val`, and\n // maintains `context` and `exprAllowed`, and skips the space after\n // the token, so that the next one's `start` will point at the\n // right position.\n\n finishToken(type: TokenType, val: any): void {\n this.state.end = this.state.pos;\n const prevType = this.state.type;\n this.state.type = type;\n this.state.value = val;\n\n if (!this.isLookahead) {\n this.state.endLoc = this.state.curPosition();\n this.updateContext(prevType);\n }\n }\n\n // ### Token reading\n\n // This is the function that is called to fetch the next token. It\n // is somewhat obscure, because it works in character codes rather\n // than characters, and because operator parsing has been inlined\n // into it.\n //\n // All in the name of speed.\n\n // number sign is \"#\"\n readToken_numberSign(): void {\n if (this.state.pos === 0 && this.readToken_interpreter()) {\n return;\n }\n\n const nextPos = this.state.pos + 1;\n const next = this.codePointAtPos(nextPos);\n if (next >= charCodes.digit0 && next <= charCodes.digit9) {\n throw this.raise(this.state.pos, Errors.UnexpectedDigitAfterHash);\n }\n\n if (\n next === charCodes.leftCurlyBrace ||\n (next === charCodes.leftSquareBracket && this.hasPlugin(\"recordAndTuple\"))\n ) {\n // When we see `#{`, it is likely to be a hash record.\n // However we don't yell at `#[` since users may intend to use \"computed private fields\",\n // which is not allowed in the spec. Throwing expecting recordAndTuple is\n // misleading\n this.expectPlugin(\"recordAndTuple\");\n if (this.getPluginOption(\"recordAndTuple\", \"syntaxType\") !== \"hash\") {\n throw this.raise(\n this.state.pos,\n next === charCodes.leftCurlyBrace\n ? Errors.RecordExpressionHashIncorrectStartSyntaxType\n : Errors.TupleExpressionHashIncorrectStartSyntaxType,\n );\n }\n\n this.state.pos += 2;\n if (next === charCodes.leftCurlyBrace) {\n // #{\n this.finishToken(tt.braceHashL);\n } else {\n // #[\n this.finishToken(tt.bracketHashL);\n }\n } else if (isIdentifierStart(next)) {\n ++this.state.pos;\n this.finishToken(tt.privateName, this.readWord1(next));\n } else if (next === charCodes.backslash) {\n ++this.state.pos;\n this.finishToken(tt.privateName, this.readWord1());\n } else {\n this.finishOp(tt.hash, 1);\n }\n }\n\n readToken_dot(): void {\n const next = this.input.charCodeAt(this.state.pos + 1);\n if (next >= charCodes.digit0 && next <= charCodes.digit9) {\n this.readNumber(true);\n return;\n }\n\n if (\n next === charCodes.dot &&\n this.input.charCodeAt(this.state.pos + 2) === charCodes.dot\n ) {\n this.state.pos += 3;\n this.finishToken(tt.ellipsis);\n } else {\n ++this.state.pos;\n this.finishToken(tt.dot);\n }\n }\n\n readToken_slash(): void {\n const next = this.input.charCodeAt(this.state.pos + 1);\n if (next === charCodes.equalsTo) {\n this.finishOp(tt.slashAssign, 2);\n } else {\n this.finishOp(tt.slash, 1);\n }\n }\n\n readToken_interpreter(): boolean {\n if (this.state.pos !== 0 || this.length < 2) return false;\n\n let ch = this.input.charCodeAt(this.state.pos + 1);\n if (ch !== charCodes.exclamationMark) return false;\n\n const start = this.state.pos;\n this.state.pos += 1;\n\n while (!isNewLine(ch) && ++this.state.pos < this.length) {\n ch = this.input.charCodeAt(this.state.pos);\n }\n\n const value = this.input.slice(start + 2, this.state.pos);\n\n this.finishToken(tt.interpreterDirective, value);\n\n return true;\n }\n\n readToken_mult_modulo(code: number): void {\n // '%*'\n let type = code === charCodes.asterisk ? tt.star : tt.modulo;\n let width = 1;\n let next = this.input.charCodeAt(this.state.pos + 1);\n\n // Exponentiation operator **\n if (code === charCodes.asterisk && next === charCodes.asterisk) {\n width++;\n next = this.input.charCodeAt(this.state.pos + 2);\n type = tt.exponent;\n }\n\n if (next === charCodes.equalsTo && !this.state.inType) {\n width++;\n type = tt.assign;\n }\n\n this.finishOp(type, width);\n }\n\n readToken_pipe_amp(code: number): void {\n // '||' '&&' '||=' '&&='\n const next = this.input.charCodeAt(this.state.pos + 1);\n\n if (next === code) {\n if (this.input.charCodeAt(this.state.pos + 2) === charCodes.equalsTo) {\n this.finishOp(tt.assign, 3);\n } else {\n this.finishOp(\n code === charCodes.verticalBar ? tt.logicalOR : tt.logicalAND,\n 2,\n );\n }\n return;\n }\n\n if (code === charCodes.verticalBar) {\n // '|>'\n if (next === charCodes.greaterThan) {\n this.finishOp(tt.pipeline, 2);\n return;\n }\n // '|}'\n if (\n this.hasPlugin(\"recordAndTuple\") &&\n next === charCodes.rightCurlyBrace\n ) {\n if (this.getPluginOption(\"recordAndTuple\", \"syntaxType\") !== \"bar\") {\n throw this.raise(\n this.state.pos,\n Errors.RecordExpressionBarIncorrectEndSyntaxType,\n );\n }\n this.state.pos += 2;\n this.finishToken(tt.braceBarR);\n return;\n }\n\n // '|]'\n if (\n this.hasPlugin(\"recordAndTuple\") &&\n next === charCodes.rightSquareBracket\n ) {\n if (this.getPluginOption(\"recordAndTuple\", \"syntaxType\") !== \"bar\") {\n throw this.raise(\n this.state.pos,\n Errors.TupleExpressionBarIncorrectEndSyntaxType,\n );\n }\n this.state.pos += 2;\n this.finishToken(tt.bracketBarR);\n return;\n }\n }\n\n if (next === charCodes.equalsTo) {\n this.finishOp(tt.assign, 2);\n return;\n }\n\n this.finishOp(\n code === charCodes.verticalBar ? tt.bitwiseOR : tt.bitwiseAND,\n 1,\n );\n }\n\n readToken_caret(): void {\n // '^'\n const next = this.input.charCodeAt(this.state.pos + 1);\n if (next === charCodes.equalsTo) {\n this.finishOp(tt.assign, 2);\n } else {\n this.finishOp(tt.bitwiseXOR, 1);\n }\n }\n\n readToken_plus_min(code: number): void {\n // '+-'\n const next = this.input.charCodeAt(this.state.pos + 1);\n\n if (next === code) {\n if (\n next === charCodes.dash &&\n !this.inModule &&\n this.input.charCodeAt(this.state.pos + 2) === charCodes.greaterThan &&\n (this.state.lastTokEnd === 0 || this.hasPrecedingLineBreak())\n ) {\n // A `-->` line comment\n this.skipLineComment(3);\n this.skipSpace();\n this.nextToken();\n return;\n }\n this.finishOp(tt.incDec, 2);\n return;\n }\n\n if (next === charCodes.equalsTo) {\n this.finishOp(tt.assign, 2);\n } else {\n this.finishOp(tt.plusMin, 1);\n }\n }\n\n readToken_lt_gt(code: number): void {\n // '<>'\n const next = this.input.charCodeAt(this.state.pos + 1);\n let size = 1;\n\n if (next === code) {\n size =\n code === charCodes.greaterThan &&\n this.input.charCodeAt(this.state.pos + 2) === charCodes.greaterThan\n ? 3\n : 2;\n if (this.input.charCodeAt(this.state.pos + size) === charCodes.equalsTo) {\n this.finishOp(tt.assign, size + 1);\n return;\n }\n this.finishOp(tt.bitShift, size);\n return;\n }\n\n if (\n next === charCodes.exclamationMark &&\n code === charCodes.lessThan &&\n !this.inModule &&\n this.input.charCodeAt(this.state.pos + 2) === charCodes.dash &&\n this.input.charCodeAt(this.state.pos + 3) === charCodes.dash\n ) {\n // `<!--`, an XML-style comment that should be interpreted as a line comment\n this.skipLineComment(4);\n this.skipSpace();\n this.nextToken();\n return;\n }\n\n if (next === charCodes.equalsTo) {\n // <= | >=\n size = 2;\n }\n\n this.finishOp(tt.relational, size);\n }\n\n readToken_eq_excl(code: number): void {\n // '=!'\n const next = this.input.charCodeAt(this.state.pos + 1);\n if (next === charCodes.equalsTo) {\n this.finishOp(\n tt.equality,\n this.input.charCodeAt(this.state.pos + 2) === charCodes.equalsTo\n ? 3\n : 2,\n );\n return;\n }\n if (code === charCodes.equalsTo && next === charCodes.greaterThan) {\n // '=>'\n this.state.pos += 2;\n this.finishToken(tt.arrow);\n return;\n }\n this.finishOp(code === charCodes.equalsTo ? tt.eq : tt.bang, 1);\n }\n\n readToken_question(): void {\n // '?'\n const next = this.input.charCodeAt(this.state.pos + 1);\n const next2 = this.input.charCodeAt(this.state.pos + 2);\n if (next === charCodes.questionMark) {\n if (next2 === charCodes.equalsTo) {\n // '??='\n this.finishOp(tt.assign, 3);\n } else {\n // '??'\n this.finishOp(tt.nullishCoalescing, 2);\n }\n } else if (\n next === charCodes.dot &&\n !(next2 >= charCodes.digit0 && next2 <= charCodes.digit9)\n ) {\n // '.' not followed by a number\n this.state.pos += 2;\n this.finishToken(tt.questionDot);\n } else {\n ++this.state.pos;\n this.finishToken(tt.question);\n }\n }\n\n getTokenFromCode(code: number): void {\n switch (code) {\n // The interpretation of a dot depends on whether it is followed\n // by a digit or another two dots.\n\n case charCodes.dot:\n this.readToken_dot();\n return;\n\n // Punctuation tokens.\n case charCodes.leftParenthesis:\n ++this.state.pos;\n this.finishToken(tt.parenL);\n return;\n case charCodes.rightParenthesis:\n ++this.state.pos;\n this.finishToken(tt.parenR);\n return;\n case charCodes.semicolon:\n ++this.state.pos;\n this.finishToken(tt.semi);\n return;\n case charCodes.comma:\n ++this.state.pos;\n this.finishToken(tt.comma);\n return;\n case charCodes.leftSquareBracket:\n if (\n this.hasPlugin(\"recordAndTuple\") &&\n this.input.charCodeAt(this.state.pos + 1) === charCodes.verticalBar\n ) {\n if (this.getPluginOption(\"recordAndTuple\", \"syntaxType\") !== \"bar\") {\n throw this.raise(\n this.state.pos,\n Errors.TupleExpressionBarIncorrectStartSyntaxType,\n );\n }\n\n // [|\n this.state.pos += 2;\n this.finishToken(tt.bracketBarL);\n } else {\n ++this.state.pos;\n this.finishToken(tt.bracketL);\n }\n return;\n case charCodes.rightSquareBracket:\n ++this.state.pos;\n this.finishToken(tt.bracketR);\n return;\n case charCodes.leftCurlyBrace:\n if (\n this.hasPlugin(\"recordAndTuple\") &&\n this.input.charCodeAt(this.state.pos + 1) === charCodes.verticalBar\n ) {\n if (this.getPluginOption(\"recordAndTuple\", \"syntaxType\") !== \"bar\") {\n throw this.raise(\n this.state.pos,\n Errors.RecordExpressionBarIncorrectStartSyntaxType,\n );\n }\n\n // {|\n this.state.pos += 2;\n this.finishToken(tt.braceBarL);\n } else {\n ++this.state.pos;\n this.finishToken(tt.braceL);\n }\n return;\n case charCodes.rightCurlyBrace:\n ++this.state.pos;\n this.finishToken(tt.braceR);\n return;\n\n case charCodes.colon:\n if (\n this.hasPlugin(\"functionBind\") &&\n this.input.charCodeAt(this.state.pos + 1) === charCodes.colon\n ) {\n this.finishOp(tt.doubleColon, 2);\n } else {\n ++this.state.pos;\n this.finishToken(tt.colon);\n }\n return;\n\n case charCodes.questionMark:\n this.readToken_question();\n return;\n\n case charCodes.graveAccent:\n ++this.state.pos;\n this.finishToken(tt.backQuote);\n return;\n\n case charCodes.digit0: {\n const next = this.input.charCodeAt(this.state.pos + 1);\n // '0x', '0X' - hex number\n if (next === charCodes.lowercaseX || next === charCodes.uppercaseX) {\n this.readRadixNumber(16);\n return;\n }\n // '0o', '0O' - octal number\n if (next === charCodes.lowercaseO || next === charCodes.uppercaseO) {\n this.readRadixNumber(8);\n return;\n }\n // '0b', '0B' - binary number\n if (next === charCodes.lowercaseB || next === charCodes.uppercaseB) {\n this.readRadixNumber(2);\n return;\n }\n }\n // Anything else beginning with a digit is an integer, octal\n // number, or float. (fall through)\n case charCodes.digit1:\n case charCodes.digit2:\n case charCodes.digit3:\n case charCodes.digit4:\n case charCodes.digit5:\n case charCodes.digit6:\n case charCodes.digit7:\n case charCodes.digit8:\n case charCodes.digit9:\n this.readNumber(false);\n return;\n\n // Quotes produce strings.\n case charCodes.quotationMark:\n case charCodes.apostrophe:\n this.readString(code);\n return;\n\n // Operators are parsed inline in tiny state machines. '=' (charCodes.equalsTo) is\n // often referred to. `finishOp` simply skips the amount of\n // characters it is given as second argument, and returns a token\n // of the type given by its first argument.\n\n case charCodes.slash:\n this.readToken_slash();\n return;\n\n case charCodes.percentSign:\n case charCodes.asterisk:\n this.readToken_mult_modulo(code);\n return;\n\n case charCodes.verticalBar:\n case charCodes.ampersand:\n this.readToken_pipe_amp(code);\n return;\n\n case charCodes.caret:\n this.readToken_caret();\n return;\n\n case charCodes.plusSign:\n case charCodes.dash:\n this.readToken_plus_min(code);\n return;\n\n case charCodes.lessThan:\n case charCodes.greaterThan:\n this.readToken_lt_gt(code);\n return;\n\n case charCodes.equalsTo:\n case charCodes.exclamationMark:\n this.readToken_eq_excl(code);\n return;\n\n case charCodes.tilde:\n this.finishOp(tt.tilde, 1);\n return;\n\n case charCodes.atSign:\n ++this.state.pos;\n this.finishToken(tt.at);\n return;\n\n case charCodes.numberSign:\n this.readToken_numberSign();\n return;\n\n case charCodes.backslash:\n this.readWord();\n return;\n\n default:\n if (isIdentifierStart(code)) {\n this.readWord(code);\n return;\n }\n }\n\n throw this.raise(\n this.state.pos,\n Errors.InvalidOrUnexpectedToken,\n String.fromCodePoint(code),\n );\n }\n\n finishOp(type: TokenType, size: number): void {\n const str = this.input.slice(this.state.pos, this.state.pos + size);\n this.state.pos += size;\n this.finishToken(type, str);\n }\n\n readRegexp(): void {\n const start = this.state.start + 1;\n let escaped, inClass;\n for (;;) {\n if (this.state.pos >= this.length) {\n throw this.raise(start, Errors.UnterminatedRegExp);\n }\n const ch = this.input.charAt(this.state.pos);\n if (lineBreak.test(ch)) {\n throw this.raise(start, Errors.UnterminatedRegExp);\n }\n if (escaped) {\n escaped = false;\n } else {\n if (ch === \"[\") {\n inClass = true;\n } else if (ch === \"]\" && inClass) {\n inClass = false;\n } else if (ch === \"/\" && !inClass) {\n break;\n }\n escaped = ch === \"\\\\\";\n }\n ++this.state.pos;\n }\n const content = this.input.slice(start, this.state.pos);\n ++this.state.pos;\n\n let mods = \"\";\n\n while (this.state.pos < this.length) {\n const char = this.input[this.state.pos];\n const charCode = this.codePointAtPos(this.state.pos);\n\n if (VALID_REGEX_FLAGS.has(char)) {\n if (mods.indexOf(char) > -1) {\n this.raise(this.state.pos + 1, Errors.DuplicateRegExpFlags);\n }\n } else if (\n isIdentifierChar(charCode) ||\n charCode === charCodes.backslash\n ) {\n this.raise(this.state.pos + 1, Errors.MalformedRegExpFlags);\n } else {\n break;\n }\n\n ++this.state.pos;\n mods += char;\n }\n\n this.finishToken(tt.regexp, {\n pattern: content,\n flags: mods,\n });\n }\n\n // Read an integer in the given radix. Return null if zero digits\n // were read, the integer value otherwise. When `len` is given, this\n // will return `null` unless the integer has exactly `len` digits.\n // When `forceLen` is `true`, it means that we already know that in case\n // of a malformed number we have to skip `len` characters anyway, instead\n // of bailing out early. For example, in \"\\u{123Z}\" we want to read up to }\n // anyway, while in \"\\u00Z\" we will stop at Z instead of consuming four\n // characters (and thus the closing quote).\n\n readInt(\n radix: number,\n len?: number,\n forceLen?: boolean,\n allowNumSeparator: boolean = true,\n ): number | null {\n const start = this.state.pos;\n const forbiddenSiblings =\n radix === 16\n ? forbiddenNumericSeparatorSiblings.hex\n : forbiddenNumericSeparatorSiblings.decBinOct;\n const allowedSiblings =\n radix === 16\n ? allowedNumericSeparatorSiblings.hex\n : radix === 10\n ? allowedNumericSeparatorSiblings.dec\n : radix === 8\n ? allowedNumericSeparatorSiblings.oct\n : allowedNumericSeparatorSiblings.bin;\n\n let invalid = false;\n let total = 0;\n\n for (let i = 0, e = len == null ? Infinity : len; i < e; ++i) {\n const code = this.input.charCodeAt(this.state.pos);\n let val;\n\n if (code === charCodes.underscore) {\n const prev = this.input.charCodeAt(this.state.pos - 1);\n const next = this.input.charCodeAt(this.state.pos + 1);\n if (allowedSiblings.indexOf(next) === -1) {\n this.raise(this.state.pos, Errors.UnexpectedNumericSeparator);\n } else if (\n forbiddenSiblings.indexOf(prev) > -1 ||\n forbiddenSiblings.indexOf(next) > -1 ||\n Number.isNaN(next)\n ) {\n this.raise(this.state.pos, Errors.UnexpectedNumericSeparator);\n }\n\n if (!allowNumSeparator) {\n this.raise(this.state.pos, Errors.NumericSeparatorInEscapeSequence);\n }\n\n // Ignore this _ character\n ++this.state.pos;\n continue;\n }\n\n if (code >= charCodes.lowercaseA) {\n val = code - charCodes.lowercaseA + charCodes.lineFeed;\n } else if (code >= charCodes.uppercaseA) {\n val = code - charCodes.uppercaseA + charCodes.lineFeed;\n } else if (charCodes.isDigit(code)) {\n val = code - charCodes.digit0; // 0-9\n } else {\n val = Infinity;\n }\n if (val >= radix) {\n // If we are in \"errorRecovery\" mode and we found a digit which is too big,\n // don't break the loop.\n\n if (this.options.errorRecovery && val <= 9) {\n val = 0;\n this.raise(this.state.start + i + 2, Errors.InvalidDigit, radix);\n } else if (forceLen) {\n val = 0;\n invalid = true;\n } else {\n break;\n }\n }\n ++this.state.pos;\n total = total * radix + val;\n }\n if (\n this.state.pos === start ||\n (len != null && this.state.pos - start !== len) ||\n invalid\n ) {\n return null;\n }\n\n return total;\n }\n\n readRadixNumber(radix: number): void {\n const start = this.state.pos;\n let isBigInt = false;\n\n this.state.pos += 2; // 0x\n const val = this.readInt(radix);\n if (val == null) {\n this.raise(this.state.start + 2, Errors.InvalidDigit, radix);\n }\n const next = this.input.charCodeAt(this.state.pos);\n\n if (next === charCodes.lowercaseN) {\n ++this.state.pos;\n isBigInt = true;\n } else if (next === charCodes.lowercaseM) {\n throw this.raise(start, Errors.InvalidDecimal);\n }\n\n if (isIdentifierStart(this.codePointAtPos(this.state.pos))) {\n throw this.raise(this.state.pos, Errors.NumberIdentifier);\n }\n\n if (isBigInt) {\n const str = this.input.slice(start, this.state.pos).replace(/[_n]/g, \"\");\n this.finishToken(tt.bigint, str);\n return;\n }\n\n this.finishToken(tt.num, val);\n }\n\n // Read an integer, octal integer, or floating-point number.\n\n readNumber(startsWithDot: boolean): void {\n const start = this.state.pos;\n let isFloat = false;\n let isBigInt = false;\n let isDecimal = false;\n let hasExponent = false;\n let isOctal = false;\n\n if (!startsWithDot && this.readInt(10) === null) {\n this.raise(start, Errors.InvalidNumber);\n }\n const hasLeadingZero =\n this.state.pos - start >= 2 &&\n this.input.charCodeAt(start) === charCodes.digit0;\n\n if (hasLeadingZero) {\n const integer = this.input.slice(start, this.state.pos);\n this.recordStrictModeErrors(start, Errors.StrictOctalLiteral);\n if (!this.state.strict) {\n // disallow numeric separators in non octal decimals and legacy octal likes\n const underscorePos = integer.indexOf(\"_\");\n if (underscorePos > 0) {\n this.raise(underscorePos + start, Errors.ZeroDigitNumericSeparator);\n }\n }\n isOctal = hasLeadingZero && !/[89]/.test(integer);\n }\n\n let next = this.input.charCodeAt(this.state.pos);\n if (next === charCodes.dot && !isOctal) {\n ++this.state.pos;\n this.readInt(10);\n isFloat = true;\n next = this.input.charCodeAt(this.state.pos);\n }\n\n if (\n (next === charCodes.uppercaseE || next === charCodes.lowercaseE) &&\n !isOctal\n ) {\n next = this.input.charCodeAt(++this.state.pos);\n if (next === charCodes.plusSign || next === charCodes.dash) {\n ++this.state.pos;\n }\n if (this.readInt(10) === null) {\n this.raise(start, Errors.InvalidOrMissingExponent);\n }\n isFloat = true;\n hasExponent = true;\n next = this.input.charCodeAt(this.state.pos);\n }\n\n if (next === charCodes.lowercaseN) {\n // disallow floats, legacy octal syntax and non octal decimals\n // new style octal (\"0o\") is handled in this.readRadixNumber\n if (isFloat || hasLeadingZero) {\n this.raise(start, Errors.InvalidBigIntLiteral);\n }\n ++this.state.pos;\n isBigInt = true;\n }\n\n if (next === charCodes.lowercaseM) {\n this.expectPlugin(\"decimal\", this.state.pos);\n if (hasExponent || hasLeadingZero) {\n this.raise(start, Errors.InvalidDecimal);\n }\n ++this.state.pos;\n isDecimal = true;\n }\n\n if (isIdentifierStart(this.codePointAtPos(this.state.pos))) {\n throw this.raise(this.state.pos, Errors.NumberIdentifier);\n }\n\n // remove \"_\" for numeric literal separator, and trailing `m` or `n`\n const str = this.input.slice(start, this.state.pos).replace(/[_mn]/g, \"\");\n\n if (isBigInt) {\n this.finishToken(tt.bigint, str);\n return;\n }\n\n if (isDecimal) {\n this.finishToken(tt.decimal, str);\n return;\n }\n\n const val = isOctal ? parseInt(str, 8) : parseFloat(str);\n this.finishToken(tt.num, val);\n }\n\n // Read a string value, interpreting backslash-escapes.\n\n readCodePoint(throwOnInvalid: boolean): number | null {\n const ch = this.input.charCodeAt(this.state.pos);\n let code;\n\n if (ch === charCodes.leftCurlyBrace) {\n const codePos = ++this.state.pos;\n code = this.readHexChar(\n this.input.indexOf(\"}\", this.state.pos) - this.state.pos,\n true,\n throwOnInvalid,\n );\n ++this.state.pos;\n if (code !== null && code > 0x10ffff) {\n if (throwOnInvalid) {\n this.raise(codePos, Errors.InvalidCodePoint);\n } else {\n return null;\n }\n }\n } else {\n code = this.readHexChar(4, false, throwOnInvalid);\n }\n return code;\n }\n\n readString(quote: number): void {\n let out = \"\",\n chunkStart = ++this.state.pos;\n for (;;) {\n if (this.state.pos >= this.length) {\n throw this.raise(this.state.start, Errors.UnterminatedString);\n }\n const ch = this.input.charCodeAt(this.state.pos);\n if (ch === quote) break;\n if (ch === charCodes.backslash) {\n out += this.input.slice(chunkStart, this.state.pos);\n // $FlowFixMe\n out += this.readEscapedChar(false);\n chunkStart = this.state.pos;\n } else if (\n ch === charCodes.lineSeparator ||\n ch === charCodes.paragraphSeparator\n ) {\n ++this.state.pos;\n ++this.state.curLine;\n this.state.lineStart = this.state.pos;\n } else if (isNewLine(ch)) {\n throw this.raise(this.state.start, Errors.UnterminatedString);\n } else {\n ++this.state.pos;\n }\n }\n out += this.input.slice(chunkStart, this.state.pos++);\n this.finishToken(tt.string, out);\n }\n\n // Reads template string tokens.\n\n readTmplToken(): void {\n let out = \"\",\n chunkStart = this.state.pos,\n containsInvalid = false;\n for (;;) {\n if (this.state.pos >= this.length) {\n throw this.raise(this.state.start, Errors.UnterminatedTemplate);\n }\n const ch = this.input.charCodeAt(this.state.pos);\n if (\n ch === charCodes.graveAccent ||\n (ch === charCodes.dollarSign &&\n this.input.charCodeAt(this.state.pos + 1) ===\n charCodes.leftCurlyBrace)\n ) {\n if (this.state.pos === this.state.start && this.match(tt.template)) {\n if (ch === charCodes.dollarSign) {\n this.state.pos += 2;\n this.finishToken(tt.dollarBraceL);\n return;\n } else {\n ++this.state.pos;\n this.finishToken(tt.backQuote);\n return;\n }\n }\n out += this.input.slice(chunkStart, this.state.pos);\n this.finishToken(tt.template, containsInvalid ? null : out);\n return;\n }\n if (ch === charCodes.backslash) {\n out += this.input.slice(chunkStart, this.state.pos);\n const escaped = this.readEscapedChar(true);\n if (escaped === null) {\n containsInvalid = true;\n } else {\n out += escaped;\n }\n chunkStart = this.state.pos;\n } else if (isNewLine(ch)) {\n out += this.input.slice(chunkStart, this.state.pos);\n ++this.state.pos;\n switch (ch) {\n case charCodes.carriageReturn:\n if (this.input.charCodeAt(this.state.pos) === charCodes.lineFeed) {\n ++this.state.pos;\n }\n // fall through\n case charCodes.lineFeed:\n out += \"\\n\";\n break;\n default:\n out += String.fromCharCode(ch);\n break;\n }\n ++this.state.curLine;\n this.state.lineStart = this.state.pos;\n chunkStart = this.state.pos;\n } else {\n ++this.state.pos;\n }\n }\n }\n\n recordStrictModeErrors(pos: number, message: ErrorTemplate) {\n if (this.state.strict && !this.state.strictErrors.has(pos)) {\n this.raise(pos, message);\n } else {\n this.state.strictErrors.set(pos, message);\n }\n }\n\n // Used to read escaped characters\n readEscapedChar(inTemplate: boolean): string | null {\n const throwOnInvalid = !inTemplate;\n const ch = this.input.charCodeAt(++this.state.pos);\n ++this.state.pos;\n switch (ch) {\n case charCodes.lowercaseN:\n return \"\\n\";\n case charCodes.lowercaseR:\n return \"\\r\";\n case charCodes.lowercaseX: {\n const code = this.readHexChar(2, false, throwOnInvalid);\n return code === null ? null : String.fromCharCode(code);\n }\n case charCodes.lowercaseU: {\n const code = this.readCodePoint(throwOnInvalid);\n return code === null ? null : String.fromCodePoint(code);\n }\n case charCodes.lowercaseT:\n return \"\\t\";\n case charCodes.lowercaseB:\n return \"\\b\";\n case charCodes.lowercaseV:\n return \"\\u000b\";\n case charCodes.lowercaseF:\n return \"\\f\";\n case charCodes.carriageReturn:\n if (this.input.charCodeAt(this.state.pos) === charCodes.lineFeed) {\n ++this.state.pos;\n }\n // fall through\n case charCodes.lineFeed:\n this.state.lineStart = this.state.pos;\n ++this.state.curLine;\n // fall through\n case charCodes.lineSeparator:\n case charCodes.paragraphSeparator:\n return \"\";\n case charCodes.digit8:\n case charCodes.digit9:\n if (inTemplate) {\n return null;\n } else {\n this.recordStrictModeErrors(\n this.state.pos - 1,\n Errors.StrictNumericEscape,\n );\n }\n // fall through\n default:\n if (ch >= charCodes.digit0 && ch <= charCodes.digit7) {\n const codePos = this.state.pos - 1;\n const match = this.input\n .substr(this.state.pos - 1, 3)\n .match(/^[0-7]+/);\n\n // This is never null, because of the if condition above.\n /*:: invariant(match !== null) */\n let octalStr = match[0];\n\n let octal = parseInt(octalStr, 8);\n if (octal > 255) {\n octalStr = octalStr.slice(0, -1);\n octal = parseInt(octalStr, 8);\n }\n this.state.pos += octalStr.length - 1;\n const next = this.input.charCodeAt(this.state.pos);\n if (\n octalStr !== \"0\" ||\n next === charCodes.digit8 ||\n next === charCodes.digit9\n ) {\n if (inTemplate) {\n return null;\n } else {\n this.recordStrictModeErrors(codePos, Errors.StrictNumericEscape);\n }\n }\n\n return String.fromCharCode(octal);\n }\n\n return String.fromCharCode(ch);\n }\n }\n\n // Used to read character escape sequences ('\\x', '\\u').\n\n readHexChar(\n len: number,\n forceLen: boolean,\n throwOnInvalid: boolean,\n ): number | null {\n const codePos = this.state.pos;\n const n = this.readInt(16, len, forceLen, false);\n if (n === null) {\n if (throwOnInvalid) {\n this.raise(codePos, Errors.InvalidEscapeSequence);\n } else {\n this.state.pos = codePos - 1;\n }\n }\n return n;\n }\n\n // Read an identifier, and return it as a string. Sets `this.state.containsEsc`\n // to whether the word contained a '\\u' escape.\n //\n // Incrementally adds only escaped chars, adding other chunks as-is\n // as a micro-optimization.\n //\n // When `firstCode` is given, it assumes it is always an identifier start and\n // will skip reading start position again\n\n readWord1(firstCode: number | void): string {\n this.state.containsEsc = false;\n let word = \"\";\n const start = this.state.pos;\n let chunkStart = this.state.pos;\n if (firstCode !== undefined) {\n this.state.pos += firstCode <= 0xffff ? 1 : 2;\n }\n\n while (this.state.pos < this.length) {\n const ch = this.codePointAtPos(this.state.pos);\n if (isIdentifierChar(ch)) {\n this.state.pos += ch <= 0xffff ? 1 : 2;\n } else if (ch === charCodes.backslash) {\n this.state.containsEsc = true;\n\n word += this.input.slice(chunkStart, this.state.pos);\n const escStart = this.state.pos;\n const identifierCheck =\n this.state.pos === start ? isIdentifierStart : isIdentifierChar;\n\n if (this.input.charCodeAt(++this.state.pos) !== charCodes.lowercaseU) {\n this.raise(this.state.pos, Errors.MissingUnicodeEscape);\n chunkStart = this.state.pos - 1;\n continue;\n }\n\n ++this.state.pos;\n const esc = this.readCodePoint(true);\n if (esc !== null) {\n if (!identifierCheck(esc)) {\n this.raise(escStart, Errors.EscapedCharNotAnIdentifier);\n }\n\n word += String.fromCodePoint(esc);\n }\n chunkStart = this.state.pos;\n } else {\n break;\n }\n }\n return word + this.input.slice(chunkStart, this.state.pos);\n }\n\n // Read an identifier or keyword token. Will check for reserved\n // words when necessary.\n\n readWord(firstCode: number | void): void {\n const word = this.readWord1(firstCode);\n const type = keywordTypes.get(word) || tt.name;\n this.finishToken(type, word);\n }\n\n checkKeywordEscapes(): void {\n const kw = this.state.type.keyword;\n if (kw && this.state.containsEsc) {\n this.raise(this.state.start, Errors.InvalidEscapedReservedWord, kw);\n }\n }\n\n // the prevType is required by the jsx plugin\n // eslint-disable-next-line no-unused-vars\n updateContext(prevType: TokenType): void {\n this.state.type.updateContext?.(this.state.context);\n }\n}\n","// @flow\n\nimport {\n CLASS_ELEMENT_KIND_ACCESSOR,\n CLASS_ELEMENT_FLAG_STATIC,\n type ClassElementTypes,\n} from \"./scopeflags\";\nimport { Errors, type raiseFunction } from \"../parser/error\";\n\nexport class ClassScope {\n // A list of private named declared in the current class\n privateNames: Set<string> = new Set();\n\n // A list of private getters of setters without their counterpart\n loneAccessors: Map<string, ClassElementTypes> = new Map();\n\n // A list of private names used before being defined, mapping to\n // their position.\n undefinedPrivateNames: Map<string, number> = new Map();\n}\n\nexport default class ClassScopeHandler {\n stack: Array<ClassScope> = [];\n declare raise: raiseFunction;\n undefinedPrivateNames: Map<string, number> = new Map();\n\n constructor(raise: raiseFunction) {\n this.raise = raise;\n }\n\n current(): ClassScope {\n return this.stack[this.stack.length - 1];\n }\n\n enter() {\n this.stack.push(new ClassScope());\n }\n\n exit() {\n const oldClassScope = this.stack.pop();\n\n // Migrate the usage of not yet defined private names to the outer\n // class scope, or raise an error if we reached the top-level scope.\n\n const current = this.current();\n\n // Array.from is needed because this is compiled to an array-like for loop\n for (const [name, pos] of Array.from(oldClassScope.undefinedPrivateNames)) {\n if (current) {\n if (!current.undefinedPrivateNames.has(name)) {\n current.undefinedPrivateNames.set(name, pos);\n }\n } else {\n this.raise(pos, Errors.InvalidPrivateFieldResolution, name);\n }\n }\n }\n\n declarePrivateName(\n name: string,\n elementType: ClassElementTypes,\n pos: number,\n ) {\n const classScope = this.current();\n let redefined = classScope.privateNames.has(name);\n\n if (elementType & CLASS_ELEMENT_KIND_ACCESSOR) {\n const accessor = redefined && classScope.loneAccessors.get(name);\n if (accessor) {\n const oldStatic = accessor & CLASS_ELEMENT_FLAG_STATIC;\n const newStatic = elementType & CLASS_ELEMENT_FLAG_STATIC;\n\n const oldKind = accessor & CLASS_ELEMENT_KIND_ACCESSOR;\n const newKind = elementType & CLASS_ELEMENT_KIND_ACCESSOR;\n\n // The private name can be duplicated only if it is used by\n // two accessors with different kind (get and set), and if\n // they have the same placement (static or not).\n redefined = oldKind === newKind || oldStatic !== newStatic;\n\n if (!redefined) classScope.loneAccessors.delete(name);\n } else if (!redefined) {\n classScope.loneAccessors.set(name, elementType);\n }\n }\n\n if (redefined) {\n this.raise(pos, Errors.PrivateNameRedeclaration, name);\n }\n\n classScope.privateNames.add(name);\n classScope.undefinedPrivateNames.delete(name);\n }\n\n usePrivateName(name: string, pos: number) {\n let classScope;\n for (classScope of this.stack) {\n if (classScope.privateNames.has(name)) return;\n }\n\n if (classScope) {\n classScope.undefinedPrivateNames.set(name, pos);\n } else {\n // top-level\n this.raise(pos, Errors.InvalidPrivateFieldResolution, name);\n }\n }\n}\n","// @flow\n\nimport type { ErrorTemplate, raiseFunction } from \"../parser/error\";\n\n/*:: declare var invariant; */\n/**\n * @module util/expression-scope\n\nExpressionScope is used to track declaration errors in these ambiguous patterns:\n\n- CoverParenthesizedExpressionAndArrowParameterList\n e.g. we don't know if `({ x })` is an parenthesized expression or an\n arrow function parameters until we see an `=>` after `)`.\n\n- CoverCallExpressionAndAsyncArrowHead\n e.g. we don't know if `async({ x })` is a call expression or an async arrow\n function parameters until we see an `=>` after `)`\n\nThe following declaration errors (@see parser/error-message) will be recorded in\nsome expression scopes and thrown later when we know what the ambigous pattern is\n\n- AwaitBindingIdentifier\n- AwaitExpressionFormalParameter\n- YieldInParameter\n- InvalidParenthesizedAssignment when parenthesized is an identifier\n\nThere are four different expression scope\n- Expression\n A general scope that represents program / function body / static block. No errors\n will be recorded nor thrown in this scope.\n\n- MaybeArrowParameterDeclaration\n A scope that represents ambiguous arrow head e.g. `(x)`. Errors will be recorded\n alongside parent scopes and thrown when `ExpressionScopeHandler#validateAsPattern`\n is called.\n\n- MaybeAsyncArrowParameterDeclaration\n A scope that represents ambiguous async arrow head e.g. `async(x)`. Errors will\n be recorded alongside parent scopes and thrown when\n `ExpressionScopeHandler#validateAsPattern` is called.\n\n- ParameterDeclaration\n A scope that represents unambiguous function parameters `function(x)`. Errors\n recorded in this scope will be thrown immediately. No errors will be recorded in\n this scope.\n\n// @see {@link https://docs.google.com/document/d/1FAvEp9EUK-G8kHfDIEo_385Hs2SUBCYbJ5H-NnLvq8M|V8 Expression Scope design docs}\n */\n\nconst kExpression = 0,\n kMaybeArrowParameterDeclaration = 1,\n kMaybeAsyncArrowParameterDeclaration = 2,\n kParameterDeclaration = 3;\n\ntype ExpressionScopeType = 0 | 1 | 2 | 3;\n\nclass ExpressionScope {\n type: ExpressionScopeType;\n\n constructor(type: ExpressionScopeType = kExpression) {\n this.type = type;\n }\n\n canBeArrowParameterDeclaration() {\n return (\n this.type === kMaybeAsyncArrowParameterDeclaration ||\n this.type === kMaybeArrowParameterDeclaration\n );\n }\n\n isCertainlyParameterDeclaration() {\n return this.type === kParameterDeclaration;\n }\n}\n\nclass ArrowHeadParsingScope extends ExpressionScope {\n errors: Map</* pos */ number, /* message */ ErrorTemplate> = new Map();\n constructor(type: 1 | 2) {\n super(type);\n }\n recordDeclarationError(pos: number, template: ErrorTemplate) {\n this.errors.set(pos, template);\n }\n clearDeclarationError(pos: number) {\n this.errors.delete(pos);\n }\n iterateErrors(iterator: (template: ErrorTemplate, pos: number) => void) {\n this.errors.forEach(iterator);\n }\n}\n\nexport default class ExpressionScopeHandler {\n stack: Array<ExpressionScope> = [new ExpressionScope()];\n declare raise: raiseFunction;\n constructor(raise: raiseFunction) {\n this.raise = raise;\n }\n enter(scope: ExpressionScope) {\n this.stack.push(scope);\n }\n\n exit() {\n this.stack.pop();\n }\n\n /**\n * Record likely parameter initializer errors\n *\n * When current scope is a ParameterDeclaration, the error will be thrown immediately,\n * otherwise it will be recorded to any ancestry MaybeArrowParameterDeclaration and\n * MaybeAsyncArrowParameterDeclaration scope until an Expression scope is seen.\n * @param {number} pos Error position\n * @param {ErrorTemplate} template Error template\n * @memberof ExpressionScopeHandler\n */\n recordParameterInitializerError(pos: number, template: ErrorTemplate): void {\n const { stack } = this;\n let i = stack.length - 1;\n let scope: ExpressionScope = stack[i];\n while (!scope.isCertainlyParameterDeclaration()) {\n if (scope.canBeArrowParameterDeclaration()) {\n /*:: invariant(scope instanceof ArrowHeadParsingScope) */\n scope.recordDeclarationError(pos, template);\n } else {\n /*:: invariant(scope.type == kExpression) */\n // Type-Expression is the boundary where initializer error can populate to\n return;\n }\n scope = stack[--i];\n }\n /* eslint-disable @babel/development-internal/dry-error-messages */\n this.raise(pos, template);\n }\n\n /**\n * Record parenthesized identifier errors\n *\n * A parenthesized identifier in LHS can be ambiguous because the assignment\n * can be transformed to an assignable later, but not vice versa:\n * For example, in `([(a) = []] = []) => {}`, we think `(a) = []` is an LHS in `[(a) = []]`,\n * an LHS within `[(a) = []] = []`. However the LHS chain is then transformed by toAssignable,\n * and we should throw assignment `(a)`, which is only valid in LHS. Hence we record the\n * location of parenthesized `(a)` to current scope if it is one of MaybeArrowParameterDeclaration\n * and MaybeAsyncArrowParameterDeclaration\n *\n * Unlike `recordParameterInitializerError`, we don't record to ancestry scope because we\n * validate arrow head parsing scope before exit, and then the LHS will be unambiguous:\n * For example, in `( x = ( [(a) = []] = [] ) ) => {}`, we should not record `(a)` in `( x = ... ) =>`\n * arrow scope because when we finish parsing `( [(a) = []] = [] )`, it is an unambiguous assignment\n * expression and can not be cast to pattern\n * @param {number} pos\n * @param {ErrorTemplate} template\n * @returns {void}\n * @memberof ExpressionScopeHandler\n */\n recordParenthesizedIdentifierError(\n pos: number,\n template: ErrorTemplate,\n ): void {\n const { stack } = this;\n const scope: ExpressionScope = stack[stack.length - 1];\n if (scope.isCertainlyParameterDeclaration()) {\n this.raise(pos, template);\n } else if (scope.canBeArrowParameterDeclaration()) {\n /*:: invariant(scope instanceof ArrowHeadParsingScope) */\n scope.recordDeclarationError(pos, template);\n } else {\n return;\n }\n }\n\n /**\n * Record likely async arrow parameter errors\n *\n * Errors will be recorded to any ancestry MaybeAsyncArrowParameterDeclaration\n * scope until an Expression scope is seen.\n * @param {number} pos\n * @param {ErrorTemplate} template\n * @memberof ExpressionScopeHandler\n */\n recordAsyncArrowParametersError(pos: number, template: ErrorTemplate): void {\n const { stack } = this;\n let i = stack.length - 1;\n let scope: ExpressionScope = stack[i];\n while (scope.canBeArrowParameterDeclaration()) {\n if (scope.type === kMaybeAsyncArrowParameterDeclaration) {\n /*:: invariant(scope instanceof ArrowHeadParsingScope) */\n scope.recordDeclarationError(pos, template);\n }\n scope = stack[--i];\n }\n }\n\n validateAsPattern(): void {\n const { stack } = this;\n const currentScope = stack[stack.length - 1];\n if (!currentScope.canBeArrowParameterDeclaration()) return;\n /*:: invariant(currentScope instanceof ArrowHeadParsingScope) */\n currentScope.iterateErrors((template, pos) => {\n /* eslint-disable @babel/development-internal/dry-error-messages */\n this.raise(pos, template);\n // iterate from parent scope\n let i = stack.length - 2;\n let scope = stack[i];\n while (scope.canBeArrowParameterDeclaration()) {\n /*:: invariant(scope instanceof ArrowHeadParsingScope) */\n scope.clearDeclarationError(pos);\n scope = stack[--i];\n }\n });\n }\n}\n\nexport function newParameterDeclarationScope() {\n return new ExpressionScope(kParameterDeclaration);\n}\n\nexport function newArrowHeadScope() {\n return new ArrowHeadParsingScope(kMaybeArrowParameterDeclaration);\n}\n\nexport function newAsyncArrowScope() {\n return new ArrowHeadParsingScope(kMaybeAsyncArrowParameterDeclaration);\n}\n\nexport function newExpressionScope() {\n return new ExpressionScope();\n}\n","// @flow\n\nimport { types as tt, TokenType } from \"../tokenizer/types\";\nimport Tokenizer from \"../tokenizer\";\nimport State from \"../tokenizer/state\";\nimport type { Node } from \"../types\";\nimport { lineBreak } from \"../util/whitespace\";\nimport { isIdentifierChar } from \"../util/identifier\";\nimport ClassScopeHandler from \"../util/class-scope\";\nimport ExpressionScopeHandler from \"../util/expression-scope\";\nimport { SCOPE_PROGRAM } from \"../util/scopeflags\";\nimport ProductionParameterHandler, {\n PARAM_AWAIT,\n PARAM,\n} from \"../util/production-parameter\";\nimport { Errors, type ErrorTemplate, ErrorCodes } from \"./error\";\n/*::\nimport type ScopeHandler from \"../util/scope\";\n*/\n\ntype TryParse<Node, Error, Thrown, Aborted, FailState> = {\n node: Node,\n error: Error,\n thrown: Thrown,\n aborted: Aborted,\n failState: FailState,\n};\n\n// ## Parser utilities\n\nexport default class UtilParser extends Tokenizer {\n // Forward-declaration: defined in parser/index.js\n /*::\n +getScopeHandler: () => Class<ScopeHandler<*>>;\n */\n\n // TODO\n\n addExtra(node: Node, key: string, val: any): void {\n if (!node) return;\n\n const extra = (node.extra = node.extra || {});\n extra[key] = val;\n }\n\n // TODO\n\n isRelational(op: \"<\" | \">\"): boolean {\n return this.match(tt.relational) && this.state.value === op;\n }\n\n // TODO\n\n expectRelational(op: \"<\" | \">\"): void {\n if (this.isRelational(op)) {\n this.next();\n } else {\n this.unexpected(null, tt.relational);\n }\n }\n\n // Tests whether parsed token is a contextual keyword.\n\n isContextual(name: string): boolean {\n return (\n this.match(tt.name) &&\n this.state.value === name &&\n !this.state.containsEsc\n );\n }\n\n isUnparsedContextual(nameStart: number, name: string): boolean {\n const nameEnd = nameStart + name.length;\n if (this.input.slice(nameStart, nameEnd) === name) {\n const nextCh = this.input.charCodeAt(nameEnd);\n return !(\n isIdentifierChar(nextCh) ||\n // check if `nextCh is between 0xd800 - 0xdbff,\n // if `nextCh` is NaN, `NaN & 0xfc00` is 0, the function\n // returns true\n (nextCh & 0xfc00) === 0xd800\n );\n }\n return false;\n }\n\n isLookaheadContextual(name: string): boolean {\n const next = this.nextTokenStart();\n return this.isUnparsedContextual(next, name);\n }\n\n // Consumes contextual keyword if possible.\n\n eatContextual(name: string): boolean {\n return this.isContextual(name) && this.eat(tt.name);\n }\n\n // Asserts that following token is given contextual keyword.\n\n expectContextual(name: string, template?: ErrorTemplate): void {\n if (!this.eatContextual(name)) this.unexpected(null, template);\n }\n\n // Test whether a semicolon can be inserted at the current position.\n\n canInsertSemicolon(): boolean {\n return (\n this.match(tt.eof) ||\n this.match(tt.braceR) ||\n this.hasPrecedingLineBreak()\n );\n }\n\n hasPrecedingLineBreak(): boolean {\n return lineBreak.test(\n this.input.slice(this.state.lastTokEnd, this.state.start),\n );\n }\n\n hasFollowingLineBreak(): boolean {\n return lineBreak.test(\n this.input.slice(this.state.end, this.nextTokenStart()),\n );\n }\n\n // TODO\n\n isLineTerminator(): boolean {\n return this.eat(tt.semi) || this.canInsertSemicolon();\n }\n\n // Consume a semicolon, or, failing that, see if we are allowed to\n // pretend that there is a semicolon at this position.\n\n semicolon(allowAsi: boolean = true): void {\n if (allowAsi ? this.isLineTerminator() : this.eat(tt.semi)) return;\n this.raise(this.state.lastTokEnd, Errors.MissingSemicolon);\n }\n\n // Expect a token of a given type. If found, consume it, otherwise,\n // raise an unexpected token error at given pos.\n\n expect(type: TokenType, pos?: ?number): void {\n this.eat(type) || this.unexpected(pos, type);\n }\n\n // Throws if the current token and the prev one are separated by a space.\n assertNoSpace(message: string = \"Unexpected space.\"): void {\n if (this.state.start > this.state.lastTokEnd) {\n /* eslint-disable @babel/development-internal/dry-error-messages */\n this.raise(this.state.lastTokEnd, {\n code: ErrorCodes.SyntaxError,\n reasonCode: \"UnexpectedSpace\",\n template: message,\n });\n /* eslint-enable @babel/development-internal/dry-error-messages */\n }\n }\n\n // Raise an unexpected token error. Can take the expected token type\n // instead of a message string.\n\n unexpected(\n pos: ?number,\n messageOrType: ErrorTemplate | TokenType = {\n code: ErrorCodes.SyntaxError,\n reasonCode: \"UnexpectedToken\",\n template: \"Unexpected token\",\n },\n ): empty {\n if (messageOrType instanceof TokenType) {\n messageOrType = {\n code: ErrorCodes.SyntaxError,\n reasonCode: \"UnexpectedToken\",\n template: `Unexpected token, expected \"${messageOrType.label}\"`,\n };\n }\n /* eslint-disable @babel/development-internal/dry-error-messages */\n throw this.raise(pos != null ? pos : this.state.start, messageOrType);\n /* eslint-enable @babel/development-internal/dry-error-messages */\n }\n\n expectPlugin(name: string, pos?: ?number): true {\n if (!this.hasPlugin(name)) {\n throw this.raiseWithData(\n pos != null ? pos : this.state.start,\n { missingPlugin: [name] },\n `This experimental syntax requires enabling the parser plugin: '${name}'`,\n );\n }\n\n return true;\n }\n\n expectOnePlugin(names: Array<string>, pos?: ?number): void {\n if (!names.some(n => this.hasPlugin(n))) {\n throw this.raiseWithData(\n pos != null ? pos : this.state.start,\n { missingPlugin: names },\n `This experimental syntax requires enabling one of the following parser plugin(s): '${names.join(\n \", \",\n )}'`,\n );\n }\n }\n\n // tryParse will clone parser state.\n // It is expensive and should be used with cautions\n tryParse<T: Node | $ReadOnlyArray<Node>>(\n fn: (abort: (node?: T) => empty) => T,\n oldState: State = this.state.clone(),\n ):\n | TryParse<T, null, false, false, null>\n | TryParse<T | null, SyntaxError, boolean, false, State>\n | TryParse<T | null, null, false, true, State> {\n const abortSignal: { node: T | null } = { node: null };\n try {\n const node = fn((node = null) => {\n abortSignal.node = node;\n throw abortSignal;\n });\n if (this.state.errors.length > oldState.errors.length) {\n const failState = this.state;\n this.state = oldState;\n // tokensLength should be preserved during error recovery mode\n // since the parser does not halt and will instead parse the\n // remaining tokens\n this.state.tokensLength = failState.tokensLength;\n return {\n node,\n error: (failState.errors[oldState.errors.length]: SyntaxError),\n thrown: false,\n aborted: false,\n failState,\n };\n }\n\n return {\n node,\n error: null,\n thrown: false,\n aborted: false,\n failState: null,\n };\n } catch (error) {\n const failState = this.state;\n this.state = oldState;\n if (error instanceof SyntaxError) {\n return { node: null, error, thrown: true, aborted: false, failState };\n }\n if (error === abortSignal) {\n return {\n node: abortSignal.node,\n error: null,\n thrown: false,\n aborted: true,\n failState,\n };\n }\n\n throw error;\n }\n }\n\n checkExpressionErrors(\n refExpressionErrors: ?ExpressionErrors,\n andThrow: boolean,\n ) {\n if (!refExpressionErrors) return false;\n const { shorthandAssign, doubleProto } = refExpressionErrors;\n if (!andThrow) return shorthandAssign >= 0 || doubleProto >= 0;\n if (shorthandAssign >= 0) {\n this.unexpected(shorthandAssign);\n }\n if (doubleProto >= 0) {\n this.raise(doubleProto, Errors.DuplicateProto);\n }\n }\n\n /**\n * Test if current token is a literal property name\n * https://tc39.es/ecma262/#prod-LiteralPropertyName\n * LiteralPropertyName:\n * IdentifierName\n * StringLiteral\n * NumericLiteral\n * BigIntLiteral\n */\n isLiteralPropertyName(): boolean {\n return (\n this.match(tt.name) ||\n !!this.state.type.keyword ||\n this.match(tt.string) ||\n this.match(tt.num) ||\n this.match(tt.bigint) ||\n this.match(tt.decimal)\n );\n }\n\n /*\n * Test if given node is a PrivateName\n * will be overridden in ESTree plugin\n */\n isPrivateName(node: Node): boolean {\n return node.type === \"PrivateName\";\n }\n\n /*\n * Return the string value of a given private name\n * WITHOUT `#`\n * @see {@link https://tc39.es/proposal-class-fields/#sec-private-names-static-semantics-stringvalue}\n */\n getPrivateNameSV(node: Node): string {\n return node.id.name;\n }\n\n /*\n * Return whether the given node is a member/optional chain that\n * contains a private name as its property\n * It is overridden in ESTree plugin\n */\n hasPropertyAsPrivateName(node: Node): boolean {\n return (\n (node.type === \"MemberExpression\" ||\n node.type === \"OptionalMemberExpression\") &&\n this.isPrivateName(node.property)\n );\n }\n\n isOptionalChain(node: Node): boolean {\n return (\n node.type === \"OptionalMemberExpression\" ||\n node.type === \"OptionalCallExpression\"\n );\n }\n\n isObjectProperty(node: Node): boolean {\n return node.type === \"ObjectProperty\";\n }\n\n isObjectMethod(node: Node): boolean {\n return node.type === \"ObjectMethod\";\n }\n\n initializeScopes(\n inModule: boolean = this.options.sourceType === \"module\",\n ): () => void {\n // Initialize state\n const oldLabels = this.state.labels;\n this.state.labels = [];\n\n const oldExportedIdentifiers = this.exportedIdentifiers;\n this.exportedIdentifiers = new Set();\n\n // initialize scopes\n const oldInModule = this.inModule;\n this.inModule = inModule;\n\n const oldScope = this.scope;\n const ScopeHandler = this.getScopeHandler();\n this.scope = new ScopeHandler(this.raise.bind(this), this.inModule);\n\n const oldProdParam = this.prodParam;\n this.prodParam = new ProductionParameterHandler();\n\n const oldClassScope = this.classScope;\n this.classScope = new ClassScopeHandler(this.raise.bind(this));\n\n const oldExpressionScope = this.expressionScope;\n this.expressionScope = new ExpressionScopeHandler(this.raise.bind(this));\n\n return () => {\n // Revert state\n this.state.labels = oldLabels;\n this.exportedIdentifiers = oldExportedIdentifiers;\n\n // Revert scopes\n this.inModule = oldInModule;\n this.scope = oldScope;\n this.prodParam = oldProdParam;\n this.classScope = oldClassScope;\n this.expressionScope = oldExpressionScope;\n };\n }\n\n enterInitialScopes() {\n let paramFlags = PARAM;\n if (this.hasPlugin(\"topLevelAwait\") && this.inModule) {\n paramFlags |= PARAM_AWAIT;\n }\n this.scope.enter(SCOPE_PROGRAM);\n this.prodParam.enter(paramFlags);\n }\n}\n\n/**\n * The ExpressionErrors is a context struct used to track\n * - **shorthandAssign**: track initializer `=` position when parsing ambiguous\n * patterns. When we are sure the parsed pattern is a RHS, which means it is\n * not a pattern, we will throw on this position on invalid assign syntax,\n * otherwise it will be reset to -1\n * - **doubleProto**: track the duplicate `__proto__` key position when parsing\n * ambiguous object patterns. When we are sure the parsed pattern is a RHS,\n * which means it is an object literal, we will throw on this position for\n * __proto__ redefinition, otherwise it will be reset to -1\n */\nexport class ExpressionErrors {\n shorthandAssign = -1;\n doubleProto = -1;\n}\n","// @flow\n\nimport type Parser from \"./index\";\nimport UtilParser from \"./util\";\nimport { SourceLocation, type Position } from \"../util/location\";\nimport type { Comment, Node as NodeType, NodeBase } from \"../types\";\n\n// Start an AST node, attaching a start offset.\n\nclass Node implements NodeBase {\n constructor(parser: Parser, pos: number, loc: Position) {\n this.type = \"\";\n this.start = pos;\n this.end = 0;\n this.loc = new SourceLocation(loc);\n if (parser?.options.ranges) this.range = [pos, 0];\n if (parser?.filename) this.loc.filename = parser.filename;\n }\n\n type: string;\n start: number;\n end: number;\n loc: SourceLocation;\n range: [number, number];\n leadingComments: Array<Comment>;\n trailingComments: Array<Comment>;\n innerComments: Array<Comment>;\n extra: { [key: string]: any };\n\n __clone(): this {\n // $FlowIgnore\n const newNode: any = new Node();\n const keys = Object.keys(this);\n for (let i = 0, length = keys.length; i < length; i++) {\n const key = keys[i];\n // Do not clone comments that are already attached to the node\n if (\n key !== \"leadingComments\" &&\n key !== \"trailingComments\" &&\n key !== \"innerComments\"\n ) {\n // $FlowIgnore\n newNode[key] = this[key];\n }\n }\n\n return newNode;\n }\n}\n\nexport class NodeUtils extends UtilParser {\n startNode<T: NodeType>(): T {\n // $FlowIgnore\n return new Node(this, this.state.start, this.state.startLoc);\n }\n\n startNodeAt<T: NodeType>(pos: number, loc: Position): T {\n // $FlowIgnore\n return new Node(this, pos, loc);\n }\n\n /** Start a new node with a previous node's location. */\n startNodeAtNode<T: NodeType>(type: NodeType): T {\n return this.startNodeAt(type.start, type.loc.start);\n }\n\n // Finish an AST node, adding `type` and `end` properties.\n\n finishNode<T: NodeType>(node: T, type: string): T {\n return this.finishNodeAt(\n node,\n type,\n this.state.lastTokEnd,\n this.state.lastTokEndLoc,\n );\n }\n\n // Finish node at given position\n\n finishNodeAt<T: NodeType>(\n node: T,\n type: string,\n pos: number,\n loc: Position,\n ): T {\n if (process.env.NODE_ENV !== \"production\" && node.end > 0) {\n throw new Error(\n \"Do not call finishNode*() twice on the same node.\" +\n \" Instead use resetEndLocation() or change type directly.\",\n );\n }\n node.type = type;\n node.end = pos;\n node.loc.end = loc;\n if (this.options.ranges) node.range[1] = pos;\n this.processComment(node);\n return node;\n }\n\n resetStartLocation(node: NodeBase, start: number, startLoc: Position): void {\n node.start = start;\n node.loc.start = startLoc;\n if (this.options.ranges) node.range[0] = start;\n }\n\n resetEndLocation(\n node: NodeBase,\n end?: number = this.state.lastTokEnd,\n endLoc?: Position = this.state.lastTokEndLoc,\n ): void {\n node.end = end;\n node.loc.end = endLoc;\n if (this.options.ranges) node.range[1] = end;\n }\n\n /**\n * Reset the start location of node to the start location of locationNode\n */\n resetStartLocationFromNode(node: NodeBase, locationNode: NodeBase): void {\n this.resetStartLocation(node, locationNode.start, locationNode.loc.start);\n }\n}\n","// @flow\n\n/*:: declare var invariant; */\nimport * as charCodes from \"charcodes\";\nimport { types as tt, type TokenType } from \"../tokenizer/types\";\nimport type {\n TSParameterProperty,\n Decorator,\n Expression,\n Node,\n Pattern,\n RestElement,\n SpreadElement,\n /*:: Identifier, */\n /*:: ObjectExpression, */\n /*:: ObjectPattern, */\n} from \"../types\";\nimport type { Pos, Position } from \"../util/location\";\nimport {\n isStrictBindOnlyReservedWord,\n isStrictBindReservedWord,\n} from \"../util/identifier\";\nimport { NodeUtils } from \"./node\";\nimport { type BindingTypes, BIND_NONE } from \"../util/scopeflags\";\nimport { ExpressionErrors } from \"./util\";\nimport { Errors } from \"./error\";\n\nconst unwrapParenthesizedExpression = (node: Node): Node => {\n return node.type === \"ParenthesizedExpression\"\n ? unwrapParenthesizedExpression(node.expression)\n : node;\n};\n\nexport default class LValParser extends NodeUtils {\n // Forward-declaration: defined in expression.js\n /*::\n +parseIdentifier: (liberal?: boolean) => Identifier;\n +parseMaybeAssignAllowIn: (\n refExpressionErrors?: ?ExpressionErrors,\n afterLeftParse?: Function,\n refNeedsArrowPos?: ?Pos,\n ) => Expression;\n +parseObjectLike: <T: ObjectPattern | ObjectExpression>(\n close: TokenType,\n isPattern: boolean,\n isRecord?: ?boolean,\n refExpressionErrors?: ?ExpressionErrors,\n ) => T;\n */\n // Forward-declaration: defined in statement.js\n /*::\n +parseDecorator: () => Decorator;\n */\n\n /**\n * Convert existing expression atom to assignable pattern\n * if possible. Also checks invalid destructuring targets:\n\n - Parenthesized Destructuring patterns\n - RestElement is not the last element\n - Missing `=` in assignment pattern\n\n NOTE: There is a corresponding \"isAssignable\" method in flow.js.\n When this one is updated, please check if also that one needs to be updated.\n\n * @param {Node} node The expression atom\n * @param {boolean} [isLHS=false] Whether we are parsing a LeftHandSideExpression. If isLHS is `true`, the following cases are allowed:\n `[(a)] = [0]`, `[(a.b)] = [0]`\n\n * @returns {Node} The converted assignable pattern\n * @memberof LValParser\n */\n toAssignable(node: Node, isLHS: boolean = false): Node {\n let parenthesized = undefined;\n if (node.type === \"ParenthesizedExpression\" || node.extra?.parenthesized) {\n parenthesized = unwrapParenthesizedExpression(node);\n if (isLHS) {\n // an LHS can be reinterpreted to a binding pattern but not vice versa.\n // therefore a parenthesized identifier is ambiguous until we are sure it is an assignment expression\n // i.e. `([(a) = []] = []) => {}`\n // see also `recordParenthesizedIdentifierError` signature in packages/babel-parser/src/util/expression-scope.js\n if (parenthesized.type === \"Identifier\") {\n this.expressionScope.recordParenthesizedIdentifierError(\n node.start,\n Errors.InvalidParenthesizedAssignment,\n );\n } else if (parenthesized.type !== \"MemberExpression\") {\n // A parenthesized member expression can be in LHS but not in pattern.\n // If the LHS is later interpreted as a pattern, `checkLVal` will throw for member expression binding\n // i.e. `([(a.b) = []] = []) => {}`\n this.raise(node.start, Errors.InvalidParenthesizedAssignment);\n }\n } else {\n this.raise(node.start, Errors.InvalidParenthesizedAssignment);\n }\n }\n\n switch (node.type) {\n case \"Identifier\":\n case \"ObjectPattern\":\n case \"ArrayPattern\":\n case \"AssignmentPattern\":\n break;\n\n case \"ObjectExpression\":\n node.type = \"ObjectPattern\";\n for (\n let i = 0, length = node.properties.length, last = length - 1;\n i < length;\n i++\n ) {\n const prop = node.properties[i];\n const isLast = i === last;\n this.toAssignableObjectExpressionProp(prop, isLast, isLHS);\n\n if (\n isLast &&\n prop.type === \"RestElement\" &&\n node.extra?.trailingComma\n ) {\n this.raiseRestNotLast(node.extra.trailingComma);\n }\n }\n break;\n\n case \"ObjectProperty\":\n this.toAssignable(node.value, isLHS);\n break;\n\n case \"SpreadElement\": {\n this.checkToRestConversion(node);\n\n node.type = \"RestElement\";\n const arg = node.argument;\n this.toAssignable(arg, isLHS);\n break;\n }\n\n case \"ArrayExpression\":\n node.type = \"ArrayPattern\";\n this.toAssignableList(node.elements, node.extra?.trailingComma, isLHS);\n break;\n\n case \"AssignmentExpression\":\n if (node.operator !== \"=\") {\n this.raise(node.left.end, Errors.MissingEqInAssignment);\n }\n\n node.type = \"AssignmentPattern\";\n delete node.operator;\n this.toAssignable(node.left, isLHS);\n break;\n\n case \"ParenthesizedExpression\":\n /*::invariant (parenthesized !== undefined) */\n this.toAssignable(parenthesized, isLHS);\n break;\n\n default:\n // We don't know how to deal with this node. It will\n // be reported by a later call to checkLVal\n }\n return node;\n }\n\n toAssignableObjectExpressionProp(\n prop: Node,\n isLast: boolean,\n isLHS: boolean,\n ) {\n if (prop.type === \"ObjectMethod\") {\n const error =\n prop.kind === \"get\" || prop.kind === \"set\"\n ? Errors.PatternHasAccessor\n : Errors.PatternHasMethod;\n\n /* eslint-disable @babel/development-internal/dry-error-messages */\n this.raise(prop.key.start, error);\n /* eslint-enable @babel/development-internal/dry-error-messages */\n } else if (prop.type === \"SpreadElement\" && !isLast) {\n this.raiseRestNotLast(prop.start);\n } else {\n this.toAssignable(prop, isLHS);\n }\n }\n\n // Convert list of expression atoms to binding list.\n\n toAssignableList(\n exprList: Expression[],\n trailingCommaPos?: ?number,\n isLHS: boolean,\n ): $ReadOnlyArray<Pattern> {\n let end = exprList.length;\n if (end) {\n const last = exprList[end - 1];\n if (last?.type === \"RestElement\") {\n --end;\n } else if (last?.type === \"SpreadElement\") {\n last.type = \"RestElement\";\n let arg = last.argument;\n this.toAssignable(arg, isLHS);\n arg = unwrapParenthesizedExpression(arg);\n if (\n arg.type !== \"Identifier\" &&\n arg.type !== \"MemberExpression\" &&\n arg.type !== \"ArrayPattern\" &&\n arg.type !== \"ObjectPattern\"\n ) {\n this.unexpected(arg.start);\n }\n\n if (trailingCommaPos) {\n this.raiseTrailingCommaAfterRest(trailingCommaPos);\n }\n\n --end;\n }\n }\n for (let i = 0; i < end; i++) {\n const elt = exprList[i];\n if (elt) {\n this.toAssignable(elt, isLHS);\n if (elt.type === \"RestElement\") {\n this.raiseRestNotLast(elt.start);\n }\n }\n }\n return exprList;\n }\n\n // Convert list of expression atoms to a list of\n\n toReferencedList(\n exprList: $ReadOnlyArray<?Expression>,\n isParenthesizedExpr?: boolean, // eslint-disable-line no-unused-vars\n ): $ReadOnlyArray<?Expression> {\n return exprList;\n }\n\n toReferencedListDeep(\n exprList: $ReadOnlyArray<?Expression>,\n isParenthesizedExpr?: boolean,\n ): void {\n this.toReferencedList(exprList, isParenthesizedExpr);\n\n for (const expr of exprList) {\n if (expr?.type === \"ArrayExpression\") {\n this.toReferencedListDeep(expr.elements);\n }\n }\n }\n\n // Parses spread element.\n\n parseSpread(\n refExpressionErrors: ?ExpressionErrors,\n refNeedsArrowPos?: ?Pos,\n ): SpreadElement {\n const node = this.startNode();\n this.next();\n node.argument = this.parseMaybeAssignAllowIn(\n refExpressionErrors,\n undefined,\n refNeedsArrowPos,\n );\n return this.finishNode(node, \"SpreadElement\");\n }\n\n // https://tc39.es/ecma262/#prod-BindingRestProperty\n // https://tc39.es/ecma262/#prod-BindingRestElement\n parseRestBinding(): RestElement {\n const node = this.startNode();\n this.next(); // eat `...`\n node.argument = this.parseBindingAtom();\n return this.finishNode(node, \"RestElement\");\n }\n\n // Parses lvalue (assignable) atom.\n parseBindingAtom(): Pattern {\n // https://tc39.es/ecma262/#prod-BindingPattern\n switch (this.state.type) {\n case tt.bracketL: {\n const node = this.startNode();\n this.next();\n node.elements = this.parseBindingList(\n tt.bracketR,\n charCodes.rightSquareBracket,\n true,\n );\n return this.finishNode(node, \"ArrayPattern\");\n }\n\n case tt.braceL:\n return this.parseObjectLike(tt.braceR, true);\n }\n\n // https://tc39.es/ecma262/#prod-BindingIdentifier\n return this.parseIdentifier();\n }\n\n // https://tc39.es/ecma262/#prod-BindingElementList\n parseBindingList(\n close: TokenType,\n closeCharCode: $Values<typeof charCodes>,\n allowEmpty?: boolean,\n allowModifiers?: boolean,\n ): $ReadOnlyArray<Pattern | TSParameterProperty> {\n const elts: Array<Pattern | TSParameterProperty> = [];\n let first = true;\n while (!this.eat(close)) {\n if (first) {\n first = false;\n } else {\n this.expect(tt.comma);\n }\n if (allowEmpty && this.match(tt.comma)) {\n // $FlowFixMe This method returns `$ReadOnlyArray<?Pattern>` if `allowEmpty` is set.\n elts.push(null);\n } else if (this.eat(close)) {\n break;\n } else if (this.match(tt.ellipsis)) {\n elts.push(this.parseAssignableListItemTypes(this.parseRestBinding()));\n this.checkCommaAfterRest(closeCharCode);\n this.expect(close);\n break;\n } else {\n const decorators = [];\n if (this.match(tt.at) && this.hasPlugin(\"decorators\")) {\n this.raise(this.state.start, Errors.UnsupportedParameterDecorator);\n }\n // invariant: hasPlugin(\"decorators-legacy\")\n while (this.match(tt.at)) {\n decorators.push(this.parseDecorator());\n }\n elts.push(this.parseAssignableListItem(allowModifiers, decorators));\n }\n }\n return elts;\n }\n\n parseAssignableListItem(\n allowModifiers: ?boolean,\n decorators: Decorator[],\n ): Pattern | TSParameterProperty {\n const left = this.parseMaybeDefault();\n this.parseAssignableListItemTypes(left);\n const elt = this.parseMaybeDefault(left.start, left.loc.start, left);\n if (decorators.length) {\n left.decorators = decorators;\n }\n return elt;\n }\n\n // Used by flow/typescript plugin to add type annotations to binding elements\n parseAssignableListItemTypes(param: Pattern): Pattern {\n return param;\n }\n\n // Parses assignment pattern around given atom if possible.\n // https://tc39.es/ecma262/#prod-BindingElement\n parseMaybeDefault(\n startPos?: ?number,\n startLoc?: ?Position,\n left?: ?Pattern,\n ): Pattern {\n startLoc = startLoc ?? this.state.startLoc;\n startPos = startPos ?? this.state.start;\n // $FlowIgnore\n left = left ?? this.parseBindingAtom();\n if (!this.eat(tt.eq)) return left;\n\n const node = this.startNodeAt(startPos, startLoc);\n node.left = left;\n node.right = this.parseMaybeAssignAllowIn();\n return this.finishNode(node, \"AssignmentPattern\");\n }\n\n /**\n * Verify that if a node is an lval - something that can be assigned to.\n *\n * @param {Expression} expr The given node\n * @param {string} contextDescription The auxiliary context information printed when error is thrown\n * @param {BindingTypes} [bindingType=BIND_NONE] The desired binding type. If the given node is an identifier and `bindingType` is not\n BIND_NONE, `checkLVal` will register binding to the parser scope\n See also src/util/scopeflags.js\n * @param {?Set<string>} checkClashes An optional string set to check if an identifier name is included. `checkLVal` will add checked\n identifier name to `checkClashes` It is used in tracking duplicates in function parameter lists. If\n it is nullish, `checkLVal` will skip duplicate checks\n * @param {boolean} [disallowLetBinding] Whether an identifier named \"let\" should be disallowed\n * @param {boolean} [strictModeChanged=false] Whether an identifier has been parsed in a sloppy context but should be reinterpreted as\n strict-mode. e.g. `(arguments) => { \"use strict \"}`\n * @memberof LValParser\n */\n checkLVal(\n expr: Expression,\n contextDescription: string,\n bindingType: BindingTypes = BIND_NONE,\n checkClashes: ?Set<string>,\n disallowLetBinding?: boolean,\n strictModeChanged?: boolean = false,\n ): void {\n switch (expr.type) {\n case \"Identifier\": {\n const { name } = expr;\n if (\n this.state.strict &&\n // \"Global\" reserved words have already been checked by parseIdentifier,\n // unless they have been found in the id or parameters of a strict-mode\n // function in a sloppy context.\n (strictModeChanged\n ? isStrictBindReservedWord(name, this.inModule)\n : isStrictBindOnlyReservedWord(name))\n ) {\n this.raise(\n expr.start,\n bindingType === BIND_NONE\n ? Errors.StrictEvalArguments\n : Errors.StrictEvalArgumentsBinding,\n name,\n );\n }\n\n if (checkClashes) {\n if (checkClashes.has(name)) {\n this.raise(expr.start, Errors.ParamDupe);\n } else {\n checkClashes.add(name);\n }\n }\n if (disallowLetBinding && name === \"let\") {\n this.raise(expr.start, Errors.LetInLexicalBinding);\n }\n if (!(bindingType & BIND_NONE)) {\n this.scope.declareName(name, bindingType, expr.start);\n }\n break;\n }\n\n case \"MemberExpression\":\n if (bindingType !== BIND_NONE) {\n this.raise(expr.start, Errors.InvalidPropertyBindingPattern);\n }\n break;\n\n case \"ObjectPattern\":\n for (let prop of expr.properties) {\n if (this.isObjectProperty(prop)) prop = prop.value;\n // If we find here an ObjectMethod, it's because this was originally\n // an ObjectExpression which has then been converted.\n // toAssignable already reported this error with a nicer message.\n else if (this.isObjectMethod(prop)) continue;\n\n this.checkLVal(\n prop,\n \"object destructuring pattern\",\n bindingType,\n checkClashes,\n disallowLetBinding,\n );\n }\n break;\n\n case \"ArrayPattern\":\n for (const elem of expr.elements) {\n if (elem) {\n this.checkLVal(\n elem,\n \"array destructuring pattern\",\n bindingType,\n checkClashes,\n disallowLetBinding,\n );\n }\n }\n break;\n\n case \"AssignmentPattern\":\n this.checkLVal(\n expr.left,\n \"assignment pattern\",\n bindingType,\n checkClashes,\n );\n break;\n\n case \"RestElement\":\n this.checkLVal(\n expr.argument,\n \"rest element\",\n bindingType,\n checkClashes,\n );\n break;\n\n case \"ParenthesizedExpression\":\n this.checkLVal(\n expr.expression,\n \"parenthesized expression\",\n bindingType,\n checkClashes,\n );\n break;\n\n default: {\n this.raise(\n expr.start,\n bindingType === BIND_NONE\n ? Errors.InvalidLhs\n : Errors.InvalidLhsBinding,\n contextDescription,\n );\n }\n }\n }\n\n checkToRestConversion(node: SpreadElement): void {\n if (\n node.argument.type !== \"Identifier\" &&\n node.argument.type !== \"MemberExpression\"\n ) {\n this.raise(node.argument.start, Errors.InvalidRestAssignmentPattern);\n }\n }\n\n checkCommaAfterRest(close: $Values<typeof charCodes>): void {\n if (this.match(tt.comma)) {\n if (this.lookaheadCharCode() === close) {\n this.raiseTrailingCommaAfterRest(this.state.start);\n } else {\n this.raiseRestNotLast(this.state.start);\n }\n }\n }\n\n raiseRestNotLast(pos: number) {\n throw this.raise(pos, Errors.ElementAfterRest);\n }\n\n raiseTrailingCommaAfterRest(pos: number) {\n this.raise(pos, Errors.RestTrailingComma);\n }\n}\n","// @flow\n\n// A recursive descent parser operates by defining functions for all\n// syntactic elements, and recursively calling those, each function\n// advancing the input stream and returning an AST node. Precedence\n// of constructs (for example, the fact that `!x[1]` means `!(x[1])`\n// instead of `(!x)[1]` is handled by the fact that the parser\n// function that parses unary prefix operators is called first, and\n// in turn calls the function that parses `[]` subscripts — that\n// way, it'll receive the node for `x[1]` already parsed, and wraps\n// *that* in the unary operator node.\n//\n// Acorn uses an [operator precedence parser][opp] to handle binary\n// operator precedence, because it is much more compact than using\n// the technique outlined above, which uses different, nesting\n// functions to specify precedence, for all of the ten binary\n// precedence levels that JavaScript defines.\n//\n// [opp]: http://en.wikipedia.org/wiki/Operator-precedence_parser\n\nimport { types as tt, type TokenType } from \"../tokenizer/types\";\nimport { types as ct } from \"../tokenizer/context\";\nimport * as N from \"../types\";\nimport LValParser from \"./lval\";\nimport {\n isKeyword,\n isReservedWord,\n isStrictReservedWord,\n isStrictBindReservedWord,\n isIdentifierStart,\n canBeReservedWord,\n} from \"../util/identifier\";\nimport type { Pos } from \"../util/location\";\nimport { Position } from \"../util/location\";\nimport * as charCodes from \"charcodes\";\nimport {\n BIND_OUTSIDE,\n BIND_VAR,\n SCOPE_ARROW,\n SCOPE_CLASS,\n SCOPE_DIRECT_SUPER,\n SCOPE_FUNCTION,\n SCOPE_SUPER,\n SCOPE_PROGRAM,\n} from \"../util/scopeflags\";\nimport { ExpressionErrors } from \"./util\";\nimport {\n PARAM_AWAIT,\n PARAM_IN,\n PARAM_RETURN,\n PARAM,\n functionFlags,\n} from \"../util/production-parameter\";\nimport {\n newArrowHeadScope,\n newAsyncArrowScope,\n newExpressionScope,\n} from \"../util/expression-scope\";\nimport { Errors, SourceTypeModuleErrors } from \"./error\";\n\n/*::\nimport type { SourceType } from \"../options\";\n*/\n\nexport default class ExpressionParser extends LValParser {\n // Forward-declaration: defined in statement.js\n /*::\n +parseBlock: (\n allowDirectives?: boolean,\n createNewLexicalScope?: boolean,\n afterBlockParse?: (hasStrictModeDirective: boolean) => void,\n ) => N.BlockStatement;\n +parseClass: (\n node: N.Class,\n isStatement: boolean,\n optionalId?: boolean,\n ) => N.Class;\n +parseDecorators: (allowExport?: boolean) => void;\n +parseFunction: <T: N.NormalFunction>(\n node: T,\n statement?: number,\n allowExpressionBody?: boolean,\n isAsync?: boolean,\n ) => T;\n +parseFunctionParams: (node: N.Function, allowModifiers?: boolean) => void;\n +takeDecorators: (node: N.HasDecorators) => void;\n +parseBlockOrModuleBlockBody: (\n body: N.Statement[],\n directives: ?(N.Directive[]),\n topLevel: boolean,\n end: TokenType,\n afterBlockParse?: (hasStrictModeDirective: boolean) => void\n ) => void\n +parseProgram: (\n program: N.Program, end: TokenType, sourceType?: SourceType\n ) => N.Program\n */\n\n // For object literal, check if property __proto__ has been used more than once.\n // If the expression is a destructuring assignment, then __proto__ may appear\n // multiple times. Otherwise, __proto__ is a duplicated key.\n\n // For record expression, check if property __proto__ exists\n\n checkProto(\n prop: N.ObjectMember | N.SpreadElement,\n isRecord: boolean,\n protoRef: { used: boolean },\n refExpressionErrors: ?ExpressionErrors,\n ): void {\n if (\n prop.type === \"SpreadElement\" ||\n this.isObjectMethod(prop) ||\n prop.computed ||\n // $FlowIgnore\n prop.shorthand\n ) {\n return;\n }\n\n const key = prop.key;\n // It is either an Identifier or a String/NumericLiteral\n const name = key.type === \"Identifier\" ? key.name : key.value;\n\n if (name === \"__proto__\") {\n if (isRecord) {\n this.raise(key.start, Errors.RecordNoProto);\n return;\n }\n if (protoRef.used) {\n if (refExpressionErrors) {\n // Store the first redefinition's position, otherwise ignore because\n // we are parsing ambiguous pattern\n if (refExpressionErrors.doubleProto === -1) {\n refExpressionErrors.doubleProto = key.start;\n }\n } else {\n this.raise(key.start, Errors.DuplicateProto);\n }\n }\n\n protoRef.used = true;\n }\n }\n\n shouldExitDescending(expr: N.Expression, potentialArrowAt: number): boolean {\n return (\n expr.type === \"ArrowFunctionExpression\" && expr.start === potentialArrowAt\n );\n }\n\n // Convenience method to parse an Expression only\n getExpression(): N.Expression & N.ParserOutput {\n let paramFlags = PARAM;\n if (this.hasPlugin(\"topLevelAwait\") && this.inModule) {\n paramFlags |= PARAM_AWAIT;\n }\n this.scope.enter(SCOPE_PROGRAM);\n this.prodParam.enter(paramFlags);\n this.nextToken();\n const expr = this.parseExpression();\n if (!this.match(tt.eof)) {\n this.unexpected();\n }\n expr.comments = this.state.comments;\n expr.errors = this.state.errors;\n if (this.options.tokens) {\n expr.tokens = this.tokens;\n }\n return expr;\n }\n\n // ### Expression parsing\n\n // These nest, from the most general expression type at the top to\n // 'atomic', nondivisible expression types at the bottom. Most of\n // the functions will simply let the function (s) below them parse,\n // and, *if* the syntactic construct they handle is present, wrap\n // the AST node that the inner parser gave them in another node.\n\n // Parse a full expression.\n // - `disallowIn`\n // is used to forbid the `in` operator (in for loops initialization expressions)\n // When `disallowIn` is true, the production parameter [In] is not present.\n\n // - `refExpressionErrors `\n // provides reference for storing '=' operator inside shorthand\n // property assignment in contexts where both object expression\n // and object pattern might appear (so it's possible to raise\n // delayed syntax error at correct position).\n\n parseExpression(\n disallowIn?: boolean,\n refExpressionErrors?: ExpressionErrors,\n ): N.Expression {\n if (disallowIn) {\n return this.disallowInAnd(() =>\n this.parseExpressionBase(refExpressionErrors),\n );\n }\n return this.allowInAnd(() => this.parseExpressionBase(refExpressionErrors));\n }\n\n // https://tc39.es/ecma262/#prod-Expression\n parseExpressionBase(refExpressionErrors?: ExpressionErrors): N.Expression {\n const startPos = this.state.start;\n const startLoc = this.state.startLoc;\n const expr = this.parseMaybeAssign(refExpressionErrors);\n if (this.match(tt.comma)) {\n const node = this.startNodeAt(startPos, startLoc);\n node.expressions = [expr];\n while (this.eat(tt.comma)) {\n node.expressions.push(this.parseMaybeAssign(refExpressionErrors));\n }\n this.toReferencedList(node.expressions);\n return this.finishNode(node, \"SequenceExpression\");\n }\n return expr;\n }\n\n // Set [~In] parameter for assignment expression\n parseMaybeAssignDisallowIn(\n refExpressionErrors?: ?ExpressionErrors,\n afterLeftParse?: Function,\n refNeedsArrowPos?: ?Pos,\n ) {\n return this.disallowInAnd(() =>\n this.parseMaybeAssign(\n refExpressionErrors,\n afterLeftParse,\n refNeedsArrowPos,\n ),\n );\n }\n\n // Set [+In] parameter for assignment expression\n parseMaybeAssignAllowIn(\n refExpressionErrors?: ?ExpressionErrors,\n afterLeftParse?: Function,\n refNeedsArrowPos?: ?Pos,\n ) {\n return this.allowInAnd(() =>\n this.parseMaybeAssign(\n refExpressionErrors,\n afterLeftParse,\n refNeedsArrowPos,\n ),\n );\n }\n\n // Parse an assignment expression. This includes applications of\n // operators like `+=`.\n\n // https://tc39.es/ecma262/#prod-AssignmentExpression\n parseMaybeAssign(\n refExpressionErrors?: ?ExpressionErrors,\n afterLeftParse?: Function,\n refNeedsArrowPos?: ?Pos,\n ): N.Expression {\n const startPos = this.state.start;\n const startLoc = this.state.startLoc;\n if (this.isContextual(\"yield\")) {\n if (this.prodParam.hasYield) {\n let left = this.parseYield();\n if (afterLeftParse) {\n left = afterLeftParse.call(this, left, startPos, startLoc);\n }\n return left;\n }\n }\n\n let ownExpressionErrors;\n if (refExpressionErrors) {\n ownExpressionErrors = false;\n } else {\n refExpressionErrors = new ExpressionErrors();\n ownExpressionErrors = true;\n }\n\n if (this.match(tt.parenL) || this.match(tt.name)) {\n this.state.potentialArrowAt = this.state.start;\n }\n\n let left = this.parseMaybeConditional(\n refExpressionErrors,\n refNeedsArrowPos,\n );\n if (afterLeftParse) {\n left = afterLeftParse.call(this, left, startPos, startLoc);\n }\n if (this.state.type.isAssign) {\n const node = this.startNodeAt(startPos, startLoc);\n const operator = this.state.value;\n node.operator = operator;\n\n if (this.match(tt.eq)) {\n node.left = this.toAssignable(left, /* isLHS */ true);\n refExpressionErrors.doubleProto = -1; // reset because double __proto__ is valid in assignment expression\n } else {\n node.left = left;\n }\n\n if (refExpressionErrors.shorthandAssign >= node.left.start) {\n refExpressionErrors.shorthandAssign = -1; // reset because shorthand default was used correctly\n }\n\n this.checkLVal(left, \"assignment expression\");\n\n this.next();\n node.right = this.parseMaybeAssign();\n return this.finishNode(node, \"AssignmentExpression\");\n } else if (ownExpressionErrors) {\n this.checkExpressionErrors(refExpressionErrors, true);\n }\n\n return left;\n }\n\n // Parse a ternary conditional (`?:`) operator.\n // https://tc39.es/ecma262/#prod-ConditionalExpression\n\n parseMaybeConditional(\n refExpressionErrors: ExpressionErrors,\n refNeedsArrowPos?: ?Pos,\n ): N.Expression {\n const startPos = this.state.start;\n const startLoc = this.state.startLoc;\n const potentialArrowAt = this.state.potentialArrowAt;\n const expr = this.parseExprOps(refExpressionErrors);\n\n if (this.shouldExitDescending(expr, potentialArrowAt)) {\n return expr;\n }\n\n return this.parseConditional(expr, startPos, startLoc, refNeedsArrowPos);\n }\n\n parseConditional(\n expr: N.Expression,\n startPos: number,\n startLoc: Position,\n // FIXME: Disabling this for now since can't seem to get it to play nicely\n // eslint-disable-next-line no-unused-vars\n refNeedsArrowPos?: ?Pos,\n ): N.Expression {\n if (this.eat(tt.question)) {\n const node = this.startNodeAt(startPos, startLoc);\n node.test = expr;\n node.consequent = this.parseMaybeAssignAllowIn();\n this.expect(tt.colon);\n node.alternate = this.parseMaybeAssign();\n return this.finishNode(node, \"ConditionalExpression\");\n }\n return expr;\n }\n\n // Start the precedence parser.\n // https://tc39.es/ecma262/#prod-ShortCircuitExpression\n\n parseExprOps(refExpressionErrors: ExpressionErrors): N.Expression {\n const startPos = this.state.start;\n const startLoc = this.state.startLoc;\n const potentialArrowAt = this.state.potentialArrowAt;\n const expr = this.parseMaybeUnary(refExpressionErrors);\n\n if (this.shouldExitDescending(expr, potentialArrowAt)) {\n return expr;\n }\n\n return this.parseExprOp(expr, startPos, startLoc, -1);\n }\n\n // Parse binary operators with the operator precedence parsing\n // algorithm. `left` is the left-hand side of the operator.\n // `minPrec` provides context that allows the function to stop and\n // defer further parser to one of its callers when it encounters an\n // operator that has a lower precedence than the set it is parsing.\n\n parseExprOp(\n left: N.Expression,\n leftStartPos: number,\n leftStartLoc: Position,\n minPrec: number,\n ): N.Expression {\n let prec = this.state.type.binop;\n if (prec != null && (this.prodParam.hasIn || !this.match(tt._in))) {\n if (prec > minPrec) {\n const op = this.state.type;\n if (op === tt.pipeline) {\n this.expectPlugin(\"pipelineOperator\");\n if (this.state.inFSharpPipelineDirectBody) {\n return left;\n }\n this.state.inPipeline = true;\n this.checkPipelineAtInfixOperator(left, leftStartPos);\n }\n const node = this.startNodeAt(leftStartPos, leftStartLoc);\n node.left = left;\n node.operator = this.state.value;\n\n const logical = op === tt.logicalOR || op === tt.logicalAND;\n const coalesce = op === tt.nullishCoalescing;\n\n if (coalesce) {\n // Handle the precedence of `tt.coalesce` as equal to the range of logical expressions.\n // In other words, `node.right` shouldn't contain logical expressions in order to check the mixed error.\n prec = ((tt.logicalAND: any): { binop: number }).binop;\n }\n\n this.next();\n\n if (\n op === tt.pipeline &&\n this.getPluginOption(\"pipelineOperator\", \"proposal\") === \"minimal\"\n ) {\n if (\n this.match(tt.name) &&\n this.state.value === \"await\" &&\n this.prodParam.hasAwait\n ) {\n throw this.raise(\n this.state.start,\n Errors.UnexpectedAwaitAfterPipelineBody,\n );\n }\n }\n\n node.right = this.parseExprOpRightExpr(op, prec);\n this.finishNode(\n node,\n logical || coalesce ? \"LogicalExpression\" : \"BinaryExpression\",\n );\n /* this check is for all ?? operators\n * a ?? b && c for this example\n * when op is coalesce and nextOp is logical (&&), throw at the pos of nextOp that it can not be mixed.\n * Symmetrically it also throws when op is logical and nextOp is coalesce\n */\n const nextOp = this.state.type;\n if (\n (coalesce && (nextOp === tt.logicalOR || nextOp === tt.logicalAND)) ||\n (logical && nextOp === tt.nullishCoalescing)\n ) {\n throw this.raise(this.state.start, Errors.MixingCoalesceWithLogical);\n }\n\n return this.parseExprOp(node, leftStartPos, leftStartLoc, minPrec);\n }\n }\n return left;\n }\n\n // Helper function for `parseExprOp`. Parse the right-hand side of binary-\n // operator expressions, then apply any operator-specific functions.\n\n parseExprOpRightExpr(op: TokenType, prec: number): N.Expression {\n const startPos = this.state.start;\n const startLoc = this.state.startLoc;\n switch (op) {\n case tt.pipeline:\n switch (this.getPluginOption(\"pipelineOperator\", \"proposal\")) {\n case \"smart\":\n return this.withTopicPermittingContext(() => {\n return this.parseSmartPipelineBody(\n this.parseExprOpBaseRightExpr(op, prec),\n startPos,\n startLoc,\n );\n });\n case \"fsharp\":\n return this.withSoloAwaitPermittingContext(() => {\n return this.parseFSharpPipelineBody(prec);\n });\n }\n // falls through\n\n default:\n return this.parseExprOpBaseRightExpr(op, prec);\n }\n }\n\n // Helper function for `parseExprOpRightExpr`. Parse the right-hand side of\n // binary-operator expressions without applying any operator-specific functions.\n\n parseExprOpBaseRightExpr(op: TokenType, prec: number): N.Expression {\n const startPos = this.state.start;\n const startLoc = this.state.startLoc;\n\n return this.parseExprOp(\n this.parseMaybeUnary(),\n startPos,\n startLoc,\n op.rightAssociative ? prec - 1 : prec,\n );\n }\n\n checkExponentialAfterUnary(node: N.AwaitExpression | N.UnaryExpression) {\n if (this.match(tt.exponent)) {\n this.raise(\n node.argument.start,\n Errors.UnexpectedTokenUnaryExponentiation,\n );\n }\n }\n\n // Parse unary operators, both prefix and postfix.\n // https://tc39.es/ecma262/#prod-UnaryExpression\n parseMaybeUnary(\n refExpressionErrors: ?ExpressionErrors,\n sawUnary?: boolean,\n ): N.Expression {\n const startPos = this.state.start;\n const startLoc = this.state.startLoc;\n const isAwait = this.isContextual(\"await\");\n\n if (isAwait && this.isAwaitAllowed()) {\n this.next();\n const expr = this.parseAwait(startPos, startLoc);\n if (!sawUnary) this.checkExponentialAfterUnary(expr);\n return expr;\n }\n if (\n this.isContextual(\"module\") &&\n this.lookaheadCharCode() === charCodes.leftCurlyBrace &&\n !this.hasFollowingLineBreak()\n ) {\n return this.parseModuleExpression();\n }\n const update = this.match(tt.incDec);\n const node = this.startNode();\n if (this.state.type.prefix) {\n node.operator = this.state.value;\n node.prefix = true;\n\n if (this.match(tt._throw)) {\n this.expectPlugin(\"throwExpressions\");\n }\n const isDelete = this.match(tt._delete);\n this.next();\n\n node.argument = this.parseMaybeUnary(null, true);\n\n this.checkExpressionErrors(refExpressionErrors, true);\n\n if (this.state.strict && isDelete) {\n const arg = node.argument;\n\n if (arg.type === \"Identifier\") {\n this.raise(node.start, Errors.StrictDelete);\n } else if (this.hasPropertyAsPrivateName(arg)) {\n this.raise(node.start, Errors.DeletePrivateField);\n }\n }\n\n if (!update) {\n if (!sawUnary) this.checkExponentialAfterUnary(node);\n return this.finishNode(node, \"UnaryExpression\");\n }\n }\n\n const expr = this.parseUpdate(node, update, refExpressionErrors);\n\n if (isAwait) {\n const startsExpr = this.hasPlugin(\"v8intrinsic\")\n ? this.state.type.startsExpr\n : this.state.type.startsExpr && !this.match(tt.modulo);\n if (startsExpr && !this.isAmbiguousAwait()) {\n this.raiseOverwrite(\n startPos,\n this.hasPlugin(\"topLevelAwait\")\n ? Errors.AwaitNotInAsyncContext\n : Errors.AwaitNotInAsyncFunction,\n );\n return this.parseAwait(startPos, startLoc);\n }\n }\n\n return expr;\n }\n\n // https://tc39.es/ecma262/#prod-UpdateExpression\n parseUpdate(\n node: N.Expression,\n update: boolean,\n refExpressionErrors: ?ExpressionErrors,\n ): N.Expression {\n if (update) {\n this.checkLVal(node.argument, \"prefix operation\");\n return this.finishNode(node, \"UpdateExpression\");\n }\n\n const startPos = this.state.start;\n const startLoc = this.state.startLoc;\n let expr = this.parseExprSubscripts(refExpressionErrors);\n if (this.checkExpressionErrors(refExpressionErrors, false)) return expr;\n while (this.state.type.postfix && !this.canInsertSemicolon()) {\n const node = this.startNodeAt(startPos, startLoc);\n node.operator = this.state.value;\n node.prefix = false;\n node.argument = expr;\n this.checkLVal(expr, \"postfix operation\");\n this.next();\n expr = this.finishNode(node, \"UpdateExpression\");\n }\n return expr;\n }\n\n // Parse call, dot, and `[]`-subscript expressions.\n // https://tc39.es/ecma262/#prod-LeftHandSideExpression\n parseExprSubscripts(refExpressionErrors: ?ExpressionErrors): N.Expression {\n const startPos = this.state.start;\n const startLoc = this.state.startLoc;\n const potentialArrowAt = this.state.potentialArrowAt;\n const expr = this.parseExprAtom(refExpressionErrors);\n\n if (this.shouldExitDescending(expr, potentialArrowAt)) {\n return expr;\n }\n\n return this.parseSubscripts(expr, startPos, startLoc);\n }\n\n parseSubscripts(\n base: N.Expression,\n startPos: number,\n startLoc: Position,\n noCalls?: ?boolean,\n ): N.Expression {\n const state = {\n optionalChainMember: false,\n maybeAsyncArrow: this.atPossibleAsyncArrow(base),\n stop: false,\n };\n do {\n base = this.parseSubscript(base, startPos, startLoc, noCalls, state);\n\n // After parsing a subscript, this isn't \"async\" for sure.\n state.maybeAsyncArrow = false;\n } while (!state.stop);\n return base;\n }\n\n /**\n * @param state Set 'state.stop = true' to indicate that we should stop parsing subscripts.\n * state.optionalChainMember to indicate that the member is currently in OptionalChain\n */\n parseSubscript(\n base: N.Expression,\n startPos: number,\n startLoc: Position,\n noCalls: ?boolean,\n state: N.ParseSubscriptState,\n ): N.Expression {\n if (!noCalls && this.eat(tt.doubleColon)) {\n return this.parseBind(base, startPos, startLoc, noCalls, state);\n } else if (this.match(tt.backQuote)) {\n return this.parseTaggedTemplateExpression(\n base,\n startPos,\n startLoc,\n state,\n );\n }\n\n let optional = false;\n if (this.match(tt.questionDot)) {\n if (noCalls && this.lookaheadCharCode() === charCodes.leftParenthesis) {\n // stop at `?.` when parsing `new a?.()`\n state.stop = true;\n return base;\n }\n state.optionalChainMember = optional = true;\n this.next();\n }\n\n if (!noCalls && this.match(tt.parenL)) {\n return this.parseCoverCallAndAsyncArrowHead(\n base,\n startPos,\n startLoc,\n state,\n optional,\n );\n } else if (optional || this.match(tt.bracketL) || this.eat(tt.dot)) {\n return this.parseMember(base, startPos, startLoc, state, optional);\n } else {\n state.stop = true;\n return base;\n }\n }\n\n // base[?Yield, ?Await] [ Expression[+In, ?Yield, ?Await] ]\n // base[?Yield, ?Await] . IdentifierName\n // base[?Yield, ?Await] . PrivateIdentifier\n // where `base` is one of CallExpression, MemberExpression and OptionalChain\n parseMember(\n base: N.Expression,\n startPos: number,\n startLoc: Position,\n state: N.ParseSubscriptState,\n optional: boolean,\n ): N.OptionalMemberExpression | N.MemberExpression {\n const node = this.startNodeAt(startPos, startLoc);\n const computed = this.eat(tt.bracketL);\n node.object = base;\n node.computed = computed;\n const privateName =\n !computed && this.match(tt.privateName) && this.state.value;\n const property = computed\n ? this.parseExpression()\n : privateName\n ? this.parsePrivateName()\n : this.parseIdentifier(true);\n\n if (privateName !== false) {\n if (node.object.type === \"Super\") {\n this.raise(startPos, Errors.SuperPrivateField);\n }\n this.classScope.usePrivateName(privateName, property.start);\n }\n node.property = property;\n\n if (computed) {\n this.expect(tt.bracketR);\n }\n\n if (state.optionalChainMember) {\n node.optional = optional;\n return this.finishNode(node, \"OptionalMemberExpression\");\n } else {\n return this.finishNode(node, \"MemberExpression\");\n }\n }\n\n // https://github.com/tc39/proposal-bind-operator#syntax\n parseBind(\n base: N.Expression,\n startPos: number,\n startLoc: Position,\n noCalls: ?boolean,\n state: N.ParseSubscriptState,\n ): N.Expression {\n const node = this.startNodeAt(startPos, startLoc);\n node.object = base;\n node.callee = this.parseNoCallExpr();\n state.stop = true;\n return this.parseSubscripts(\n this.finishNode(node, \"BindExpression\"),\n startPos,\n startLoc,\n noCalls,\n );\n }\n\n // https://tc39.es/ecma262/#prod-CoverCallExpressionAndAsyncArrowHead\n // CoverCallExpressionAndAsyncArrowHead\n // CallExpression[?Yield, ?Await] Arguments[?Yield, ?Await]\n // OptionalChain[?Yield, ?Await] Arguments[?Yield, ?Await]\n parseCoverCallAndAsyncArrowHead(\n base: N.Expression,\n startPos: number,\n startLoc: Position,\n state: N.ParseSubscriptState,\n optional: boolean,\n ): N.Expression {\n const oldMaybeInArrowParameters = this.state.maybeInArrowParameters;\n let refExpressionErrors = null;\n\n this.state.maybeInArrowParameters = true;\n this.next(); // eat `(`\n\n let node = this.startNodeAt(startPos, startLoc);\n node.callee = base;\n\n if (state.maybeAsyncArrow) {\n this.expressionScope.enter(newAsyncArrowScope());\n refExpressionErrors = new ExpressionErrors();\n }\n\n if (state.optionalChainMember) {\n node.optional = optional;\n }\n\n if (optional) {\n node.arguments = this.parseCallExpressionArguments(tt.parenR);\n } else {\n node.arguments = this.parseCallExpressionArguments(\n tt.parenR,\n base.type === \"Import\",\n base.type !== \"Super\",\n node,\n refExpressionErrors,\n );\n }\n this.finishCallExpression(node, state.optionalChainMember);\n\n if (state.maybeAsyncArrow && this.shouldParseAsyncArrow() && !optional) {\n state.stop = true;\n this.expressionScope.validateAsPattern();\n this.expressionScope.exit();\n node = this.parseAsyncArrowFromCallExpression(\n this.startNodeAt(startPos, startLoc),\n node,\n );\n } else {\n if (state.maybeAsyncArrow) {\n this.checkExpressionErrors(refExpressionErrors, true);\n this.expressionScope.exit();\n }\n this.toReferencedArguments(node);\n }\n\n this.state.maybeInArrowParameters = oldMaybeInArrowParameters;\n\n return node;\n }\n\n toReferencedArguments(\n node: N.CallExpression | N.OptionalCallExpression,\n isParenthesizedExpr?: boolean,\n ) {\n this.toReferencedListDeep(node.arguments, isParenthesizedExpr);\n }\n\n // MemberExpression [?Yield, ?Await] TemplateLiteral[?Yield, ?Await, +Tagged]\n // CallExpression [?Yield, ?Await] TemplateLiteral[?Yield, ?Await, +Tagged]\n parseTaggedTemplateExpression(\n base: N.Expression,\n startPos: number,\n startLoc: Position,\n state: N.ParseSubscriptState,\n ): N.TaggedTemplateExpression {\n const node: N.TaggedTemplateExpression = this.startNodeAt(\n startPos,\n startLoc,\n );\n node.tag = base;\n node.quasi = this.parseTemplate(true);\n if (state.optionalChainMember) {\n this.raise(startPos, Errors.OptionalChainingNoTemplate);\n }\n return this.finishNode(node, \"TaggedTemplateExpression\");\n }\n\n atPossibleAsyncArrow(base: N.Expression): boolean {\n return (\n base.type === \"Identifier\" &&\n base.name === \"async\" &&\n this.state.lastTokEnd === base.end &&\n !this.canInsertSemicolon() &&\n // check there are no escape sequences, such as \\u{61}sync\n base.end - base.start === 5 &&\n base.start === this.state.potentialArrowAt\n );\n }\n\n finishCallExpression<T: N.CallExpression | N.OptionalCallExpression>(\n node: T,\n optional: boolean,\n ): N.Expression {\n if (node.callee.type === \"Import\") {\n if (node.arguments.length === 2) {\n if (process.env.BABEL_8_BREAKING) {\n this.expectPlugin(\"importAssertions\");\n } else {\n if (!this.hasPlugin(\"moduleAttributes\")) {\n this.expectPlugin(\"importAssertions\");\n }\n }\n }\n if (node.arguments.length === 0 || node.arguments.length > 2) {\n this.raise(\n node.start,\n Errors.ImportCallArity,\n this.hasPlugin(\"importAssertions\") ||\n this.hasPlugin(\"moduleAttributes\")\n ? \"one or two arguments\"\n : \"one argument\",\n );\n } else {\n for (const arg of node.arguments) {\n if (arg.type === \"SpreadElement\") {\n this.raise(arg.start, Errors.ImportCallSpreadArgument);\n }\n }\n }\n }\n return this.finishNode(\n node,\n optional ? \"OptionalCallExpression\" : \"CallExpression\",\n );\n }\n\n parseCallExpressionArguments(\n close: TokenType,\n dynamicImport?: boolean,\n allowPlaceholder?: boolean,\n nodeForExtra?: ?N.Node,\n refExpressionErrors?: ?ExpressionErrors,\n ): $ReadOnlyArray<?N.Expression> {\n const elts = [];\n let first = true;\n const oldInFSharpPipelineDirectBody = this.state.inFSharpPipelineDirectBody;\n this.state.inFSharpPipelineDirectBody = false;\n\n while (!this.eat(close)) {\n if (first) {\n first = false;\n } else {\n this.expect(tt.comma);\n if (this.match(close)) {\n if (\n dynamicImport &&\n !this.hasPlugin(\"importAssertions\") &&\n !this.hasPlugin(\"moduleAttributes\")\n ) {\n this.raise(\n this.state.lastTokStart,\n Errors.ImportCallArgumentTrailingComma,\n );\n }\n if (nodeForExtra) {\n this.addExtra(\n nodeForExtra,\n \"trailingComma\",\n this.state.lastTokStart,\n );\n }\n this.next();\n break;\n }\n }\n\n elts.push(\n this.parseExprListItem(\n false,\n refExpressionErrors,\n { start: 0 },\n allowPlaceholder,\n ),\n );\n }\n\n this.state.inFSharpPipelineDirectBody = oldInFSharpPipelineDirectBody;\n\n return elts;\n }\n\n shouldParseAsyncArrow(): boolean {\n return this.match(tt.arrow) && !this.canInsertSemicolon();\n }\n\n parseAsyncArrowFromCallExpression(\n node: N.ArrowFunctionExpression,\n call: N.CallExpression,\n ): N.ArrowFunctionExpression {\n this.expect(tt.arrow);\n this.parseArrowExpression(\n node,\n call.arguments,\n true,\n call.extra?.trailingComma,\n );\n return node;\n }\n\n // Parse a no-call expression (like argument of `new` or `::` operators).\n // https://tc39.es/ecma262/#prod-MemberExpression\n parseNoCallExpr(): N.Expression {\n const startPos = this.state.start;\n const startLoc = this.state.startLoc;\n return this.parseSubscripts(this.parseExprAtom(), startPos, startLoc, true);\n }\n\n // Parse an atomic expression — either a single token that is an\n // expression, an expression started by a keyword like `function` or\n // `new`, or an expression wrapped in punctuation like `()`, `[]`,\n // or `{}`.\n\n // https://tc39.es/ecma262/#prod-PrimaryExpression\n // https://tc39.es/ecma262/#prod-AsyncArrowFunction\n // PrimaryExpression\n // Super\n // Import\n // AsyncArrowFunction\n\n parseExprAtom(refExpressionErrors?: ?ExpressionErrors): N.Expression {\n let node;\n\n switch (this.state.type) {\n case tt._super:\n return this.parseSuper();\n\n case tt._import:\n node = this.startNode();\n this.next();\n\n if (this.match(tt.dot)) {\n return this.parseImportMetaProperty(node);\n }\n\n if (!this.match(tt.parenL)) {\n this.raise(this.state.lastTokStart, Errors.UnsupportedImport);\n }\n return this.finishNode(node, \"Import\");\n case tt._this:\n node = this.startNode();\n this.next();\n return this.finishNode(node, \"ThisExpression\");\n\n case tt.name: {\n const canBeArrow = this.state.potentialArrowAt === this.state.start;\n const containsEsc = this.state.containsEsc;\n const id = this.parseIdentifier();\n\n if (!containsEsc && id.name === \"async\" && !this.canInsertSemicolon()) {\n if (this.match(tt._function)) {\n this.next();\n return this.parseFunction(\n this.startNodeAtNode(id),\n undefined,\n true,\n );\n } else if (this.match(tt.name)) {\n // If the next token begins with \"=\", commit to parsing an async\n // arrow function. (Peeking ahead for \"=\" lets us avoid a more\n // expensive full-token lookahead on this common path.)\n if (this.lookaheadCharCode() === charCodes.equalsTo) {\n return this.parseAsyncArrowUnaryFunction(id);\n } else {\n // Otherwise, treat \"async\" as an identifier and let calling code\n // deal with the current tt.name token.\n return id;\n }\n } else if (this.match(tt._do)) {\n return this.parseDo(true);\n }\n }\n\n if (canBeArrow && this.match(tt.arrow) && !this.canInsertSemicolon()) {\n this.next();\n return this.parseArrowExpression(\n this.startNodeAtNode(id),\n [id],\n false,\n );\n }\n\n return id;\n }\n\n case tt._do: {\n return this.parseDo(false);\n }\n\n case tt.slash:\n case tt.slashAssign: {\n this.readRegexp();\n return this.parseRegExpLiteral(this.state.value);\n }\n\n case tt.num:\n return this.parseNumericLiteral(this.state.value);\n\n case tt.bigint:\n return this.parseBigIntLiteral(this.state.value);\n\n case tt.decimal:\n return this.parseDecimalLiteral(this.state.value);\n\n case tt.string:\n return this.parseStringLiteral(this.state.value);\n\n case tt._null:\n return this.parseNullLiteral();\n\n case tt._true:\n return this.parseBooleanLiteral(true);\n case tt._false:\n return this.parseBooleanLiteral(false);\n\n case tt.parenL: {\n const canBeArrow = this.state.potentialArrowAt === this.state.start;\n return this.parseParenAndDistinguishExpression(canBeArrow);\n }\n\n case tt.bracketBarL:\n case tt.bracketHashL: {\n return this.parseArrayLike(\n this.state.type === tt.bracketBarL ? tt.bracketBarR : tt.bracketR,\n /* canBePattern */ false,\n /* isTuple */ true,\n refExpressionErrors,\n );\n }\n case tt.bracketL: {\n return this.parseArrayLike(\n tt.bracketR,\n /* canBePattern */ true,\n /* isTuple */ false,\n refExpressionErrors,\n );\n }\n case tt.braceBarL:\n case tt.braceHashL: {\n return this.parseObjectLike(\n this.state.type === tt.braceBarL ? tt.braceBarR : tt.braceR,\n /* isPattern */ false,\n /* isRecord */ true,\n refExpressionErrors,\n );\n }\n case tt.braceL: {\n return this.parseObjectLike(\n tt.braceR,\n /* isPattern */ false,\n /* isRecord */ false,\n refExpressionErrors,\n );\n }\n case tt._function:\n return this.parseFunctionOrFunctionSent();\n\n case tt.at:\n this.parseDecorators();\n // fall through\n case tt._class:\n node = this.startNode();\n this.takeDecorators(node);\n return this.parseClass(node, false);\n\n case tt._new:\n return this.parseNewOrNewTarget();\n\n case tt.backQuote:\n return this.parseTemplate(false);\n\n // BindExpression[Yield]\n // :: MemberExpression[?Yield]\n case tt.doubleColon: {\n node = this.startNode();\n this.next();\n node.object = null;\n const callee = (node.callee = this.parseNoCallExpr());\n if (callee.type === \"MemberExpression\") {\n return this.finishNode(node, \"BindExpression\");\n } else {\n throw this.raise(callee.start, Errors.UnsupportedBind);\n }\n }\n\n case tt.privateName: {\n // https://tc39.es/proposal-private-fields-in-in\n // RelationalExpression [In, Yield, Await]\n // [+In] PrivateIdentifier in ShiftExpression[?Yield, ?Await]\n const start = this.state.start;\n const value = this.state.value;\n node = this.parsePrivateName();\n if (this.match(tt._in)) {\n this.expectPlugin(\"privateIn\");\n this.classScope.usePrivateName(value, node.start);\n } else if (this.hasPlugin(\"privateIn\")) {\n this.raise(this.state.start, Errors.PrivateInExpectedIn, value);\n } else {\n throw this.unexpected(start);\n }\n return node;\n }\n case tt.hash: {\n if (this.state.inPipeline) {\n node = this.startNode();\n\n if (\n this.getPluginOption(\"pipelineOperator\", \"proposal\") !== \"smart\"\n ) {\n this.raise(node.start, Errors.PrimaryTopicRequiresSmartPipeline);\n }\n\n this.next();\n\n if (!this.primaryTopicReferenceIsAllowedInCurrentTopicContext()) {\n this.raise(node.start, Errors.PrimaryTopicNotAllowed);\n }\n\n this.registerTopicReference();\n return this.finishNode(node, \"PipelinePrimaryTopicReference\");\n }\n }\n // fall through\n case tt.relational: {\n if (this.state.value === \"<\") {\n const lookaheadCh = this.input.codePointAt(this.nextTokenStart());\n if (\n isIdentifierStart(lookaheadCh) || // Element/Type Parameter <foo>\n lookaheadCh === charCodes.greaterThan // Fragment <>\n ) {\n this.expectOnePlugin([\"jsx\", \"flow\", \"typescript\"]);\n }\n }\n }\n // fall through\n default:\n throw this.unexpected();\n }\n }\n\n // async [no LineTerminator here] AsyncArrowBindingIdentifier[?Yield] [no LineTerminator here] => AsyncConciseBody[?In]\n parseAsyncArrowUnaryFunction(id: N.Expression): N.ArrowFunctionExpression {\n const node = this.startNodeAtNode(id);\n // We don't need to push a new ParameterDeclarationScope here since we are sure\n // 1) it is an async arrow, 2) no biding pattern is allowed in params\n this.prodParam.enter(functionFlags(true, this.prodParam.hasYield));\n const params = [this.parseIdentifier()];\n this.prodParam.exit();\n if (this.hasPrecedingLineBreak()) {\n this.raise(this.state.pos, Errors.LineTerminatorBeforeArrow);\n }\n this.expect(tt.arrow);\n // let foo = async bar => {};\n this.parseArrowExpression(node, params, true);\n return node;\n }\n\n // https://github.com/tc39/proposal-do-expressions\n // https://github.com/tc39/proposal-async-do-expressions\n parseDo(isAsync: boolean): N.DoExpression {\n this.expectPlugin(\"doExpressions\");\n if (isAsync) {\n this.expectPlugin(\"asyncDoExpressions\");\n }\n const node = this.startNode();\n node.async = isAsync;\n this.next(); // eat `do`\n const oldLabels = this.state.labels;\n this.state.labels = [];\n if (isAsync) {\n // AsyncDoExpression :\n // async [no LineTerminator here] do Block[~Yield, +Await, ~Return]\n this.prodParam.enter(PARAM_AWAIT);\n node.body = this.parseBlock();\n this.prodParam.exit();\n } else {\n node.body = this.parseBlock();\n }\n\n this.state.labels = oldLabels;\n return this.finishNode(node, \"DoExpression\");\n }\n\n // Parse the `super` keyword\n parseSuper(): N.Super {\n const node = this.startNode();\n this.next(); // eat `super`\n if (\n this.match(tt.parenL) &&\n !this.scope.allowDirectSuper &&\n !this.options.allowSuperOutsideMethod\n ) {\n this.raise(node.start, Errors.SuperNotAllowed);\n } else if (\n !this.scope.allowSuper &&\n !this.options.allowSuperOutsideMethod\n ) {\n this.raise(node.start, Errors.UnexpectedSuper);\n }\n\n if (\n !this.match(tt.parenL) &&\n !this.match(tt.bracketL) &&\n !this.match(tt.dot)\n ) {\n this.raise(node.start, Errors.UnsupportedSuper);\n }\n\n return this.finishNode(node, \"Super\");\n }\n\n parseMaybePrivateName(\n isPrivateNameAllowed: boolean,\n ): N.PrivateName | N.Identifier {\n const isPrivate = this.match(tt.privateName);\n\n if (isPrivate) {\n if (!isPrivateNameAllowed) {\n this.raise(this.state.start + 1, Errors.UnexpectedPrivateField);\n }\n return this.parsePrivateName();\n } else {\n return this.parseIdentifier(true);\n }\n }\n\n parsePrivateName(): N.PrivateName {\n const node = this.startNode();\n const id = this.startNodeAt(\n this.state.start + 1,\n // The position is hardcoded because we merge `#` and name into a single\n // tt.privateName token\n new Position(\n this.state.curLine,\n this.state.start + 1 - this.state.lineStart,\n ),\n );\n const name = this.state.value;\n this.next(); // eat #name;\n node.id = this.createIdentifier(id, name);\n return this.finishNode(node, \"PrivateName\");\n }\n\n parseFunctionOrFunctionSent(): N.FunctionExpression | N.MetaProperty {\n const node = this.startNode();\n\n // We do not do parseIdentifier here because when parseFunctionOrFunctionSent\n // is called we already know that the current token is a \"name\" with the value \"function\"\n // This will improve perf a tiny little bit as we do not do validation but more importantly\n // here is that parseIdentifier will remove an item from the expression stack\n // if \"function\" or \"class\" is parsed as identifier (in objects e.g.), which should not happen here.\n this.next(); // eat `function`\n\n if (this.prodParam.hasYield && this.match(tt.dot)) {\n const meta = this.createIdentifier(\n this.startNodeAtNode(node),\n \"function\",\n );\n this.next(); // eat `.`\n return this.parseMetaProperty(node, meta, \"sent\");\n }\n return this.parseFunction(node);\n }\n\n parseMetaProperty(\n node: N.MetaProperty,\n meta: N.Identifier,\n propertyName: string,\n ): N.MetaProperty {\n node.meta = meta;\n\n if (meta.name === \"function\" && propertyName === \"sent\") {\n // https://github.com/tc39/proposal-function.sent#syntax-1\n if (this.isContextual(propertyName)) {\n this.expectPlugin(\"functionSent\");\n } else if (!this.hasPlugin(\"functionSent\")) {\n // The code wasn't `function.sent` but just `function.`, so a simple error is less confusing.\n this.unexpected();\n }\n }\n\n const containsEsc = this.state.containsEsc;\n\n node.property = this.parseIdentifier(true);\n\n if (node.property.name !== propertyName || containsEsc) {\n this.raise(\n node.property.start,\n Errors.UnsupportedMetaProperty,\n meta.name,\n propertyName,\n );\n }\n\n return this.finishNode(node, \"MetaProperty\");\n }\n\n // https://tc39.es/ecma262/#prod-ImportMeta\n parseImportMetaProperty(node: N.MetaProperty): N.MetaProperty {\n const id = this.createIdentifier(this.startNodeAtNode(node), \"import\");\n this.next(); // eat `.`\n\n if (this.isContextual(\"meta\")) {\n if (!this.inModule) {\n this.raise(id.start, SourceTypeModuleErrors.ImportMetaOutsideModule);\n }\n this.sawUnambiguousESM = true;\n }\n\n return this.parseMetaProperty(node, id, \"meta\");\n }\n\n parseLiteralAtNode<T: N.Node>(\n value: any,\n type: $ElementType<T, \"type\">,\n node: any,\n ): T {\n this.addExtra(node, \"rawValue\", value);\n this.addExtra(node, \"raw\", this.input.slice(node.start, this.state.end));\n node.value = value;\n this.next();\n return this.finishNode<T>(node, type);\n }\n\n parseLiteral<T: N.Node>(value: any, type: $ElementType<T, \"type\">): T {\n const node = this.startNode();\n return this.parseLiteralAtNode(value, type, node);\n }\n\n parseStringLiteral(value: any) {\n return this.parseLiteral<N.StringLiteral>(value, \"StringLiteral\");\n }\n\n parseNumericLiteral(value: any) {\n return this.parseLiteral<N.NumericLiteral>(value, \"NumericLiteral\");\n }\n\n parseBigIntLiteral(value: any) {\n return this.parseLiteral<N.BigIntLiteral>(value, \"BigIntLiteral\");\n }\n\n parseDecimalLiteral(value: any) {\n return this.parseLiteral<N.DecimalLiteral>(value, \"DecimalLiteral\");\n }\n\n parseRegExpLiteral(value: { value: any, pattern: string, flags: string }) {\n const node = this.parseLiteral<N.RegExpLiteral>(\n value.value,\n \"RegExpLiteral\",\n );\n node.pattern = value.pattern;\n node.flags = value.flags;\n return node;\n }\n\n parseBooleanLiteral(value: boolean) {\n const node = this.startNode();\n node.value = value;\n this.next();\n return this.finishNode<N.BooleanLiteral>(node, \"BooleanLiteral\");\n }\n\n parseNullLiteral() {\n const node = this.startNode();\n this.next();\n return this.finishNode<N.NullLiteral>(node, \"NullLiteral\");\n }\n\n // https://tc39.es/ecma262/#prod-CoverParenthesizedExpressionAndArrowParameterList\n parseParenAndDistinguishExpression(canBeArrow: boolean): N.Expression {\n const startPos = this.state.start;\n const startLoc = this.state.startLoc;\n\n let val;\n this.next(); // eat `(`\n this.expressionScope.enter(newArrowHeadScope());\n\n const oldMaybeInArrowParameters = this.state.maybeInArrowParameters;\n const oldInFSharpPipelineDirectBody = this.state.inFSharpPipelineDirectBody;\n this.state.maybeInArrowParameters = true;\n this.state.inFSharpPipelineDirectBody = false;\n\n const innerStartPos = this.state.start;\n const innerStartLoc = this.state.startLoc;\n const exprList = [];\n const refExpressionErrors = new ExpressionErrors();\n const refNeedsArrowPos = { start: 0 };\n let first = true;\n let spreadStart;\n let optionalCommaStart;\n\n while (!this.match(tt.parenR)) {\n if (first) {\n first = false;\n } else {\n this.expect(tt.comma, refNeedsArrowPos.start || null);\n if (this.match(tt.parenR)) {\n optionalCommaStart = this.state.start;\n break;\n }\n }\n\n if (this.match(tt.ellipsis)) {\n const spreadNodeStartPos = this.state.start;\n const spreadNodeStartLoc = this.state.startLoc;\n spreadStart = this.state.start;\n exprList.push(\n this.parseParenItem(\n this.parseRestBinding(),\n spreadNodeStartPos,\n spreadNodeStartLoc,\n ),\n );\n\n this.checkCommaAfterRest(charCodes.rightParenthesis);\n\n break;\n } else {\n exprList.push(\n this.parseMaybeAssignAllowIn(\n refExpressionErrors,\n this.parseParenItem,\n refNeedsArrowPos,\n ),\n );\n }\n }\n\n const innerEndPos = this.state.lastTokEnd;\n const innerEndLoc = this.state.lastTokEndLoc;\n this.expect(tt.parenR);\n\n this.state.maybeInArrowParameters = oldMaybeInArrowParameters;\n this.state.inFSharpPipelineDirectBody = oldInFSharpPipelineDirectBody;\n\n let arrowNode = this.startNodeAt(startPos, startLoc);\n if (\n canBeArrow &&\n this.shouldParseArrow() &&\n (arrowNode = this.parseArrow(arrowNode))\n ) {\n this.expressionScope.validateAsPattern();\n this.expressionScope.exit();\n this.parseArrowExpression(arrowNode, exprList, false);\n return arrowNode;\n }\n this.expressionScope.exit();\n\n if (!exprList.length) {\n this.unexpected(this.state.lastTokStart);\n }\n if (optionalCommaStart) this.unexpected(optionalCommaStart);\n if (spreadStart) this.unexpected(spreadStart);\n this.checkExpressionErrors(refExpressionErrors, true);\n if (refNeedsArrowPos.start) this.unexpected(refNeedsArrowPos.start);\n\n this.toReferencedListDeep(exprList, /* isParenthesizedExpr */ true);\n if (exprList.length > 1) {\n val = this.startNodeAt(innerStartPos, innerStartLoc);\n val.expressions = exprList;\n this.finishNodeAt(val, \"SequenceExpression\", innerEndPos, innerEndLoc);\n } else {\n val = exprList[0];\n }\n\n if (!this.options.createParenthesizedExpressions) {\n this.addExtra(val, \"parenthesized\", true);\n this.addExtra(val, \"parenStart\", startPos);\n return val;\n }\n\n const parenExpression = this.startNodeAt(startPos, startLoc);\n parenExpression.expression = val;\n this.finishNode(parenExpression, \"ParenthesizedExpression\");\n return parenExpression;\n }\n\n shouldParseArrow(): boolean {\n return !this.canInsertSemicolon();\n }\n\n parseArrow(node: N.ArrowFunctionExpression): ?N.ArrowFunctionExpression {\n if (this.eat(tt.arrow)) {\n return node;\n }\n }\n\n parseParenItem(\n node: N.Expression,\n startPos: number, // eslint-disable-line no-unused-vars\n startLoc: Position, // eslint-disable-line no-unused-vars\n ): N.Expression {\n return node;\n }\n\n parseNewOrNewTarget(): N.NewExpression | N.MetaProperty {\n const node = this.startNode();\n this.next();\n if (this.match(tt.dot)) {\n // https://tc39.es/ecma262/#prod-NewTarget\n const meta = this.createIdentifier(this.startNodeAtNode(node), \"new\");\n this.next();\n const metaProp = this.parseMetaProperty(node, meta, \"target\");\n\n if (!this.scope.inNonArrowFunction && !this.scope.inClass) {\n this.raise(metaProp.start, Errors.UnexpectedNewTarget);\n }\n\n return metaProp;\n }\n\n return this.parseNew(node);\n }\n\n // New's precedence is slightly tricky. It must allow its argument to\n // be a `[]` or dot subscript expression, but not a call — at least,\n // not without wrapping it in parentheses. Thus, it uses the noCalls\n // argument to parseSubscripts to prevent it from consuming the\n // argument list.\n // https://tc39.es/ecma262/#prod-NewExpression\n parseNew(node: N.Expression): N.NewExpression {\n node.callee = this.parseNoCallExpr();\n if (node.callee.type === \"Import\") {\n this.raise(node.callee.start, Errors.ImportCallNotNewExpression);\n } else if (this.isOptionalChain(node.callee)) {\n this.raise(this.state.lastTokEnd, Errors.OptionalChainingNoNew);\n } else if (this.eat(tt.questionDot)) {\n this.raise(this.state.start, Errors.OptionalChainingNoNew);\n }\n\n this.parseNewArguments(node);\n return this.finishNode(node, \"NewExpression\");\n }\n\n parseNewArguments(node: N.NewExpression): void {\n if (this.eat(tt.parenL)) {\n const args = this.parseExprList(tt.parenR);\n this.toReferencedList(args);\n // $FlowFixMe (parseExprList should be all non-null in this case)\n node.arguments = args;\n } else {\n node.arguments = [];\n }\n }\n\n // Parse template expression.\n\n parseTemplateElement(isTagged: boolean): N.TemplateElement {\n const elem = this.startNode();\n if (this.state.value === null) {\n if (!isTagged) {\n this.raise(this.state.start + 1, Errors.InvalidEscapeSequenceTemplate);\n }\n }\n elem.value = {\n raw: this.input\n .slice(this.state.start, this.state.end)\n .replace(/\\r\\n?/g, \"\\n\"),\n cooked: this.state.value,\n };\n this.next();\n elem.tail = this.match(tt.backQuote);\n return this.finishNode(elem, \"TemplateElement\");\n }\n\n // https://tc39.es/ecma262/#prod-TemplateLiteral\n parseTemplate(isTagged: boolean): N.TemplateLiteral {\n const node = this.startNode();\n this.next();\n node.expressions = [];\n let curElt = this.parseTemplateElement(isTagged);\n node.quasis = [curElt];\n while (!curElt.tail) {\n this.expect(tt.dollarBraceL);\n node.expressions.push(this.parseTemplateSubstitution());\n this.expect(tt.braceR);\n node.quasis.push((curElt = this.parseTemplateElement(isTagged)));\n }\n this.next();\n return this.finishNode(node, \"TemplateLiteral\");\n }\n\n // This is overwritten by the TypeScript plugin to parse template types\n parseTemplateSubstitution(): N.Expression {\n return this.parseExpression();\n }\n\n // Parse an object literal, binding pattern, or record.\n\n parseObjectLike<T: N.ObjectPattern | N.ObjectExpression>(\n close: TokenType,\n isPattern: boolean,\n isRecord?: ?boolean,\n refExpressionErrors?: ?ExpressionErrors,\n ): T {\n if (isRecord) {\n this.expectPlugin(\"recordAndTuple\");\n }\n const oldInFSharpPipelineDirectBody = this.state.inFSharpPipelineDirectBody;\n this.state.inFSharpPipelineDirectBody = false;\n const propHash: any = Object.create(null);\n let first = true;\n const node = this.startNode();\n\n node.properties = [];\n this.next();\n\n while (!this.match(close)) {\n if (first) {\n first = false;\n } else {\n this.expect(tt.comma);\n if (this.match(close)) {\n this.addExtra(node, \"trailingComma\", this.state.lastTokStart);\n break;\n }\n }\n\n const prop = this.parsePropertyDefinition(isPattern, refExpressionErrors);\n if (!isPattern) {\n // $FlowIgnore RestElement will never be returned if !isPattern\n this.checkProto(prop, isRecord, propHash, refExpressionErrors);\n }\n\n if (\n isRecord &&\n !this.isObjectProperty(prop) &&\n prop.type !== \"SpreadElement\"\n ) {\n this.raise(prop.start, Errors.InvalidRecordProperty);\n }\n\n // $FlowIgnore\n if (prop.shorthand) {\n this.addExtra(prop, \"shorthand\", true);\n }\n\n node.properties.push(prop);\n }\n\n this.next();\n\n this.state.inFSharpPipelineDirectBody = oldInFSharpPipelineDirectBody;\n let type = \"ObjectExpression\";\n if (isPattern) {\n type = \"ObjectPattern\";\n } else if (isRecord) {\n type = \"RecordExpression\";\n }\n return this.finishNode(node, type);\n }\n\n // Check grammar production:\n // IdentifierName *_opt PropertyName\n // It is used in `parsePropertyDefinition` to detect AsyncMethod and Accessors\n maybeAsyncOrAccessorProp(prop: N.ObjectProperty): boolean {\n return (\n !prop.computed &&\n prop.key.type === \"Identifier\" &&\n (this.isLiteralPropertyName() ||\n this.match(tt.bracketL) ||\n this.match(tt.star))\n );\n }\n\n // https://tc39.es/ecma262/#prod-PropertyDefinition\n parsePropertyDefinition(\n isPattern: boolean,\n refExpressionErrors?: ?ExpressionErrors,\n ): N.ObjectMember | N.SpreadElement | N.RestElement {\n let decorators = [];\n if (this.match(tt.at)) {\n if (this.hasPlugin(\"decorators\")) {\n this.raise(this.state.start, Errors.UnsupportedPropertyDecorator);\n }\n\n // we needn't check if decorators (stage 0) plugin is enabled since it's checked by\n // the call to this.parseDecorator\n while (this.match(tt.at)) {\n decorators.push(this.parseDecorator());\n }\n }\n\n const prop = this.startNode();\n let isGenerator = false;\n let isAsync = false;\n let isAccessor = false;\n let startPos;\n let startLoc;\n\n if (this.match(tt.ellipsis)) {\n if (decorators.length) this.unexpected();\n if (isPattern) {\n this.next();\n // Don't use parseRestBinding() as we only allow Identifier here.\n prop.argument = this.parseIdentifier();\n this.checkCommaAfterRest(charCodes.rightCurlyBrace);\n return this.finishNode(prop, \"RestElement\");\n }\n\n return this.parseSpread();\n }\n\n if (decorators.length) {\n prop.decorators = decorators;\n decorators = [];\n }\n\n prop.method = false;\n\n if (isPattern || refExpressionErrors) {\n startPos = this.state.start;\n startLoc = this.state.startLoc;\n }\n\n if (!isPattern) {\n isGenerator = this.eat(tt.star);\n }\n\n const containsEsc = this.state.containsEsc;\n const key = this.parsePropertyName(prop, /* isPrivateNameAllowed */ false);\n\n if (\n !isPattern &&\n !isGenerator &&\n !containsEsc &&\n this.maybeAsyncOrAccessorProp(prop)\n ) {\n const keyName = key.name;\n // https://tc39.es/ecma262/#prod-AsyncMethod\n // https://tc39.es/ecma262/#prod-AsyncGeneratorMethod\n if (keyName === \"async\" && !this.hasPrecedingLineBreak()) {\n isAsync = true;\n isGenerator = this.eat(tt.star);\n this.parsePropertyName(prop, /* isPrivateNameAllowed */ false);\n }\n // get PropertyName[?Yield, ?Await] () { FunctionBody[~Yield, ~Await] }\n // set PropertyName[?Yield, ?Await] ( PropertySetParameterList ) { FunctionBody[~Yield, ~Await] }\n if (keyName === \"get\" || keyName === \"set\") {\n isAccessor = true;\n prop.kind = keyName;\n if (this.match(tt.star)) {\n isGenerator = true;\n this.raise(this.state.pos, Errors.AccessorIsGenerator, keyName);\n this.next();\n }\n this.parsePropertyName(prop, /* isPrivateNameAllowed */ false);\n }\n }\n\n this.parseObjPropValue(\n prop,\n startPos,\n startLoc,\n isGenerator,\n isAsync,\n isPattern,\n isAccessor,\n refExpressionErrors,\n );\n\n return prop;\n }\n\n getGetterSetterExpectedParamCount(\n method: N.ObjectMethod | N.ClassMethod,\n ): number {\n return method.kind === \"get\" ? 0 : 1;\n }\n\n // This exists so we can override within the ESTree plugin\n getObjectOrClassMethodParams(method: N.ObjectMethod | N.ClassMethod) {\n return method.params;\n }\n\n // get methods aren't allowed to have any parameters\n // set methods must have exactly 1 parameter which is not a rest parameter\n checkGetterSetterParams(method: N.ObjectMethod | N.ClassMethod): void {\n const paramCount = this.getGetterSetterExpectedParamCount(method);\n const params = this.getObjectOrClassMethodParams(method);\n\n const start = method.start;\n\n if (params.length !== paramCount) {\n if (method.kind === \"get\") {\n this.raise(start, Errors.BadGetterArity);\n } else {\n this.raise(start, Errors.BadSetterArity);\n }\n }\n\n if (\n method.kind === \"set\" &&\n params[params.length - 1]?.type === \"RestElement\"\n ) {\n this.raise(start, Errors.BadSetterRestParameter);\n }\n }\n\n // https://tc39.es/ecma262/#prod-MethodDefinition\n parseObjectMethod(\n prop: N.ObjectMethod,\n isGenerator: boolean,\n isAsync: boolean,\n isPattern: boolean,\n isAccessor: boolean,\n ): ?N.ObjectMethod {\n if (isAccessor) {\n // isAccessor implies isAsync: false, isPattern: false, isGenerator: false\n this.parseMethod(\n prop,\n // This _should_ be false, but with error recovery, we allow it to be\n // set for informational purposes\n isGenerator,\n /* isAsync */ false,\n /* isConstructor */ false,\n false,\n \"ObjectMethod\",\n );\n this.checkGetterSetterParams(prop);\n return prop;\n }\n\n if (isAsync || isGenerator || this.match(tt.parenL)) {\n if (isPattern) this.unexpected();\n prop.kind = \"method\";\n prop.method = true;\n return this.parseMethod(\n prop,\n isGenerator,\n isAsync,\n /* isConstructor */ false,\n false,\n \"ObjectMethod\",\n );\n }\n }\n\n // if `isPattern` is true, parse https://tc39.es/ecma262/#prod-BindingProperty\n // else https://tc39.es/ecma262/#prod-PropertyDefinition\n parseObjectProperty(\n prop: N.ObjectProperty,\n startPos: ?number,\n startLoc: ?Position,\n isPattern: boolean,\n refExpressionErrors: ?ExpressionErrors,\n ): ?N.ObjectProperty {\n prop.shorthand = false;\n\n if (this.eat(tt.colon)) {\n prop.value = isPattern\n ? this.parseMaybeDefault(this.state.start, this.state.startLoc)\n : this.parseMaybeAssignAllowIn(refExpressionErrors);\n\n return this.finishNode(prop, \"ObjectProperty\");\n }\n\n if (!prop.computed && prop.key.type === \"Identifier\") {\n // PropertyDefinition:\n // IdentifierReference\n // CoveredInitializedName\n // Note: `{ eval } = {}` will be checked in `checkLVal` later.\n this.checkReservedWord(prop.key.name, prop.key.start, true, false);\n\n if (isPattern) {\n prop.value = this.parseMaybeDefault(\n startPos,\n startLoc,\n prop.key.__clone(),\n );\n } else if (this.match(tt.eq) && refExpressionErrors) {\n if (refExpressionErrors.shorthandAssign === -1) {\n refExpressionErrors.shorthandAssign = this.state.start;\n }\n prop.value = this.parseMaybeDefault(\n startPos,\n startLoc,\n prop.key.__clone(),\n );\n } else {\n prop.value = prop.key.__clone();\n }\n prop.shorthand = true;\n\n return this.finishNode(prop, \"ObjectProperty\");\n }\n }\n\n parseObjPropValue(\n prop: any,\n startPos: ?number,\n startLoc: ?Position,\n isGenerator: boolean,\n isAsync: boolean,\n isPattern: boolean,\n isAccessor: boolean,\n refExpressionErrors?: ?ExpressionErrors,\n ): void {\n const node =\n this.parseObjectMethod(\n prop,\n isGenerator,\n isAsync,\n isPattern,\n isAccessor,\n ) ||\n this.parseObjectProperty(\n prop,\n startPos,\n startLoc,\n isPattern,\n refExpressionErrors,\n );\n\n if (!node) this.unexpected();\n\n // $FlowFixMe\n return node;\n }\n\n parsePropertyName(\n prop: N.ObjectOrClassMember | N.ClassMember | N.TsNamedTypeElementBase,\n isPrivateNameAllowed: boolean,\n ): N.Expression | N.Identifier {\n if (this.eat(tt.bracketL)) {\n (prop: $FlowSubtype<N.ObjectOrClassMember>).computed = true;\n prop.key = this.parseMaybeAssignAllowIn();\n this.expect(tt.bracketR);\n } else {\n const oldInPropertyName = this.state.inPropertyName;\n this.state.inPropertyName = true;\n // We check if it's valid for it to be a private name when we push it.\n const type = this.state.type;\n (prop: $FlowFixMe).key =\n type === tt.num ||\n type === tt.string ||\n type === tt.bigint ||\n type === tt.decimal\n ? this.parseExprAtom()\n : this.parseMaybePrivateName(isPrivateNameAllowed);\n\n if (type !== tt.privateName) {\n // ClassPrivateProperty is never computed, so we don't assign in that case.\n prop.computed = false;\n }\n\n this.state.inPropertyName = oldInPropertyName;\n }\n\n return prop.key;\n }\n\n // Initialize empty function node.\n\n initFunction(node: N.BodilessFunctionOrMethodBase, isAsync: ?boolean): void {\n node.id = null;\n node.generator = false;\n node.async = !!isAsync;\n }\n\n // Parse object or class method.\n\n parseMethod<T: N.MethodLike>(\n node: T,\n isGenerator: boolean,\n isAsync: boolean,\n isConstructor: boolean,\n allowDirectSuper: boolean,\n type: string,\n inClassScope: boolean = false,\n ): T {\n this.initFunction(node, isAsync);\n node.generator = !!isGenerator;\n const allowModifiers = isConstructor; // For TypeScript parameter properties\n this.scope.enter(\n SCOPE_FUNCTION |\n SCOPE_SUPER |\n (inClassScope ? SCOPE_CLASS : 0) |\n (allowDirectSuper ? SCOPE_DIRECT_SUPER : 0),\n );\n this.prodParam.enter(functionFlags(isAsync, node.generator));\n this.parseFunctionParams((node: any), allowModifiers);\n this.parseFunctionBodyAndFinish(node, type, true);\n this.prodParam.exit();\n this.scope.exit();\n\n return node;\n }\n\n // parse an array literal or tuple literal\n // https://tc39.es/ecma262/#prod-ArrayLiteral\n // https://tc39.es/proposal-record-tuple/#prod-TupleLiteral\n parseArrayLike(\n close: TokenType,\n canBePattern: boolean,\n isTuple: boolean,\n refExpressionErrors: ?ExpressionErrors,\n ): N.ArrayExpression | N.TupleExpression {\n if (isTuple) {\n this.expectPlugin(\"recordAndTuple\");\n }\n const oldInFSharpPipelineDirectBody = this.state.inFSharpPipelineDirectBody;\n this.state.inFSharpPipelineDirectBody = false;\n const node = this.startNode();\n this.next();\n node.elements = this.parseExprList(\n close,\n /* allowEmpty */ !isTuple,\n refExpressionErrors,\n node,\n );\n this.state.inFSharpPipelineDirectBody = oldInFSharpPipelineDirectBody;\n return this.finishNode(\n node,\n isTuple ? \"TupleExpression\" : \"ArrayExpression\",\n );\n }\n\n // Parse arrow function expression.\n // If the parameters are provided, they will be converted to an\n // assignable list.\n parseArrowExpression(\n node: N.ArrowFunctionExpression,\n params: ?(N.Expression[]),\n isAsync: boolean,\n trailingCommaPos: ?number,\n ): N.ArrowFunctionExpression {\n this.scope.enter(SCOPE_FUNCTION | SCOPE_ARROW);\n let flags = functionFlags(isAsync, false);\n // ConciseBody and AsyncConciseBody inherit [In]\n if (!this.match(tt.bracketL) && this.prodParam.hasIn) {\n flags |= PARAM_IN;\n }\n this.prodParam.enter(flags);\n this.initFunction(node, isAsync);\n const oldMaybeInArrowParameters = this.state.maybeInArrowParameters;\n\n if (params) {\n this.state.maybeInArrowParameters = true;\n this.setArrowFunctionParameters(node, params, trailingCommaPos);\n }\n this.state.maybeInArrowParameters = false;\n this.parseFunctionBody(node, true);\n\n this.prodParam.exit();\n this.scope.exit();\n this.state.maybeInArrowParameters = oldMaybeInArrowParameters;\n\n return this.finishNode(node, \"ArrowFunctionExpression\");\n }\n\n setArrowFunctionParameters(\n node: N.ArrowFunctionExpression,\n params: N.Expression[],\n trailingCommaPos: ?number,\n ): void {\n node.params = this.toAssignableList(params, trailingCommaPos, false);\n }\n\n parseFunctionBodyAndFinish(\n node: N.BodilessFunctionOrMethodBase,\n type: string,\n isMethod?: boolean = false,\n ): void {\n // $FlowIgnore (node is not bodiless if we get here)\n this.parseFunctionBody(node, false, isMethod);\n this.finishNode(node, type);\n }\n\n // Parse function body and check parameters.\n parseFunctionBody(\n node: N.Function,\n allowExpression: ?boolean,\n isMethod?: boolean = false,\n ): void {\n const isExpression = allowExpression && !this.match(tt.braceL);\n this.expressionScope.enter(newExpressionScope());\n\n if (isExpression) {\n // https://tc39.es/ecma262/#prod-ExpressionBody\n node.body = this.parseMaybeAssign();\n this.checkParams(node, false, allowExpression, false);\n } else {\n const oldStrict = this.state.strict;\n // Start a new scope with regard to labels\n // flag (restore them to their old value afterwards).\n const oldLabels = this.state.labels;\n this.state.labels = [];\n\n // FunctionBody[Yield, Await]:\n // StatementList[?Yield, ?Await, +Return] opt\n this.prodParam.enter(this.prodParam.currentFlags() | PARAM_RETURN);\n node.body = this.parseBlock(\n true,\n false,\n // Strict mode function checks after we parse the statements in the function body.\n (hasStrictModeDirective: boolean) => {\n const nonSimple = !this.isSimpleParamList(node.params);\n\n if (hasStrictModeDirective && nonSimple) {\n // This logic is here to align the error location with the ESTree plugin.\n const errorPos =\n // $FlowIgnore\n (node.kind === \"method\" || node.kind === \"constructor\") &&\n // $FlowIgnore\n !!node.key\n ? node.key.end\n : node.start;\n this.raise(errorPos, Errors.IllegalLanguageModeDirective);\n }\n\n const strictModeChanged = !oldStrict && this.state.strict;\n\n // Add the params to varDeclaredNames to ensure that an error is thrown\n // if a let/const declaration in the function clashes with one of the params.\n this.checkParams(\n node,\n !this.state.strict && !allowExpression && !isMethod && !nonSimple,\n allowExpression,\n strictModeChanged,\n );\n\n // Ensure the function name isn't a forbidden identifier in strict mode, e.g. 'eval'\n if (this.state.strict && node.id) {\n this.checkLVal(\n node.id,\n \"function name\",\n BIND_OUTSIDE,\n undefined,\n undefined,\n strictModeChanged,\n );\n }\n },\n );\n this.prodParam.exit();\n this.expressionScope.exit();\n this.state.labels = oldLabels;\n }\n }\n\n isSimpleParamList(\n params: $ReadOnlyArray<N.Pattern | N.TSParameterProperty>,\n ): boolean {\n for (let i = 0, len = params.length; i < len; i++) {\n if (params[i].type !== \"Identifier\") return false;\n }\n return true;\n }\n\n checkParams(\n node: N.Function,\n allowDuplicates: boolean,\n // eslint-disable-next-line no-unused-vars\n isArrowFunction: ?boolean,\n strictModeChanged?: boolean = true,\n ): void {\n const checkClashes = new Set();\n for (const param of node.params) {\n this.checkLVal(\n param,\n \"function parameter list\",\n BIND_VAR,\n allowDuplicates ? null : checkClashes,\n undefined,\n strictModeChanged,\n );\n }\n }\n\n // Parses a comma-separated list of expressions, and returns them as\n // an array. `close` is the token type that ends the list, and\n // `allowEmpty` can be turned on to allow subsequent commas with\n // nothing in between them to be parsed as `null` (which is needed\n // for array literals).\n\n parseExprList(\n close: TokenType,\n allowEmpty?: boolean,\n refExpressionErrors?: ?ExpressionErrors,\n nodeForExtra?: ?N.Node,\n ): $ReadOnlyArray<?N.Expression> {\n const elts = [];\n let first = true;\n\n while (!this.eat(close)) {\n if (first) {\n first = false;\n } else {\n this.expect(tt.comma);\n if (this.match(close)) {\n if (nodeForExtra) {\n this.addExtra(\n nodeForExtra,\n \"trailingComma\",\n this.state.lastTokStart,\n );\n }\n this.next();\n break;\n }\n }\n\n elts.push(this.parseExprListItem(allowEmpty, refExpressionErrors));\n }\n return elts;\n }\n\n parseExprListItem(\n allowEmpty: ?boolean,\n refExpressionErrors?: ?ExpressionErrors,\n refNeedsArrowPos: ?Pos,\n allowPlaceholder: ?boolean,\n ): ?N.Expression {\n let elt;\n if (this.match(tt.comma)) {\n if (!allowEmpty) {\n this.raise(this.state.pos, Errors.UnexpectedToken, \",\");\n }\n elt = null;\n } else if (this.match(tt.ellipsis)) {\n const spreadNodeStartPos = this.state.start;\n const spreadNodeStartLoc = this.state.startLoc;\n elt = this.parseParenItem(\n this.parseSpread(refExpressionErrors, refNeedsArrowPos),\n spreadNodeStartPos,\n spreadNodeStartLoc,\n );\n } else if (this.match(tt.question)) {\n this.expectPlugin(\"partialApplication\");\n if (!allowPlaceholder) {\n this.raise(this.state.start, Errors.UnexpectedArgumentPlaceholder);\n }\n const node = this.startNode();\n this.next();\n elt = this.finishNode(node, \"ArgumentPlaceholder\");\n } else {\n elt = this.parseMaybeAssignAllowIn(\n refExpressionErrors,\n this.parseParenItem,\n refNeedsArrowPos,\n );\n }\n return elt;\n }\n\n // Parse the next token as an identifier. If `liberal` is true (used\n // when parsing properties), it will also convert keywords into\n // identifiers.\n // This shouldn't be used to parse the keywords of meta properties, since they\n // are not identifiers and cannot contain escape sequences.\n\n parseIdentifier(liberal?: boolean): N.Identifier {\n const node = this.startNode();\n const name = this.parseIdentifierName(node.start, liberal);\n\n return this.createIdentifier(node, name);\n }\n\n createIdentifier(node: N.Identifier, name: string): N.Identifier {\n node.name = name;\n node.loc.identifierName = name;\n\n return this.finishNode(node, \"Identifier\");\n }\n\n parseIdentifierName(pos: number, liberal?: boolean): string {\n let name: string;\n\n const { start, type } = this.state;\n\n if (type === tt.name) {\n name = this.state.value;\n } else if (type.keyword) {\n name = type.keyword;\n\n // `class` and `function` keywords push function-type token context into this.context.\n // But there is no chance to pop the context if the keyword is consumed\n // as an identifier such as a property name.\n if (type === tt._class || type === tt._function) {\n const curContext = this.curContext();\n if (\n curContext === ct.functionStatement ||\n curContext === ct.functionExpression\n ) {\n this.state.context.pop();\n }\n }\n } else {\n throw this.unexpected();\n }\n\n if (liberal) {\n // If the current token is not used as a keyword, set its type to \"tt.name\".\n // This will prevent this.next() from throwing about unexpected escapes.\n this.state.type = tt.name;\n } else {\n this.checkReservedWord(name, start, !!type.keyword, false);\n }\n\n this.next();\n\n return name;\n }\n\n checkReservedWord(\n word: string,\n startLoc: number,\n checkKeywords: boolean,\n isBinding: boolean,\n ): void {\n // Every JavaScript reserved word is 10 characters or less.\n if (word.length > 10) {\n return;\n }\n // Most identifiers are not reservedWord-like, they don't need special\n // treatments afterward, which very likely ends up throwing errors\n if (!canBeReservedWord(word)) {\n return;\n }\n\n if (word === \"yield\") {\n if (this.prodParam.hasYield) {\n this.raise(startLoc, Errors.YieldBindingIdentifier);\n return;\n }\n } else if (word === \"await\") {\n if (this.prodParam.hasAwait) {\n this.raise(startLoc, Errors.AwaitBindingIdentifier);\n return;\n } else if (this.scope.inStaticBlock && !this.scope.inNonArrowFunction) {\n this.raise(startLoc, Errors.AwaitBindingIdentifierInStaticBlock);\n return;\n } else {\n this.expressionScope.recordAsyncArrowParametersError(\n startLoc,\n Errors.AwaitBindingIdentifier,\n );\n }\n } else if (word === \"arguments\") {\n if (this.scope.inClassAndNotInNonArrowFunction) {\n this.raise(startLoc, Errors.ArgumentsInClass);\n return;\n }\n }\n\n if (checkKeywords && isKeyword(word)) {\n this.raise(startLoc, Errors.UnexpectedKeyword, word);\n return;\n }\n\n const reservedTest = !this.state.strict\n ? isReservedWord\n : isBinding\n ? isStrictBindReservedWord\n : isStrictReservedWord;\n\n if (reservedTest(word, this.inModule)) {\n this.raise(startLoc, Errors.UnexpectedReservedWord, word);\n }\n }\n\n isAwaitAllowed(): boolean {\n if (this.prodParam.hasAwait) return true;\n if (this.options.allowAwaitOutsideFunction && !this.scope.inFunction) {\n return true;\n }\n return false;\n }\n\n // Parses await expression inside async function.\n\n parseAwait(startPos: number, startLoc: Position): N.AwaitExpression {\n const node = this.startNodeAt(startPos, startLoc);\n\n this.expressionScope.recordParameterInitializerError(\n node.start,\n Errors.AwaitExpressionFormalParameter,\n );\n\n if (this.eat(tt.star)) {\n this.raise(node.start, Errors.ObsoleteAwaitStar);\n }\n\n if (!this.scope.inFunction && !this.options.allowAwaitOutsideFunction) {\n if (this.isAmbiguousAwait()) {\n this.ambiguousScriptDifferentAst = true;\n } else {\n this.sawUnambiguousESM = true;\n }\n }\n\n if (!this.state.soloAwait) {\n node.argument = this.parseMaybeUnary(null, true);\n }\n\n return this.finishNode(node, \"AwaitExpression\");\n }\n\n isAmbiguousAwait(): boolean {\n return (\n this.hasPrecedingLineBreak() ||\n // All the following expressions are ambiguous:\n // await + 0, await - 0, await ( 0 ), await [ 0 ], await / 0 /u, await ``\n this.match(tt.plusMin) ||\n this.match(tt.parenL) ||\n this.match(tt.bracketL) ||\n this.match(tt.backQuote) ||\n // Sometimes the tokenizer generates tt.slash for regexps, and this is\n // handler by parseExprAtom\n this.match(tt.regexp) ||\n this.match(tt.slash) ||\n // This code could be parsed both as a modulo operator or as an intrinsic:\n // await %x(0)\n (this.hasPlugin(\"v8intrinsic\") && this.match(tt.modulo))\n );\n }\n\n // Parses yield expression inside generator.\n\n parseYield(): N.YieldExpression {\n const node = this.startNode();\n\n this.expressionScope.recordParameterInitializerError(\n node.start,\n Errors.YieldInParameter,\n );\n\n this.next();\n let delegating = false;\n let argument = null;\n if (!this.hasPrecedingLineBreak()) {\n delegating = this.eat(tt.star);\n switch (this.state.type) {\n case tt.semi:\n case tt.eof:\n case tt.braceR:\n case tt.parenR:\n case tt.bracketR:\n case tt.braceBarR:\n case tt.colon:\n case tt.comma:\n // The above is the complete set of tokens that can\n // follow an AssignmentExpression, and none of them\n // can start an AssignmentExpression\n if (!delegating) break;\n /* fallthrough */\n default:\n argument = this.parseMaybeAssign();\n }\n }\n node.delegate = delegating;\n node.argument = argument;\n return this.finishNode(node, \"YieldExpression\");\n }\n\n // Validates a pipeline (for any of the pipeline Babylon plugins) at the point\n // of the infix operator `|>`.\n\n checkPipelineAtInfixOperator(left: N.Expression, leftStartPos: number) {\n if (this.getPluginOption(\"pipelineOperator\", \"proposal\") === \"smart\") {\n if (left.type === \"SequenceExpression\") {\n // Ensure that the pipeline head is not a comma-delimited\n // sequence expression.\n this.raise(leftStartPos, Errors.PipelineHeadSequenceExpression);\n }\n }\n }\n\n parseSmartPipelineBody(\n childExpression: N.Expression,\n startPos: number,\n startLoc: Position,\n ): N.PipelineBody {\n this.checkSmartPipelineBodyEarlyErrors(childExpression, startPos);\n\n return this.parseSmartPipelineBodyInStyle(\n childExpression,\n startPos,\n startLoc,\n );\n }\n\n checkSmartPipelineBodyEarlyErrors(\n childExpression: N.Expression,\n startPos: number,\n ): void {\n if (this.match(tt.arrow)) {\n // If the following token is invalidly `=>`, then throw a human-friendly error\n // instead of something like 'Unexpected token, expected \";\"'.\n throw this.raise(this.state.start, Errors.PipelineBodyNoArrow);\n } else if (childExpression.type === \"SequenceExpression\") {\n this.raise(startPos, Errors.PipelineBodySequenceExpression);\n }\n }\n\n parseSmartPipelineBodyInStyle(\n childExpression: N.Expression,\n startPos: number,\n startLoc: Position,\n ): N.PipelineBody {\n const bodyNode = this.startNodeAt(startPos, startLoc);\n const isSimpleReference = this.isSimpleReference(childExpression);\n if (isSimpleReference) {\n bodyNode.callee = childExpression;\n } else {\n if (!this.topicReferenceWasUsedInCurrentTopicContext()) {\n this.raise(startPos, Errors.PipelineTopicUnused);\n }\n bodyNode.expression = childExpression;\n }\n return this.finishNode(\n bodyNode,\n isSimpleReference ? \"PipelineBareFunction\" : \"PipelineTopicExpression\",\n );\n }\n\n isSimpleReference(expression: N.Expression): boolean {\n switch (expression.type) {\n case \"MemberExpression\":\n return (\n !expression.computed && this.isSimpleReference(expression.object)\n );\n case \"Identifier\":\n return true;\n default:\n return false;\n }\n }\n\n // Enable topic references from outer contexts within smart pipeline bodies.\n // The function modifies the parser's topic-context state to enable or disable\n // the use of topic references with the smartPipelines plugin. They then run a\n // callback, then they reset the parser to the old topic-context state that it\n // had before the function was called.\n\n withTopicPermittingContext<T>(callback: () => T): T {\n const outerContextTopicState = this.state.topicContext;\n this.state.topicContext = {\n // Enable the use of the primary topic reference.\n maxNumOfResolvableTopics: 1,\n // Hide the use of any topic references from outer contexts.\n maxTopicIndex: null,\n };\n\n try {\n return callback();\n } finally {\n this.state.topicContext = outerContextTopicState;\n }\n }\n\n // Disable topic references from outer contexts within syntax constructs\n // such as the bodies of iteration statements.\n // The function modifies the parser's topic-context state to enable or disable\n // the use of topic references with the smartPipelines plugin. They then run a\n // callback, then they reset the parser to the old topic-context state that it\n // had before the function was called.\n\n withTopicForbiddingContext<T>(callback: () => T): T {\n const outerContextTopicState = this.state.topicContext;\n this.state.topicContext = {\n // Disable the use of the primary topic reference.\n maxNumOfResolvableTopics: 0,\n // Hide the use of any topic references from outer contexts.\n maxTopicIndex: null,\n };\n\n try {\n return callback();\n } finally {\n this.state.topicContext = outerContextTopicState;\n }\n }\n\n withSoloAwaitPermittingContext<T>(callback: () => T): T {\n const outerContextSoloAwaitState = this.state.soloAwait;\n this.state.soloAwait = true;\n\n try {\n return callback();\n } finally {\n this.state.soloAwait = outerContextSoloAwaitState;\n }\n }\n\n allowInAnd<T>(callback: () => T): T {\n const flags = this.prodParam.currentFlags();\n const prodParamToSet = PARAM_IN & ~flags;\n if (prodParamToSet) {\n this.prodParam.enter(flags | PARAM_IN);\n try {\n return callback();\n } finally {\n this.prodParam.exit();\n }\n }\n return callback();\n }\n\n disallowInAnd<T>(callback: () => T): T {\n const flags = this.prodParam.currentFlags();\n const prodParamToClear = PARAM_IN & flags;\n if (prodParamToClear) {\n this.prodParam.enter(flags & ~PARAM_IN);\n try {\n return callback();\n } finally {\n this.prodParam.exit();\n }\n }\n return callback();\n }\n\n // Register the use of a primary topic reference (`#`) within the current\n // topic context.\n registerTopicReference(): void {\n this.state.topicContext.maxTopicIndex = 0;\n }\n\n primaryTopicReferenceIsAllowedInCurrentTopicContext(): boolean {\n return this.state.topicContext.maxNumOfResolvableTopics >= 1;\n }\n\n topicReferenceWasUsedInCurrentTopicContext(): boolean {\n return (\n this.state.topicContext.maxTopicIndex != null &&\n this.state.topicContext.maxTopicIndex >= 0\n );\n }\n\n parseFSharpPipelineBody(prec: number): N.Expression {\n const startPos = this.state.start;\n const startLoc = this.state.startLoc;\n\n this.state.potentialArrowAt = this.state.start;\n const oldInFSharpPipelineDirectBody = this.state.inFSharpPipelineDirectBody;\n this.state.inFSharpPipelineDirectBody = true;\n\n const ret = this.parseExprOp(\n this.parseMaybeUnary(),\n startPos,\n startLoc,\n prec,\n );\n\n this.state.inFSharpPipelineDirectBody = oldInFSharpPipelineDirectBody;\n\n return ret;\n }\n\n // https://github.com/tc39/proposal-js-module-blocks\n parseModuleExpression(): N.ModuleExpression {\n this.expectPlugin(\"moduleBlocks\");\n const node = this.startNode<N.ModuleExpression>();\n this.next(); // eat \"module\"\n this.eat(tt.braceL);\n\n const revertScopes = this.initializeScopes(/** inModule */ true);\n this.enterInitialScopes();\n\n const program = this.startNode<N.Program>();\n try {\n node.body = this.parseProgram(program, tt.braceR, \"module\");\n } finally {\n revertScopes();\n }\n this.eat(tt.braceR);\n return this.finishNode<N.ModuleExpression>(node, \"ModuleExpression\");\n }\n}\n","// @flow\n\nimport * as N from \"../types\";\nimport { types as tt, type TokenType } from \"../tokenizer/types\";\nimport ExpressionParser from \"./expression\";\nimport { Errors, SourceTypeModuleErrors } from \"./error\";\nimport { isIdentifierChar, isIdentifierStart } from \"../util/identifier\";\nimport { lineBreak } from \"../util/whitespace\";\nimport * as charCodes from \"charcodes\";\nimport {\n BIND_CLASS,\n BIND_LEXICAL,\n BIND_VAR,\n BIND_FUNCTION,\n SCOPE_CLASS,\n SCOPE_FUNCTION,\n SCOPE_OTHER,\n SCOPE_SIMPLE_CATCH,\n SCOPE_STATIC_BLOCK,\n SCOPE_SUPER,\n CLASS_ELEMENT_OTHER,\n CLASS_ELEMENT_INSTANCE_GETTER,\n CLASS_ELEMENT_INSTANCE_SETTER,\n CLASS_ELEMENT_STATIC_GETTER,\n CLASS_ELEMENT_STATIC_SETTER,\n type BindingTypes,\n} from \"../util/scopeflags\";\nimport { ExpressionErrors } from \"./util\";\nimport { PARAM, functionFlags } from \"../util/production-parameter\";\nimport {\n newExpressionScope,\n newParameterDeclarationScope,\n} from \"../util/expression-scope\";\nimport type { SourceType } from \"../options\";\nimport { Token } from \"../tokenizer\";\nimport { Position } from \"../util/location\";\n\nconst loopLabel = { kind: \"loop\" },\n switchLabel = { kind: \"switch\" };\n\nconst FUNC_NO_FLAGS = 0b000,\n FUNC_STATEMENT = 0b001,\n FUNC_HANGING_STATEMENT = 0b010,\n FUNC_NULLABLE_ID = 0b100;\n\nconst loneSurrogate = /[\\uD800-\\uDFFF]/u;\n\nconst keywordRelationalOperator = /in(?:stanceof)?/y;\n\n/**\n * Convert tt.privateName to tt.hash + tt.name for backward Babel 7 compat.\n * For performance reasons this routine mutates `tokens`, it is okay\n * here since we execute `parseTopLevel` once for every file.\n * @param {*} tokens\n * @returns\n */\nfunction babel7CompatTokens(tokens) {\n if (!process.env.BABEL_8_BREAKING) {\n for (let i = 0; i < tokens.length; i++) {\n const token = tokens[i];\n if (token.type === tt.privateName) {\n const { loc, start, value, end } = token;\n const hashEndPos = start + 1;\n const hashEndLoc = new Position(loc.start.line, loc.start.column + 1);\n tokens.splice(\n i,\n 1,\n // $FlowIgnore: hacky way to create token\n new Token({\n type: tt.hash,\n value: \"#\",\n start: start,\n end: hashEndPos,\n startLoc: loc.start,\n endLoc: hashEndLoc,\n }),\n // $FlowIgnore: hacky way to create token\n new Token({\n type: tt.name,\n value: value,\n start: hashEndPos,\n end: end,\n startLoc: hashEndLoc,\n endLoc: loc.end,\n }),\n );\n }\n }\n }\n return tokens;\n}\nexport default class StatementParser extends ExpressionParser {\n // ### Statement parsing\n\n // Parse a program. Initializes the parser, reads any number of\n // statements, and wraps them in a Program node. Optionally takes a\n // `program` argument. If present, the statements will be appended\n // to its body instead of creating a new node.\n\n parseTopLevel(file: N.File, program: N.Program): N.File {\n file.program = this.parseProgram(program);\n file.comments = this.state.comments;\n\n if (this.options.tokens) file.tokens = babel7CompatTokens(this.tokens);\n\n return this.finishNode(file, \"File\");\n }\n\n parseProgram(\n program: N.Program,\n end: TokenType = tt.eof,\n sourceType: SourceType = this.options.sourceType,\n ): N.Program {\n program.sourceType = sourceType;\n program.interpreter = this.parseInterpreterDirective();\n this.parseBlockBody(program, true, true, end);\n if (\n this.inModule &&\n !this.options.allowUndeclaredExports &&\n this.scope.undefinedExports.size > 0\n ) {\n for (const [name] of Array.from(this.scope.undefinedExports)) {\n const pos = this.scope.undefinedExports.get(name);\n // $FlowIssue\n this.raise(pos, Errors.ModuleExportUndefined, name);\n }\n }\n return this.finishNode<N.Program>(program, \"Program\");\n }\n\n // TODO\n\n stmtToDirective(stmt: N.Statement): N.Directive {\n const expr = stmt.expression;\n\n const directiveLiteral = this.startNodeAt(expr.start, expr.loc.start);\n const directive = this.startNodeAt(stmt.start, stmt.loc.start);\n\n const raw = this.input.slice(expr.start, expr.end);\n const val = (directiveLiteral.value = raw.slice(1, -1)); // remove quotes\n\n this.addExtra(directiveLiteral, \"raw\", raw);\n this.addExtra(directiveLiteral, \"rawValue\", val);\n\n directive.value = this.finishNodeAt(\n directiveLiteral,\n \"DirectiveLiteral\",\n expr.end,\n expr.loc.end,\n );\n\n return this.finishNodeAt(directive, \"Directive\", stmt.end, stmt.loc.end);\n }\n\n parseInterpreterDirective(): N.InterpreterDirective | null {\n if (!this.match(tt.interpreterDirective)) {\n return null;\n }\n\n const node = this.startNode();\n node.value = this.state.value;\n this.next();\n return this.finishNode(node, \"InterpreterDirective\");\n }\n\n isLet(context: ?string): boolean {\n if (!this.isContextual(\"let\")) {\n return false;\n }\n return this.isLetKeyword(context);\n }\n\n /**\n * Assuming we have seen a contextual `let`, check if it starts a variable declaration\n so that `left` should be interpreted as a `let` keyword.\n *\n * @param {?string} context When `context` is non nullish, it will return early and _skip_ checking\n if the next token after `let` is `{` or a keyword relational operator\n * @returns {boolean}\n * @memberof StatementParser\n */\n isLetKeyword(context: ?string): boolean {\n const next = this.nextTokenStart();\n const nextCh = this.codePointAtPos(next);\n // For ambiguous cases, determine if a LexicalDeclaration (or only a\n // Statement) is allowed here. If context is not empty then only a Statement\n // is allowed. However, `let [` is an explicit negative lookahead for\n // ExpressionStatement, so special-case it first.\n // Also, `let \\` is never valid as an expression so this must be a keyword.\n if (\n nextCh === charCodes.backslash ||\n nextCh === charCodes.leftSquareBracket\n ) {\n return true;\n }\n if (context) return false;\n\n if (nextCh === charCodes.leftCurlyBrace) return true;\n\n if (isIdentifierStart(nextCh)) {\n keywordRelationalOperator.lastIndex = next;\n const matched = keywordRelationalOperator.exec(this.input);\n if (matched !== null) {\n // We have seen `in` or `instanceof` so far, now check if the identfier\n // ends here\n const endCh = this.codePointAtPos(next + matched[0].length);\n if (!isIdentifierChar(endCh) && endCh !== charCodes.backslash) {\n return false;\n }\n }\n return true;\n }\n return false;\n }\n\n // Parse a single statement.\n //\n // If expecting a statement and finding a slash operator, parse a\n // regular expression literal. This is to handle cases like\n // `if (foo) /blah/.exec(foo)`, where looking at the previous token\n // does not help.\n // https://tc39.es/ecma262/#prod-Statement\n // ImportDeclaration and ExportDeclaration are also handled here so we can throw recoverable errors\n // when they are not at the top level\n parseStatement(context: ?string, topLevel?: boolean): N.Statement {\n if (this.match(tt.at)) {\n this.parseDecorators(true);\n }\n return this.parseStatementContent(context, topLevel);\n }\n\n parseStatementContent(context: ?string, topLevel: ?boolean): N.Statement {\n let starttype = this.state.type;\n const node = this.startNode();\n let kind;\n\n if (this.isLet(context)) {\n starttype = tt._var;\n kind = \"let\";\n }\n\n // Most types of statements are recognized by the keyword they\n // start with. Many are trivial to parse, some require a bit of\n // complexity.\n\n switch (starttype) {\n case tt._break:\n case tt._continue:\n // $FlowFixMe\n return this.parseBreakContinueStatement(node, starttype.keyword);\n case tt._debugger:\n return this.parseDebuggerStatement(node);\n case tt._do:\n return this.parseDoStatement(node);\n case tt._for:\n return this.parseForStatement(node);\n case tt._function:\n if (this.lookaheadCharCode() === charCodes.dot) break;\n if (context) {\n if (this.state.strict) {\n this.raise(this.state.start, Errors.StrictFunction);\n } else if (context !== \"if\" && context !== \"label\") {\n this.raise(this.state.start, Errors.SloppyFunction);\n }\n }\n return this.parseFunctionStatement(node, false, !context);\n\n case tt._class:\n if (context) this.unexpected();\n return this.parseClass(node, true);\n\n case tt._if:\n return this.parseIfStatement(node);\n case tt._return:\n return this.parseReturnStatement(node);\n case tt._switch:\n return this.parseSwitchStatement(node);\n case tt._throw:\n return this.parseThrowStatement(node);\n case tt._try:\n return this.parseTryStatement(node);\n\n case tt._const:\n case tt._var:\n kind = kind || this.state.value;\n if (context && kind !== \"var\") {\n this.raise(this.state.start, Errors.UnexpectedLexicalDeclaration);\n }\n return this.parseVarStatement(node, kind);\n\n case tt._while:\n return this.parseWhileStatement(node);\n case tt._with:\n return this.parseWithStatement(node);\n case tt.braceL:\n return this.parseBlock();\n case tt.semi:\n return this.parseEmptyStatement(node);\n case tt._import: {\n const nextTokenCharCode = this.lookaheadCharCode();\n if (\n nextTokenCharCode === charCodes.leftParenthesis || // import()\n nextTokenCharCode === charCodes.dot // import.meta\n ) {\n break;\n }\n }\n // fall through\n case tt._export: {\n if (!this.options.allowImportExportEverywhere && !topLevel) {\n this.raise(this.state.start, Errors.UnexpectedImportExport);\n }\n\n this.next(); // eat `import`/`export`\n\n let result;\n if (starttype === tt._import) {\n result = this.parseImport(node);\n\n if (\n result.type === \"ImportDeclaration\" &&\n (!result.importKind || result.importKind === \"value\")\n ) {\n this.sawUnambiguousESM = true;\n }\n } else {\n result = this.parseExport(node);\n\n if (\n (result.type === \"ExportNamedDeclaration\" &&\n (!result.exportKind || result.exportKind === \"value\")) ||\n (result.type === \"ExportAllDeclaration\" &&\n (!result.exportKind || result.exportKind === \"value\")) ||\n result.type === \"ExportDefaultDeclaration\"\n ) {\n this.sawUnambiguousESM = true;\n }\n }\n\n this.assertModuleNodeAllowed(node);\n\n return result;\n }\n\n default: {\n if (this.isAsyncFunction()) {\n if (context) {\n this.raise(\n this.state.start,\n Errors.AsyncFunctionInSingleStatementContext,\n );\n }\n this.next();\n return this.parseFunctionStatement(node, true, !context);\n }\n }\n }\n\n // If the statement does not start with a statement keyword or a\n // brace, it's an ExpressionStatement or LabeledStatement. We\n // simply start parsing an expression, and afterwards, if the\n // next token is a colon and the expression was a simple\n // Identifier node, we switch to interpreting it as a label.\n const maybeName = this.state.value;\n const expr = this.parseExpression();\n\n if (\n starttype === tt.name &&\n expr.type === \"Identifier\" &&\n this.eat(tt.colon)\n ) {\n return this.parseLabeledStatement(node, maybeName, expr, context);\n } else {\n return this.parseExpressionStatement(node, expr);\n }\n }\n\n assertModuleNodeAllowed(node: N.Node): void {\n if (!this.options.allowImportExportEverywhere && !this.inModule) {\n this.raise(node.start, SourceTypeModuleErrors.ImportOutsideModule);\n }\n }\n\n takeDecorators(node: N.HasDecorators): void {\n const decorators =\n this.state.decoratorStack[this.state.decoratorStack.length - 1];\n if (decorators.length) {\n node.decorators = decorators;\n this.resetStartLocationFromNode(node, decorators[0]);\n this.state.decoratorStack[this.state.decoratorStack.length - 1] = [];\n }\n }\n\n canHaveLeadingDecorator(): boolean {\n return this.match(tt._class);\n }\n\n parseDecorators(allowExport?: boolean): void {\n const currentContextDecorators =\n this.state.decoratorStack[this.state.decoratorStack.length - 1];\n while (this.match(tt.at)) {\n const decorator = this.parseDecorator();\n currentContextDecorators.push(decorator);\n }\n\n if (this.match(tt._export)) {\n if (!allowExport) {\n this.unexpected();\n }\n\n if (\n this.hasPlugin(\"decorators\") &&\n !this.getPluginOption(\"decorators\", \"decoratorsBeforeExport\")\n ) {\n this.raise(this.state.start, Errors.DecoratorExportClass);\n }\n } else if (!this.canHaveLeadingDecorator()) {\n throw this.raise(this.state.start, Errors.UnexpectedLeadingDecorator);\n }\n }\n\n parseDecorator(): N.Decorator {\n this.expectOnePlugin([\"decorators-legacy\", \"decorators\"]);\n\n const node = this.startNode();\n this.next();\n\n if (this.hasPlugin(\"decorators\")) {\n // Every time a decorator class expression is evaluated, a new empty array is pushed onto the stack\n // So that the decorators of any nested class expressions will be dealt with separately\n this.state.decoratorStack.push([]);\n\n const startPos = this.state.start;\n const startLoc = this.state.startLoc;\n let expr: N.Expression;\n\n if (this.eat(tt.parenL)) {\n expr = this.parseExpression();\n this.expect(tt.parenR);\n } else {\n expr = this.parseIdentifier(false);\n\n while (this.eat(tt.dot)) {\n const node = this.startNodeAt(startPos, startLoc);\n node.object = expr;\n node.property = this.parseIdentifier(true);\n node.computed = false;\n expr = this.finishNode(node, \"MemberExpression\");\n }\n }\n\n node.expression = this.parseMaybeDecoratorArguments(expr);\n this.state.decoratorStack.pop();\n } else {\n node.expression = this.parseExprSubscripts();\n }\n return this.finishNode(node, \"Decorator\");\n }\n\n parseMaybeDecoratorArguments(expr: N.Expression): N.Expression {\n if (this.eat(tt.parenL)) {\n const node = this.startNodeAtNode(expr);\n node.callee = expr;\n node.arguments = this.parseCallExpressionArguments(tt.parenR, false);\n this.toReferencedList(node.arguments);\n return this.finishNode(node, \"CallExpression\");\n }\n\n return expr;\n }\n\n parseBreakContinueStatement(\n node: N.BreakStatement | N.ContinueStatement,\n keyword: string,\n ): N.BreakStatement | N.ContinueStatement {\n const isBreak = keyword === \"break\";\n this.next();\n\n if (this.isLineTerminator()) {\n node.label = null;\n } else {\n node.label = this.parseIdentifier();\n this.semicolon();\n }\n\n this.verifyBreakContinue(node, keyword);\n\n return this.finishNode(\n node,\n isBreak ? \"BreakStatement\" : \"ContinueStatement\",\n );\n }\n\n verifyBreakContinue(\n node: N.BreakStatement | N.ContinueStatement,\n keyword: string,\n ) {\n const isBreak = keyword === \"break\";\n let i;\n for (i = 0; i < this.state.labels.length; ++i) {\n const lab = this.state.labels[i];\n if (node.label == null || lab.name === node.label.name) {\n if (lab.kind != null && (isBreak || lab.kind === \"loop\")) break;\n if (node.label && isBreak) break;\n }\n }\n if (i === this.state.labels.length) {\n this.raise(node.start, Errors.IllegalBreakContinue, keyword);\n }\n }\n\n parseDebuggerStatement(node: N.DebuggerStatement): N.DebuggerStatement {\n this.next();\n this.semicolon();\n return this.finishNode(node, \"DebuggerStatement\");\n }\n\n parseHeaderExpression(): N.Expression {\n this.expect(tt.parenL);\n const val = this.parseExpression();\n this.expect(tt.parenR);\n return val;\n }\n\n parseDoStatement(node: N.DoWhileStatement): N.DoWhileStatement {\n this.next();\n this.state.labels.push(loopLabel);\n\n node.body =\n // For the smartPipelines plugin: Disable topic references from outer\n // contexts within the loop body. They are permitted in test expressions,\n // outside of the loop body.\n this.withTopicForbiddingContext(() =>\n // Parse the loop body's body.\n this.parseStatement(\"do\"),\n );\n\n this.state.labels.pop();\n\n this.expect(tt._while);\n node.test = this.parseHeaderExpression();\n this.eat(tt.semi);\n return this.finishNode(node, \"DoWhileStatement\");\n }\n\n // Disambiguating between a `for` and a `for`/`in` or `for`/`of`\n // loop is non-trivial. Basically, we have to parse the init `var`\n // statement or expression, disallowing the `in` operator (see\n // the second parameter to `parseExpression`), and then check\n // whether the next token is `in` or `of`. When there is no init\n // part (semicolon immediately after the opening parenthesis), it\n // is a regular `for` loop.\n\n parseForStatement(node: N.Node): N.ForLike {\n this.next();\n this.state.labels.push(loopLabel);\n\n let awaitAt = -1;\n if (this.isAwaitAllowed() && this.eatContextual(\"await\")) {\n awaitAt = this.state.lastTokStart;\n }\n this.scope.enter(SCOPE_OTHER);\n this.expect(tt.parenL);\n\n if (this.match(tt.semi)) {\n if (awaitAt > -1) {\n this.unexpected(awaitAt);\n }\n return this.parseFor(node, null);\n }\n\n const startsWithLet = this.isContextual(\"let\");\n const isLet = startsWithLet && this.isLetKeyword();\n if (this.match(tt._var) || this.match(tt._const) || isLet) {\n const init = this.startNode();\n const kind = isLet ? \"let\" : this.state.value;\n this.next();\n this.parseVar(init, true, kind);\n this.finishNode(init, \"VariableDeclaration\");\n\n if (\n (this.match(tt._in) || this.isContextual(\"of\")) &&\n init.declarations.length === 1\n ) {\n return this.parseForIn(node, init, awaitAt);\n }\n if (awaitAt > -1) {\n this.unexpected(awaitAt);\n }\n return this.parseFor(node, init);\n }\n\n // Check whether the first token is possibly a contextual keyword, so that\n // we can forbid `for (async of` if this turns out to be a for-of loop.\n const startsWithUnescapedName =\n this.match(tt.name) && !this.state.containsEsc;\n\n const refExpressionErrors = new ExpressionErrors();\n const init = this.parseExpression(true, refExpressionErrors);\n const isForOf = this.isContextual(\"of\");\n if (isForOf) {\n // Check for leading tokens that are forbidden in for-of loops:\n if (startsWithLet) {\n this.raise(init.start, Errors.ForOfLet);\n } else if (\n // `for await (async of []);` is allowed.\n awaitAt === -1 &&\n startsWithUnescapedName &&\n init.type === \"Identifier\" &&\n init.name === \"async\"\n ) {\n // This catches the case where the `async` in `for (async of` was\n // parsed as an identifier. If it was parsed as the start of an async\n // arrow function (e.g. `for (async of => {} of []);`), the LVal check\n // further down will raise a more appropriate error.\n this.raise(init.start, Errors.ForOfAsync);\n }\n }\n if (isForOf || this.match(tt._in)) {\n this.toAssignable(init, /* isLHS */ true);\n const description = isForOf ? \"for-of statement\" : \"for-in statement\";\n this.checkLVal(init, description);\n return this.parseForIn(node, init, awaitAt);\n } else {\n this.checkExpressionErrors(refExpressionErrors, true);\n }\n if (awaitAt > -1) {\n this.unexpected(awaitAt);\n }\n return this.parseFor(node, init);\n }\n\n parseFunctionStatement(\n node: N.FunctionDeclaration,\n isAsync?: boolean,\n declarationPosition?: boolean,\n ): N.FunctionDeclaration {\n this.next();\n return this.parseFunction(\n node,\n FUNC_STATEMENT | (declarationPosition ? 0 : FUNC_HANGING_STATEMENT),\n isAsync,\n );\n }\n\n parseIfStatement(node: N.IfStatement): N.IfStatement {\n this.next();\n node.test = this.parseHeaderExpression();\n node.consequent = this.parseStatement(\"if\");\n node.alternate = this.eat(tt._else) ? this.parseStatement(\"if\") : null;\n return this.finishNode(node, \"IfStatement\");\n }\n\n parseReturnStatement(node: N.ReturnStatement): N.ReturnStatement {\n if (!this.prodParam.hasReturn && !this.options.allowReturnOutsideFunction) {\n this.raise(this.state.start, Errors.IllegalReturn);\n }\n\n this.next();\n\n // In `return` (and `break`/`continue`), the keywords with\n // optional arguments, we eagerly look for a semicolon or the\n // possibility to insert one.\n\n if (this.isLineTerminator()) {\n node.argument = null;\n } else {\n node.argument = this.parseExpression();\n this.semicolon();\n }\n\n return this.finishNode(node, \"ReturnStatement\");\n }\n\n parseSwitchStatement(node: N.SwitchStatement): N.SwitchStatement {\n this.next();\n node.discriminant = this.parseHeaderExpression();\n const cases = (node.cases = []);\n this.expect(tt.braceL);\n this.state.labels.push(switchLabel);\n this.scope.enter(SCOPE_OTHER);\n\n // Statements under must be grouped (by label) in SwitchCase\n // nodes. `cur` is used to keep the node that we are currently\n // adding statements to.\n\n let cur;\n for (let sawDefault; !this.match(tt.braceR); ) {\n if (this.match(tt._case) || this.match(tt._default)) {\n const isCase = this.match(tt._case);\n if (cur) this.finishNode(cur, \"SwitchCase\");\n cases.push((cur = this.startNode()));\n cur.consequent = [];\n this.next();\n if (isCase) {\n cur.test = this.parseExpression();\n } else {\n if (sawDefault) {\n this.raise(\n this.state.lastTokStart,\n Errors.MultipleDefaultsInSwitch,\n );\n }\n sawDefault = true;\n cur.test = null;\n }\n this.expect(tt.colon);\n } else {\n if (cur) {\n cur.consequent.push(this.parseStatement(null));\n } else {\n this.unexpected();\n }\n }\n }\n this.scope.exit();\n if (cur) this.finishNode(cur, \"SwitchCase\");\n this.next(); // Closing brace\n this.state.labels.pop();\n return this.finishNode(node, \"SwitchStatement\");\n }\n\n parseThrowStatement(node: N.ThrowStatement): N.ThrowStatement {\n this.next();\n if (this.hasPrecedingLineBreak()) {\n this.raise(this.state.lastTokEnd, Errors.NewlineAfterThrow);\n }\n node.argument = this.parseExpression();\n this.semicolon();\n return this.finishNode(node, \"ThrowStatement\");\n }\n\n parseCatchClauseParam(): N.Pattern {\n const param = this.parseBindingAtom();\n\n const simple = param.type === \"Identifier\";\n this.scope.enter(simple ? SCOPE_SIMPLE_CATCH : 0);\n this.checkLVal(param, \"catch clause\", BIND_LEXICAL);\n\n return param;\n }\n\n parseTryStatement(node: N.TryStatement): N.TryStatement {\n this.next();\n\n node.block = this.parseBlock();\n node.handler = null;\n\n if (this.match(tt._catch)) {\n const clause = this.startNode();\n this.next();\n if (this.match(tt.parenL)) {\n this.expect(tt.parenL);\n clause.param = this.parseCatchClauseParam();\n this.expect(tt.parenR);\n } else {\n clause.param = null;\n this.scope.enter(SCOPE_OTHER);\n }\n\n clause.body =\n // For the smartPipelines plugin: Disable topic references from outer\n // contexts within the catch clause's body.\n this.withTopicForbiddingContext(() =>\n // Parse the catch clause's body.\n this.parseBlock(false, false),\n );\n this.scope.exit();\n\n node.handler = this.finishNode(clause, \"CatchClause\");\n }\n\n node.finalizer = this.eat(tt._finally) ? this.parseBlock() : null;\n\n if (!node.handler && !node.finalizer) {\n this.raise(node.start, Errors.NoCatchOrFinally);\n }\n\n return this.finishNode(node, \"TryStatement\");\n }\n\n parseVarStatement(\n node: N.VariableDeclaration,\n kind: \"var\" | \"let\" | \"const\",\n ): N.VariableDeclaration {\n this.next();\n this.parseVar(node, false, kind);\n this.semicolon();\n return this.finishNode(node, \"VariableDeclaration\");\n }\n\n parseWhileStatement(node: N.WhileStatement): N.WhileStatement {\n this.next();\n node.test = this.parseHeaderExpression();\n this.state.labels.push(loopLabel);\n\n node.body =\n // For the smartPipelines plugin:\n // Disable topic references from outer contexts within the loop body.\n // They are permitted in test expressions, outside of the loop body.\n this.withTopicForbiddingContext(() =>\n // Parse loop body.\n this.parseStatement(\"while\"),\n );\n\n this.state.labels.pop();\n\n return this.finishNode(node, \"WhileStatement\");\n }\n\n parseWithStatement(node: N.WithStatement): N.WithStatement {\n if (this.state.strict) {\n this.raise(this.state.start, Errors.StrictWith);\n }\n this.next();\n node.object = this.parseHeaderExpression();\n\n node.body =\n // For the smartPipelines plugin:\n // Disable topic references from outer contexts within the with statement's body.\n // They are permitted in function default-parameter expressions, which are\n // part of the outer context, outside of the with statement's body.\n this.withTopicForbiddingContext(() =>\n // Parse the statement body.\n this.parseStatement(\"with\"),\n );\n\n return this.finishNode(node, \"WithStatement\");\n }\n\n parseEmptyStatement(node: N.EmptyStatement): N.EmptyStatement {\n this.next();\n return this.finishNode(node, \"EmptyStatement\");\n }\n\n parseLabeledStatement(\n node: N.LabeledStatement,\n maybeName: string,\n expr: N.Identifier,\n context: ?string,\n ): N.LabeledStatement {\n for (const label of this.state.labels) {\n if (label.name === maybeName) {\n this.raise(expr.start, Errors.LabelRedeclaration, maybeName);\n }\n }\n\n const kind = this.state.type.isLoop\n ? \"loop\"\n : this.match(tt._switch)\n ? \"switch\"\n : null;\n for (let i = this.state.labels.length - 1; i >= 0; i--) {\n const label = this.state.labels[i];\n if (label.statementStart === node.start) {\n label.statementStart = this.state.start;\n label.kind = kind;\n } else {\n break;\n }\n }\n\n this.state.labels.push({\n name: maybeName,\n kind: kind,\n statementStart: this.state.start,\n });\n node.body = this.parseStatement(\n context\n ? context.indexOf(\"label\") === -1\n ? context + \"label\"\n : context\n : \"label\",\n );\n\n this.state.labels.pop();\n node.label = expr;\n return this.finishNode(node, \"LabeledStatement\");\n }\n\n parseExpressionStatement(\n node: N.ExpressionStatement,\n expr: N.Expression,\n ): N.Statement {\n node.expression = expr;\n this.semicolon();\n return this.finishNode(node, \"ExpressionStatement\");\n }\n\n // Parse a semicolon-enclosed block of statements, handling `\"use\n // strict\"` declarations when `allowDirectives` is true (used for\n // function bodies).\n\n parseBlock(\n allowDirectives?: boolean = false,\n createNewLexicalScope?: boolean = true,\n afterBlockParse?: (hasStrictModeDirective: boolean) => void,\n ): N.BlockStatement {\n const node = this.startNode();\n if (allowDirectives) {\n this.state.strictErrors.clear();\n }\n this.expect(tt.braceL);\n if (createNewLexicalScope) {\n this.scope.enter(SCOPE_OTHER);\n }\n this.parseBlockBody(\n node,\n allowDirectives,\n false,\n tt.braceR,\n afterBlockParse,\n );\n if (createNewLexicalScope) {\n this.scope.exit();\n }\n return this.finishNode(node, \"BlockStatement\");\n }\n\n isValidDirective(stmt: N.Statement): boolean {\n return (\n stmt.type === \"ExpressionStatement\" &&\n stmt.expression.type === \"StringLiteral\" &&\n !stmt.expression.extra.parenthesized\n );\n }\n\n parseBlockBody(\n node: N.BlockStatementLike,\n allowDirectives: ?boolean,\n topLevel: boolean,\n end: TokenType,\n afterBlockParse?: (hasStrictModeDirective: boolean) => void,\n ): void {\n const body = (node.body = []);\n const directives = (node.directives = []);\n this.parseBlockOrModuleBlockBody(\n body,\n allowDirectives ? directives : undefined,\n topLevel,\n end,\n afterBlockParse,\n );\n }\n\n // Undefined directives means that directives are not allowed.\n // https://tc39.es/ecma262/#prod-Block\n // https://tc39.es/ecma262/#prod-ModuleBody\n parseBlockOrModuleBlockBody(\n body: N.Statement[],\n directives: ?(N.Directive[]),\n topLevel: boolean,\n end: TokenType,\n afterBlockParse?: (hasStrictModeDirective: boolean) => void,\n ): void {\n const oldStrict = this.state.strict;\n let hasStrictModeDirective = false;\n let parsedNonDirective = false;\n\n while (!this.match(end)) {\n const stmt = this.parseStatement(null, topLevel);\n\n if (directives && !parsedNonDirective) {\n if (this.isValidDirective(stmt)) {\n const directive = this.stmtToDirective(stmt);\n directives.push(directive);\n\n if (\n !hasStrictModeDirective &&\n directive.value.value === \"use strict\"\n ) {\n hasStrictModeDirective = true;\n this.setStrict(true);\n }\n\n continue;\n }\n parsedNonDirective = true;\n // clear strict errors since the strict mode will not change within the block\n this.state.strictErrors.clear();\n }\n body.push(stmt);\n }\n\n if (afterBlockParse) {\n afterBlockParse.call(this, hasStrictModeDirective);\n }\n\n if (!oldStrict) {\n this.setStrict(false);\n }\n\n this.next();\n }\n\n // Parse a regular `for` loop. The disambiguation code in\n // `parseStatement` will already have parsed the init statement or\n // expression.\n\n parseFor(\n node: N.ForStatement,\n init: ?(N.VariableDeclaration | N.Expression),\n ): N.ForStatement {\n node.init = init;\n this.semicolon(/* allowAsi */ false);\n node.test = this.match(tt.semi) ? null : this.parseExpression();\n this.semicolon(/* allowAsi */ false);\n node.update = this.match(tt.parenR) ? null : this.parseExpression();\n this.expect(tt.parenR);\n\n node.body =\n // For the smartPipelines plugin: Disable topic references from outer\n // contexts within the loop body. They are permitted in test expressions,\n // outside of the loop body.\n this.withTopicForbiddingContext(() =>\n // Parse the loop body.\n this.parseStatement(\"for\"),\n );\n\n this.scope.exit();\n this.state.labels.pop();\n\n return this.finishNode(node, \"ForStatement\");\n }\n\n // Parse a `for`/`in` and `for`/`of` loop, which are almost\n // same from parser's perspective.\n\n parseForIn(\n node: N.ForInOf,\n init: N.VariableDeclaration | N.AssignmentPattern,\n awaitAt: number,\n ): N.ForInOf {\n const isForIn = this.match(tt._in);\n this.next();\n\n if (isForIn) {\n if (awaitAt > -1) this.unexpected(awaitAt);\n } else {\n node.await = awaitAt > -1;\n }\n\n if (\n init.type === \"VariableDeclaration\" &&\n init.declarations[0].init != null &&\n (!isForIn ||\n this.state.strict ||\n init.kind !== \"var\" ||\n init.declarations[0].id.type !== \"Identifier\")\n ) {\n this.raise(\n init.start,\n Errors.ForInOfLoopInitializer,\n isForIn ? \"for-in\" : \"for-of\",\n );\n } else if (init.type === \"AssignmentPattern\") {\n this.raise(init.start, Errors.InvalidLhs, \"for-loop\");\n }\n\n node.left = init;\n node.right = isForIn\n ? this.parseExpression()\n : this.parseMaybeAssignAllowIn();\n this.expect(tt.parenR);\n\n node.body =\n // For the smartPipelines plugin:\n // Disable topic references from outer contexts within the loop body.\n // They are permitted in test expressions, outside of the loop body.\n this.withTopicForbiddingContext(() =>\n // Parse loop body.\n this.parseStatement(\"for\"),\n );\n\n this.scope.exit();\n this.state.labels.pop();\n\n return this.finishNode(node, isForIn ? \"ForInStatement\" : \"ForOfStatement\");\n }\n\n // Parse a list of variable declarations.\n\n parseVar(\n node: N.VariableDeclaration,\n isFor: boolean,\n kind: \"var\" | \"let\" | \"const\",\n ): N.VariableDeclaration {\n const declarations = (node.declarations = []);\n const isTypescript = this.hasPlugin(\"typescript\");\n node.kind = kind;\n for (;;) {\n const decl = this.startNode();\n this.parseVarId(decl, kind);\n if (this.eat(tt.eq)) {\n decl.init = isFor\n ? this.parseMaybeAssignDisallowIn()\n : this.parseMaybeAssignAllowIn();\n } else {\n if (\n kind === \"const\" &&\n !(this.match(tt._in) || this.isContextual(\"of\"))\n ) {\n // `const` with no initializer is allowed in TypeScript.\n // It could be a declaration like `const x: number;`.\n if (!isTypescript) {\n this.raise(\n this.state.lastTokEnd,\n Errors.DeclarationMissingInitializer,\n \"Const declarations\",\n );\n }\n } else if (\n decl.id.type !== \"Identifier\" &&\n !(isFor && (this.match(tt._in) || this.isContextual(\"of\")))\n ) {\n this.raise(\n this.state.lastTokEnd,\n Errors.DeclarationMissingInitializer,\n \"Complex binding patterns\",\n );\n }\n decl.init = null;\n }\n declarations.push(this.finishNode(decl, \"VariableDeclarator\"));\n if (!this.eat(tt.comma)) break;\n }\n return node;\n }\n\n parseVarId(decl: N.VariableDeclarator, kind: \"var\" | \"let\" | \"const\"): void {\n decl.id = this.parseBindingAtom();\n this.checkLVal(\n decl.id,\n \"variable declaration\",\n kind === \"var\" ? BIND_VAR : BIND_LEXICAL,\n undefined,\n kind !== \"var\",\n );\n }\n\n // Parse a function declaration or literal (depending on the\n // `isStatement` parameter).\n\n parseFunction<T: N.NormalFunction>(\n node: T,\n statement?: number = FUNC_NO_FLAGS,\n isAsync?: boolean = false,\n ): T {\n const isStatement = statement & FUNC_STATEMENT;\n const isHangingStatement = statement & FUNC_HANGING_STATEMENT;\n const requireId = !!isStatement && !(statement & FUNC_NULLABLE_ID);\n\n this.initFunction(node, isAsync);\n\n if (this.match(tt.star) && isHangingStatement) {\n this.raise(this.state.start, Errors.GeneratorInSingleStatementContext);\n }\n node.generator = this.eat(tt.star);\n\n if (isStatement) {\n node.id = this.parseFunctionId(requireId);\n }\n\n const oldMaybeInArrowParameters = this.state.maybeInArrowParameters;\n this.state.maybeInArrowParameters = false;\n this.scope.enter(SCOPE_FUNCTION);\n this.prodParam.enter(functionFlags(isAsync, node.generator));\n\n if (!isStatement) {\n node.id = this.parseFunctionId();\n }\n\n this.parseFunctionParams(node, /* allowModifiers */ false);\n\n // For the smartPipelines plugin: Disable topic references from outer\n // contexts within the function body. They are permitted in function\n // default-parameter expressions, outside of the function body.\n this.withTopicForbiddingContext(() => {\n // Parse the function body.\n this.parseFunctionBodyAndFinish(\n node,\n isStatement ? \"FunctionDeclaration\" : \"FunctionExpression\",\n );\n });\n\n this.prodParam.exit();\n this.scope.exit();\n\n if (isStatement && !isHangingStatement) {\n // We need to register this _after_ parsing the function body\n // because of TypeScript body-less function declarations,\n // which shouldn't be added to the scope.\n this.registerFunctionStatementId(node);\n }\n\n this.state.maybeInArrowParameters = oldMaybeInArrowParameters;\n return node;\n }\n\n parseFunctionId(requireId?: boolean): ?N.Identifier {\n return requireId || this.match(tt.name) ? this.parseIdentifier() : null;\n }\n\n parseFunctionParams(node: N.Function, allowModifiers?: boolean): void {\n this.expect(tt.parenL);\n this.expressionScope.enter(newParameterDeclarationScope());\n node.params = this.parseBindingList(\n tt.parenR,\n charCodes.rightParenthesis,\n /* allowEmpty */ false,\n allowModifiers,\n );\n\n this.expressionScope.exit();\n }\n\n registerFunctionStatementId(node: N.Function): void {\n if (!node.id) return;\n\n // If it is a regular function declaration in sloppy mode, then it is\n // subject to Annex B semantics (BIND_FUNCTION). Otherwise, the binding\n // mode depends on properties of the current scope (see\n // treatFunctionsAsVar).\n this.scope.declareName(\n node.id.name,\n this.state.strict || node.generator || node.async\n ? this.scope.treatFunctionsAsVar\n ? BIND_VAR\n : BIND_LEXICAL\n : BIND_FUNCTION,\n node.id.start,\n );\n }\n\n // Parse a class declaration or literal (depending on the\n // `isStatement` parameter).\n\n parseClass<T: N.Class>(\n node: T,\n isStatement: /* T === ClassDeclaration */ boolean,\n optionalId?: boolean,\n ): T {\n this.next();\n this.takeDecorators(node);\n\n // A class definition is always strict mode code.\n const oldStrict = this.state.strict;\n this.state.strict = true;\n\n this.parseClassId(node, isStatement, optionalId);\n this.parseClassSuper(node);\n // this.state.strict is restored in parseClassBody\n node.body = this.parseClassBody(!!node.superClass, oldStrict);\n\n return this.finishNode(\n node,\n isStatement ? \"ClassDeclaration\" : \"ClassExpression\",\n );\n }\n\n isClassProperty(): boolean {\n return this.match(tt.eq) || this.match(tt.semi) || this.match(tt.braceR);\n }\n\n isClassMethod(): boolean {\n return this.match(tt.parenL);\n }\n\n isNonstaticConstructor(method: N.ClassMethod | N.ClassProperty): boolean {\n return (\n !method.computed &&\n !method.static &&\n (method.key.name === \"constructor\" || // Identifier\n method.key.value === \"constructor\") // String literal\n );\n }\n\n // https://tc39.es/ecma262/#prod-ClassBody\n parseClassBody(hadSuperClass: boolean, oldStrict: boolean): N.ClassBody {\n this.classScope.enter();\n\n const state: N.ParseClassMemberState = {\n hadConstructor: false,\n hadSuperClass,\n };\n let decorators: N.Decorator[] = [];\n const classBody: N.ClassBody = this.startNode();\n classBody.body = [];\n\n this.expect(tt.braceL);\n\n // For the smartPipelines plugin: Disable topic references from outer\n // contexts within the class body.\n this.withTopicForbiddingContext(() => {\n while (!this.match(tt.braceR)) {\n if (this.eat(tt.semi)) {\n if (decorators.length > 0) {\n throw this.raise(this.state.lastTokEnd, Errors.DecoratorSemicolon);\n }\n continue;\n }\n\n if (this.match(tt.at)) {\n decorators.push(this.parseDecorator());\n continue;\n }\n\n const member = this.startNode();\n\n // steal the decorators if there are any\n if (decorators.length) {\n member.decorators = decorators;\n this.resetStartLocationFromNode(member, decorators[0]);\n decorators = [];\n }\n\n this.parseClassMember(classBody, member, state);\n\n if (\n member.kind === \"constructor\" &&\n member.decorators &&\n member.decorators.length > 0\n ) {\n this.raise(member.start, Errors.DecoratorConstructor);\n }\n }\n });\n\n this.state.strict = oldStrict;\n\n this.next(); // eat `}`\n\n if (decorators.length) {\n throw this.raise(this.state.start, Errors.TrailingDecorator);\n }\n\n this.classScope.exit();\n\n return this.finishNode(classBody, \"ClassBody\");\n }\n\n // returns true if the current identifier is a method/field name,\n // false if it is a modifier\n parseClassMemberFromModifier(\n classBody: N.ClassBody,\n member: N.ClassMember,\n ): boolean {\n const key = this.parseIdentifier(true); // eats the modifier\n\n if (this.isClassMethod()) {\n const method: N.ClassMethod = (member: any);\n\n // a method named like the modifier\n method.kind = \"method\";\n method.computed = false;\n method.key = key;\n method.static = false;\n this.pushClassMethod(\n classBody,\n method,\n false,\n false,\n /* isConstructor */ false,\n false,\n );\n return true;\n } else if (this.isClassProperty()) {\n const prop: N.ClassProperty = (member: any);\n\n // a property named like the modifier\n prop.computed = false;\n prop.key = key;\n prop.static = false;\n classBody.body.push(this.parseClassProperty(prop));\n return true;\n }\n return false;\n }\n\n parseClassMember(\n classBody: N.ClassBody,\n member: N.ClassMember,\n state: N.ParseClassMemberState,\n ): void {\n const isStatic = this.isContextual(\"static\");\n\n if (isStatic) {\n if (this.parseClassMemberFromModifier(classBody, member)) {\n // a class element named 'static'\n return;\n }\n if (this.eat(tt.braceL)) {\n this.parseClassStaticBlock(classBody, ((member: any): N.StaticBlock));\n return;\n }\n }\n\n this.parseClassMemberWithIsStatic(classBody, member, state, isStatic);\n }\n\n parseClassMemberWithIsStatic(\n classBody: N.ClassBody,\n member: N.ClassMember,\n state: N.ParseClassMemberState,\n isStatic: boolean,\n ) {\n const publicMethod: $FlowSubtype<N.ClassMethod> = member;\n const privateMethod: $FlowSubtype<N.ClassPrivateMethod> = member;\n const publicProp: $FlowSubtype<N.ClassMethod> = member;\n const privateProp: $FlowSubtype<N.ClassPrivateMethod> = member;\n\n const method: typeof publicMethod | typeof privateMethod = publicMethod;\n const publicMember: typeof publicMethod | typeof publicProp = publicMethod;\n\n member.static = isStatic;\n\n if (this.eat(tt.star)) {\n // a generator\n method.kind = \"method\";\n const isPrivateName = this.match(tt.privateName);\n this.parseClassElementName(method);\n\n if (isPrivateName) {\n // Private generator method\n this.pushClassPrivateMethod(classBody, privateMethod, true, false);\n return;\n }\n\n if (this.isNonstaticConstructor(publicMethod)) {\n this.raise(publicMethod.key.start, Errors.ConstructorIsGenerator);\n }\n\n this.pushClassMethod(\n classBody,\n publicMethod,\n true,\n false,\n /* isConstructor */ false,\n false,\n );\n\n return;\n }\n\n const containsEsc = this.state.containsEsc;\n const isPrivate = this.match(tt.privateName);\n const key = this.parseClassElementName(member);\n // Check the key is not a computed expression or string literal.\n const isSimple = key.type === \"Identifier\";\n const maybeQuestionTokenStart = this.state.start;\n\n this.parsePostMemberNameModifiers(publicMember);\n\n if (this.isClassMethod()) {\n method.kind = \"method\";\n\n if (isPrivate) {\n this.pushClassPrivateMethod(classBody, privateMethod, false, false);\n return;\n }\n\n // a normal method\n const isConstructor = this.isNonstaticConstructor(publicMethod);\n let allowsDirectSuper = false;\n if (isConstructor) {\n publicMethod.kind = \"constructor\";\n\n // TypeScript allows multiple overloaded constructor declarations.\n if (state.hadConstructor && !this.hasPlugin(\"typescript\")) {\n this.raise(key.start, Errors.DuplicateConstructor);\n }\n if (isConstructor && this.hasPlugin(\"typescript\") && member.override) {\n this.raise(key.start, Errors.OverrideOnConstructor);\n }\n state.hadConstructor = true;\n allowsDirectSuper = state.hadSuperClass;\n }\n\n this.pushClassMethod(\n classBody,\n publicMethod,\n false,\n false,\n isConstructor,\n allowsDirectSuper,\n );\n } else if (this.isClassProperty()) {\n if (isPrivate) {\n this.pushClassPrivateProperty(classBody, privateProp);\n } else {\n this.pushClassProperty(classBody, publicProp);\n }\n } else if (\n isSimple &&\n key.name === \"async\" &&\n !containsEsc &&\n !this.isLineTerminator()\n ) {\n // an async method\n const isGenerator = this.eat(tt.star);\n\n if (publicMember.optional) {\n this.unexpected(maybeQuestionTokenStart);\n }\n\n method.kind = \"method\";\n // The so-called parsed name would have been \"async\": get the real name.\n const isPrivate = this.match(tt.privateName);\n this.parseClassElementName(method);\n this.parsePostMemberNameModifiers(publicMember);\n\n if (isPrivate) {\n // private async method\n this.pushClassPrivateMethod(\n classBody,\n privateMethod,\n isGenerator,\n true,\n );\n } else {\n if (this.isNonstaticConstructor(publicMethod)) {\n this.raise(publicMethod.key.start, Errors.ConstructorIsAsync);\n }\n\n this.pushClassMethod(\n classBody,\n publicMethod,\n isGenerator,\n true,\n /* isConstructor */ false,\n false,\n );\n }\n } else if (\n isSimple &&\n (key.name === \"get\" || key.name === \"set\") &&\n !containsEsc &&\n !(this.match(tt.star) && this.isLineTerminator())\n ) {\n // `get\\n*` is an uninitialized property named 'get' followed by a generator.\n // a getter or setter\n method.kind = key.name;\n // The so-called parsed name would have been \"get/set\": get the real name.\n const isPrivate = this.match(tt.privateName);\n this.parseClassElementName(publicMethod);\n\n if (isPrivate) {\n // private getter/setter\n this.pushClassPrivateMethod(classBody, privateMethod, false, false);\n } else {\n if (this.isNonstaticConstructor(publicMethod)) {\n this.raise(publicMethod.key.start, Errors.ConstructorIsAccessor);\n }\n this.pushClassMethod(\n classBody,\n publicMethod,\n false,\n false,\n /* isConstructor */ false,\n false,\n );\n }\n\n this.checkGetterSetterParams(publicMethod);\n } else if (this.isLineTerminator()) {\n // an uninitialized class property (due to ASI, since we don't otherwise recognize the next token)\n if (isPrivate) {\n this.pushClassPrivateProperty(classBody, privateProp);\n } else {\n this.pushClassProperty(classBody, publicProp);\n }\n } else {\n this.unexpected();\n }\n }\n\n // https://tc39.es/proposal-class-fields/#prod-ClassElementName\n parseClassElementName(member: N.ClassMember): N.Expression | N.Identifier {\n const { type, value, start } = this.state;\n if (\n (type === tt.name || type === tt.string) &&\n member.static &&\n value === \"prototype\"\n ) {\n this.raise(start, Errors.StaticPrototype);\n }\n\n if (type === tt.privateName && value === \"constructor\") {\n this.raise(start, Errors.ConstructorClassPrivateField);\n }\n\n return this.parsePropertyName(member, /* isPrivateNameAllowed */ true);\n }\n\n parseClassStaticBlock(\n classBody: N.ClassBody,\n member: N.StaticBlock & { decorators?: Array<N.Decorator> },\n ) {\n this.expectPlugin(\"classStaticBlock\", member.start);\n // Start a new lexical scope\n this.scope.enter(SCOPE_CLASS | SCOPE_STATIC_BLOCK | SCOPE_SUPER);\n // Start a new scope with regard to loop labels\n const oldLabels = this.state.labels;\n this.state.labels = [];\n // ClassStaticBlockStatementList:\n // StatementList[~Yield, ~Await, ~Return] opt\n this.prodParam.enter(PARAM);\n const body = (member.body = []);\n this.parseBlockOrModuleBlockBody(body, undefined, false, tt.braceR);\n this.prodParam.exit();\n this.scope.exit();\n this.state.labels = oldLabels;\n classBody.body.push(this.finishNode<N.StaticBlock>(member, \"StaticBlock\"));\n if (member.decorators?.length) {\n this.raise(member.start, Errors.DecoratorStaticBlock);\n }\n }\n\n pushClassProperty(classBody: N.ClassBody, prop: N.ClassProperty) {\n if (\n !prop.computed &&\n (prop.key.name === \"constructor\" || prop.key.value === \"constructor\")\n ) {\n // Non-computed field, which is either an identifier named \"constructor\"\n // or a string literal named \"constructor\"\n this.raise(prop.key.start, Errors.ConstructorClassField);\n }\n\n classBody.body.push(this.parseClassProperty(prop));\n }\n\n pushClassPrivateProperty(\n classBody: N.ClassBody,\n prop: N.ClassPrivateProperty,\n ) {\n const node = this.parseClassPrivateProperty(prop);\n classBody.body.push(node);\n\n this.classScope.declarePrivateName(\n this.getPrivateNameSV(node.key),\n CLASS_ELEMENT_OTHER,\n node.key.start,\n );\n }\n\n pushClassMethod(\n classBody: N.ClassBody,\n method: N.ClassMethod,\n isGenerator: boolean,\n isAsync: boolean,\n isConstructor: boolean,\n allowsDirectSuper: boolean,\n ): void {\n classBody.body.push(\n this.parseMethod(\n method,\n isGenerator,\n isAsync,\n isConstructor,\n allowsDirectSuper,\n \"ClassMethod\",\n true,\n ),\n );\n }\n\n pushClassPrivateMethod(\n classBody: N.ClassBody,\n method: N.ClassPrivateMethod,\n isGenerator: boolean,\n isAsync: boolean,\n ): void {\n const node = this.parseMethod(\n method,\n isGenerator,\n isAsync,\n /* isConstructor */ false,\n false,\n \"ClassPrivateMethod\",\n true,\n );\n classBody.body.push(node);\n\n const kind =\n node.kind === \"get\"\n ? node.static\n ? CLASS_ELEMENT_STATIC_GETTER\n : CLASS_ELEMENT_INSTANCE_GETTER\n : node.kind === \"set\"\n ? node.static\n ? CLASS_ELEMENT_STATIC_SETTER\n : CLASS_ELEMENT_INSTANCE_SETTER\n : CLASS_ELEMENT_OTHER;\n this.classScope.declarePrivateName(\n this.getPrivateNameSV(node.key),\n kind,\n node.key.start,\n );\n }\n\n // Overridden in typescript.js\n parsePostMemberNameModifiers(\n // eslint-disable-next-line no-unused-vars\n methodOrProp: N.ClassMethod | N.ClassProperty,\n ): void {}\n\n // https://tc39.es/proposal-class-fields/#prod-FieldDefinition\n parseClassPrivateProperty(\n node: N.ClassPrivateProperty,\n ): N.ClassPrivateProperty {\n this.parseInitializer(node);\n this.semicolon();\n return this.finishNode(node, \"ClassPrivateProperty\");\n }\n\n // https://tc39.es/proposal-class-fields/#prod-FieldDefinition\n parseClassProperty(node: N.ClassProperty): N.ClassProperty {\n this.parseInitializer(node);\n this.semicolon();\n return this.finishNode(node, \"ClassProperty\");\n }\n\n // https://tc39.es/proposal-class-fields/#prod-Initializer\n parseInitializer(node: N.ClassProperty | N.ClassPrivateProperty): void {\n this.scope.enter(SCOPE_CLASS | SCOPE_SUPER);\n this.expressionScope.enter(newExpressionScope());\n this.prodParam.enter(PARAM);\n node.value = this.eat(tt.eq) ? this.parseMaybeAssignAllowIn() : null;\n this.expressionScope.exit();\n this.prodParam.exit();\n this.scope.exit();\n }\n\n parseClassId(\n node: N.Class,\n isStatement: boolean,\n optionalId: ?boolean,\n bindingType: BindingTypes = BIND_CLASS,\n ): void {\n if (this.match(tt.name)) {\n node.id = this.parseIdentifier();\n if (isStatement) {\n this.checkLVal(node.id, \"class name\", bindingType);\n }\n } else {\n if (optionalId || !isStatement) {\n node.id = null;\n } else {\n this.unexpected(null, Errors.MissingClassName);\n }\n }\n }\n\n // https://tc39.es/ecma262/#prod-ClassHeritage\n parseClassSuper(node: N.Class): void {\n node.superClass = this.eat(tt._extends) ? this.parseExprSubscripts() : null;\n }\n\n // Parses module export declaration.\n // https://tc39.es/ecma262/#prod-ExportDeclaration\n\n parseExport(node: N.Node): N.AnyExport {\n const hasDefault = this.maybeParseExportDefaultSpecifier(node);\n const parseAfterDefault = !hasDefault || this.eat(tt.comma);\n const hasStar = parseAfterDefault && this.eatExportStar(node);\n const hasNamespace =\n hasStar && this.maybeParseExportNamespaceSpecifier(node);\n const parseAfterNamespace =\n parseAfterDefault && (!hasNamespace || this.eat(tt.comma));\n const isFromRequired = hasDefault || hasStar;\n\n if (hasStar && !hasNamespace) {\n if (hasDefault) this.unexpected();\n this.parseExportFrom(node, true);\n\n return this.finishNode(node, \"ExportAllDeclaration\");\n }\n\n const hasSpecifiers = this.maybeParseExportNamedSpecifiers(node);\n\n if (\n (hasDefault && parseAfterDefault && !hasStar && !hasSpecifiers) ||\n (hasNamespace && parseAfterNamespace && !hasSpecifiers)\n ) {\n throw this.unexpected(null, tt.braceL);\n }\n\n let hasDeclaration;\n if (isFromRequired || hasSpecifiers) {\n hasDeclaration = false;\n this.parseExportFrom(node, isFromRequired);\n } else {\n hasDeclaration = this.maybeParseExportDeclaration(node);\n }\n\n if (isFromRequired || hasSpecifiers || hasDeclaration) {\n this.checkExport(node, true, false, !!node.source);\n return this.finishNode(node, \"ExportNamedDeclaration\");\n }\n\n if (this.eat(tt._default)) {\n // export default ...\n node.declaration = this.parseExportDefaultExpression();\n this.checkExport(node, true, true);\n\n return this.finishNode(node, \"ExportDefaultDeclaration\");\n }\n\n throw this.unexpected(null, tt.braceL);\n }\n\n // eslint-disable-next-line no-unused-vars\n eatExportStar(node: N.Node): boolean {\n return this.eat(tt.star);\n }\n\n maybeParseExportDefaultSpecifier(node: N.Node): boolean {\n if (this.isExportDefaultSpecifier()) {\n // export defaultObj ...\n this.expectPlugin(\"exportDefaultFrom\");\n const specifier = this.startNode();\n specifier.exported = this.parseIdentifier(true);\n node.specifiers = [this.finishNode(specifier, \"ExportDefaultSpecifier\")];\n return true;\n }\n return false;\n }\n\n maybeParseExportNamespaceSpecifier(node: N.Node): boolean {\n if (this.isContextual(\"as\")) {\n if (!node.specifiers) node.specifiers = [];\n\n const specifier = this.startNodeAt(\n this.state.lastTokStart,\n this.state.lastTokStartLoc,\n );\n\n this.next();\n\n specifier.exported = this.parseModuleExportName();\n node.specifiers.push(\n this.finishNode(specifier, \"ExportNamespaceSpecifier\"),\n );\n return true;\n }\n return false;\n }\n\n maybeParseExportNamedSpecifiers(node: N.Node): boolean {\n if (this.match(tt.braceL)) {\n if (!node.specifiers) node.specifiers = [];\n node.specifiers.push(...this.parseExportSpecifiers());\n\n node.source = null;\n node.declaration = null;\n\n return true;\n }\n return false;\n }\n\n maybeParseExportDeclaration(node: N.Node): boolean {\n if (this.shouldParseExportDeclaration()) {\n node.specifiers = [];\n node.source = null;\n node.declaration = this.parseExportDeclaration(node);\n return true;\n }\n return false;\n }\n\n isAsyncFunction(): boolean {\n if (!this.isContextual(\"async\")) return false;\n const next = this.nextTokenStart();\n return (\n !lineBreak.test(this.input.slice(this.state.pos, next)) &&\n this.isUnparsedContextual(next, \"function\")\n );\n }\n\n parseExportDefaultExpression(): N.Expression | N.Declaration {\n const expr = this.startNode();\n\n const isAsync = this.isAsyncFunction();\n\n if (this.match(tt._function) || isAsync) {\n this.next();\n if (isAsync) {\n this.next();\n }\n\n return this.parseFunction(\n expr,\n FUNC_STATEMENT | FUNC_NULLABLE_ID,\n isAsync,\n );\n } else if (this.match(tt._class)) {\n return this.parseClass(expr, true, true);\n } else if (this.match(tt.at)) {\n if (\n this.hasPlugin(\"decorators\") &&\n this.getPluginOption(\"decorators\", \"decoratorsBeforeExport\")\n ) {\n this.raise(this.state.start, Errors.DecoratorBeforeExport);\n }\n this.parseDecorators(false);\n return this.parseClass(expr, true, true);\n } else if (this.match(tt._const) || this.match(tt._var) || this.isLet()) {\n throw this.raise(this.state.start, Errors.UnsupportedDefaultExport);\n } else {\n const res = this.parseMaybeAssignAllowIn();\n this.semicolon();\n return res;\n }\n }\n\n // eslint-disable-next-line no-unused-vars\n parseExportDeclaration(node: N.ExportNamedDeclaration): ?N.Declaration {\n return this.parseStatement(null);\n }\n\n isExportDefaultSpecifier(): boolean {\n if (this.match(tt.name)) {\n const value = this.state.value;\n if ((value === \"async\" && !this.state.containsEsc) || value === \"let\") {\n return false;\n }\n if (\n (value === \"type\" || value === \"interface\") &&\n !this.state.containsEsc\n ) {\n const l = this.lookahead();\n // If we see any variable name other than `from` after `type` keyword,\n // we consider it as flow/typescript type exports\n // note that this approach may fail on some pedantic cases\n // export type from = number\n if (\n (l.type === tt.name && l.value !== \"from\") ||\n l.type === tt.braceL\n ) {\n this.expectOnePlugin([\"flow\", \"typescript\"]);\n return false;\n }\n }\n } else if (!this.match(tt._default)) {\n return false;\n }\n\n const next = this.nextTokenStart();\n const hasFrom = this.isUnparsedContextual(next, \"from\");\n if (\n this.input.charCodeAt(next) === charCodes.comma ||\n (this.match(tt.name) && hasFrom)\n ) {\n return true;\n }\n // lookahead again when `export default from` is seen\n if (this.match(tt._default) && hasFrom) {\n const nextAfterFrom = this.input.charCodeAt(\n this.nextTokenStartSince(next + 4),\n );\n return (\n nextAfterFrom === charCodes.quotationMark ||\n nextAfterFrom === charCodes.apostrophe\n );\n }\n return false;\n }\n\n parseExportFrom(node: N.ExportNamedDeclaration, expect?: boolean): void {\n if (this.eatContextual(\"from\")) {\n node.source = this.parseImportSource();\n this.checkExport(node);\n const assertions = this.maybeParseImportAssertions();\n if (assertions) {\n node.assertions = assertions;\n }\n } else {\n if (expect) {\n this.unexpected();\n } else {\n node.source = null;\n }\n }\n\n this.semicolon();\n }\n\n shouldParseExportDeclaration(): boolean {\n if (this.match(tt.at)) {\n this.expectOnePlugin([\"decorators\", \"decorators-legacy\"]);\n if (this.hasPlugin(\"decorators\")) {\n if (this.getPluginOption(\"decorators\", \"decoratorsBeforeExport\")) {\n this.unexpected(this.state.start, Errors.DecoratorBeforeExport);\n } else {\n return true;\n }\n }\n }\n\n return (\n this.state.type.keyword === \"var\" ||\n this.state.type.keyword === \"const\" ||\n this.state.type.keyword === \"function\" ||\n this.state.type.keyword === \"class\" ||\n this.isLet() ||\n this.isAsyncFunction()\n );\n }\n\n checkExport(\n node: N.ExportNamedDeclaration,\n checkNames?: boolean,\n isDefault?: boolean,\n isFrom?: boolean,\n ): void {\n if (checkNames) {\n // Check for duplicate exports\n if (isDefault) {\n // Default exports\n this.checkDuplicateExports(node, \"default\");\n if (this.hasPlugin(\"exportDefaultFrom\")) {\n const declaration = ((node: any): N.ExportDefaultDeclaration)\n .declaration;\n if (\n declaration.type === \"Identifier\" &&\n declaration.name === \"from\" &&\n declaration.end - declaration.start === 4 && // does not contain escape\n !declaration.extra?.parenthesized\n ) {\n this.raise(declaration.start, Errors.ExportDefaultFromAsIdentifier);\n }\n }\n } else if (node.specifiers && node.specifiers.length) {\n // Named exports\n for (const specifier of node.specifiers) {\n const { exported } = specifier;\n const exportedName =\n exported.type === \"Identifier\" ? exported.name : exported.value;\n this.checkDuplicateExports(specifier, exportedName);\n // $FlowIgnore\n if (!isFrom && specifier.local) {\n const { local } = specifier;\n if (local.type !== \"Identifier\") {\n this.raise(\n specifier.start,\n Errors.ExportBindingIsString,\n local.value,\n exportedName,\n );\n } else {\n // check for keywords used as local names\n this.checkReservedWord(local.name, local.start, true, false);\n // check if export is defined\n this.scope.checkLocalExport(local);\n }\n }\n }\n } else if (node.declaration) {\n // Exported declarations\n if (\n node.declaration.type === \"FunctionDeclaration\" ||\n node.declaration.type === \"ClassDeclaration\"\n ) {\n const id = node.declaration.id;\n if (!id) throw new Error(\"Assertion failure\");\n\n this.checkDuplicateExports(node, id.name);\n } else if (node.declaration.type === \"VariableDeclaration\") {\n for (const declaration of node.declaration.declarations) {\n this.checkDeclaration(declaration.id);\n }\n }\n }\n }\n\n const currentContextDecorators =\n this.state.decoratorStack[this.state.decoratorStack.length - 1];\n // If node.declaration is a class, it will take all decorators in the current context.\n // Thus we should throw if we see non-empty decorators here.\n if (currentContextDecorators.length) {\n throw this.raise(node.start, Errors.UnsupportedDecoratorExport);\n }\n }\n\n checkDeclaration(node: N.Pattern | N.ObjectProperty): void {\n if (node.type === \"Identifier\") {\n this.checkDuplicateExports(node, node.name);\n } else if (node.type === \"ObjectPattern\") {\n for (const prop of node.properties) {\n this.checkDeclaration(prop);\n }\n } else if (node.type === \"ArrayPattern\") {\n for (const elem of node.elements) {\n if (elem) {\n this.checkDeclaration(elem);\n }\n }\n } else if (node.type === \"ObjectProperty\") {\n this.checkDeclaration(node.value);\n } else if (node.type === \"RestElement\") {\n this.checkDeclaration(node.argument);\n } else if (node.type === \"AssignmentPattern\") {\n this.checkDeclaration(node.left);\n }\n }\n\n checkDuplicateExports(\n node:\n | N.Identifier\n | N.StringLiteral\n | N.ExportNamedDeclaration\n | N.ExportSpecifier\n | N.ExportDefaultSpecifier,\n name: string,\n ): void {\n if (this.exportedIdentifiers.has(name)) {\n this.raise(\n node.start,\n name === \"default\"\n ? Errors.DuplicateDefaultExport\n : Errors.DuplicateExport,\n name,\n );\n }\n this.exportedIdentifiers.add(name);\n }\n\n // Parses a comma-separated list of module exports.\n\n parseExportSpecifiers(): Array<N.ExportSpecifier> {\n const nodes = [];\n let first = true;\n\n // export { x, y as z } [from '...']\n this.expect(tt.braceL);\n\n while (!this.eat(tt.braceR)) {\n if (first) {\n first = false;\n } else {\n this.expect(tt.comma);\n if (this.eat(tt.braceR)) break;\n }\n\n const node = this.startNode();\n node.local = this.parseModuleExportName();\n node.exported = this.eatContextual(\"as\")\n ? this.parseModuleExportName()\n : node.local.__clone();\n nodes.push(this.finishNode(node, \"ExportSpecifier\"));\n }\n\n return nodes;\n }\n\n // https://tc39.es/ecma262/#prod-ModuleExportName\n parseModuleExportName(): N.StringLiteral | N.Identifier {\n if (this.match(tt.string)) {\n const result = this.parseStringLiteral(this.state.value);\n const surrogate = result.value.match(loneSurrogate);\n if (surrogate) {\n this.raise(\n result.start,\n Errors.ModuleExportNameHasLoneSurrogate,\n surrogate[0].charCodeAt(0).toString(16),\n );\n }\n return result;\n }\n return this.parseIdentifier(true);\n }\n\n // Parses import declaration.\n // https://tc39.es/ecma262/#prod-ImportDeclaration\n\n parseImport(node: N.Node): N.AnyImport {\n // import '...'\n node.specifiers = [];\n if (!this.match(tt.string)) {\n // check if we have a default import like\n // import React from \"react\";\n const hasDefault = this.maybeParseDefaultImportSpecifier(node);\n /* we are checking if we do not have a default import, then it is obvious that we need named imports\n * import { get } from \"axios\";\n * but if we do have a default import\n * we need to check if we have a comma after that and\n * that is where this `|| this.eat` condition comes into play\n */\n const parseNext = !hasDefault || this.eat(tt.comma);\n // if we do have to parse the next set of specifiers, we first check for star imports\n // import React, * from \"react\";\n const hasStar = parseNext && this.maybeParseStarImportSpecifier(node);\n // now we check if we need to parse the next imports\n // but only if they are not importing * (everything)\n if (parseNext && !hasStar) this.parseNamedImportSpecifiers(node);\n this.expectContextual(\"from\");\n }\n node.source = this.parseImportSource();\n // https://github.com/tc39/proposal-import-assertions\n // parse module import assertions if the next token is `assert` or ignore\n // and finish the ImportDeclaration node.\n const assertions = this.maybeParseImportAssertions();\n if (assertions) {\n node.assertions = assertions;\n } else if (!process.env.BABEL_8_BREAKING) {\n const attributes = this.maybeParseModuleAttributes();\n if (attributes) {\n node.attributes = attributes;\n }\n }\n\n this.semicolon();\n return this.finishNode(node, \"ImportDeclaration\");\n }\n\n parseImportSource(): N.StringLiteral {\n if (!this.match(tt.string)) this.unexpected();\n return this.parseExprAtom();\n }\n\n // eslint-disable-next-line no-unused-vars\n shouldParseDefaultImport(node: N.ImportDeclaration): boolean {\n return this.match(tt.name);\n }\n\n parseImportSpecifierLocal(\n node: N.ImportDeclaration,\n specifier: N.Node,\n type: string,\n contextDescription: string,\n ): void {\n specifier.local = this.parseIdentifier();\n this.checkLVal(specifier.local, contextDescription, BIND_LEXICAL);\n node.specifiers.push(this.finishNode(specifier, type));\n }\n\n /**\n * parse assert entries\n *\n * @see {@link https://tc39.es/proposal-import-assertions/#prod-AssertEntries |AssertEntries}\n * @returns {N.ImportAttribute[]}\n * @memberof StatementParser\n */\n parseAssertEntries(): N.ImportAttribute[] {\n const attrs = [];\n const attrNames = new Set();\n\n do {\n if (this.match(tt.braceR)) {\n break;\n }\n\n const node = this.startNode<N.ImportAttribute>();\n\n // parse AssertionKey : IdentifierName, StringLiteral\n const keyName = this.state.value;\n // check if we already have an entry for an attribute\n // if a duplicate entry is found, throw an error\n // for now this logic will come into play only when someone declares `type` twice\n if (attrNames.has(keyName)) {\n this.raise(\n this.state.start,\n Errors.ModuleAttributesWithDuplicateKeys,\n keyName,\n );\n }\n attrNames.add(keyName);\n if (this.match(tt.string)) {\n node.key = this.parseStringLiteral(keyName);\n } else {\n node.key = this.parseIdentifier(true);\n }\n this.expect(tt.colon);\n\n if (!this.match(tt.string)) {\n throw this.unexpected(\n this.state.start,\n Errors.ModuleAttributeInvalidValue,\n );\n }\n node.value = this.parseStringLiteral(this.state.value);\n this.finishNode<N.ImportAttribute>(node, \"ImportAttribute\");\n attrs.push(node);\n } while (this.eat(tt.comma));\n\n return attrs;\n }\n\n /**\n * parse module attributes\n * @deprecated It will be removed in Babel 8\n * @returns\n * @memberof StatementParser\n */\n maybeParseModuleAttributes() {\n if (this.match(tt._with) && !this.hasPrecedingLineBreak()) {\n this.expectPlugin(\"moduleAttributes\");\n this.next();\n } else {\n if (this.hasPlugin(\"moduleAttributes\")) return [];\n return null;\n }\n const attrs = [];\n const attributes = new Set();\n do {\n const node = this.startNode();\n node.key = this.parseIdentifier(true);\n\n if (node.key.name !== \"type\") {\n this.raise(\n node.key.start,\n Errors.ModuleAttributeDifferentFromType,\n node.key.name,\n );\n }\n\n if (attributes.has(node.key.name)) {\n this.raise(\n node.key.start,\n Errors.ModuleAttributesWithDuplicateKeys,\n node.key.name,\n );\n }\n attributes.add(node.key.name);\n this.expect(tt.colon);\n if (!this.match(tt.string)) {\n throw this.unexpected(\n this.state.start,\n Errors.ModuleAttributeInvalidValue,\n );\n }\n node.value = this.parseStringLiteral(this.state.value);\n this.finishNode(node, \"ImportAttribute\");\n attrs.push(node);\n } while (this.eat(tt.comma));\n\n return attrs;\n }\n\n maybeParseImportAssertions() {\n // [no LineTerminator here] AssertClause\n if (this.isContextual(\"assert\") && !this.hasPrecedingLineBreak()) {\n this.expectPlugin(\"importAssertions\");\n this.next(); // eat `assert`\n } else {\n if (this.hasPlugin(\"importAssertions\")) return [];\n return null;\n }\n // https://tc39.es/proposal-import-assertions/#prod-AssertClause\n this.eat(tt.braceL);\n const attrs = this.parseAssertEntries();\n this.eat(tt.braceR);\n\n return attrs;\n }\n\n maybeParseDefaultImportSpecifier(node: N.ImportDeclaration): boolean {\n if (this.shouldParseDefaultImport(node)) {\n // import defaultObj, { x, y as z } from '...'\n this.parseImportSpecifierLocal(\n node,\n this.startNode(),\n \"ImportDefaultSpecifier\",\n \"default import specifier\",\n );\n return true;\n }\n return false;\n }\n\n maybeParseStarImportSpecifier(node: N.ImportDeclaration): boolean {\n if (this.match(tt.star)) {\n const specifier = this.startNode();\n this.next();\n this.expectContextual(\"as\");\n\n this.parseImportSpecifierLocal(\n node,\n specifier,\n \"ImportNamespaceSpecifier\",\n \"import namespace specifier\",\n );\n return true;\n }\n return false;\n }\n\n parseNamedImportSpecifiers(node: N.ImportDeclaration) {\n let first = true;\n this.expect(tt.braceL);\n while (!this.eat(tt.braceR)) {\n if (first) {\n first = false;\n } else {\n // Detect an attempt to deep destructure\n if (this.eat(tt.colon)) {\n throw this.raise(this.state.start, Errors.DestructureNamedImport);\n }\n\n this.expect(tt.comma);\n if (this.eat(tt.braceR)) break;\n }\n\n this.parseImportSpecifier(node);\n }\n }\n\n // https://tc39.es/ecma262/#prod-ImportSpecifier\n parseImportSpecifier(node: N.ImportDeclaration): void {\n const specifier = this.startNode();\n const importedIsString = this.match(tt.string);\n specifier.imported = this.parseModuleExportName();\n if (this.eatContextual(\"as\")) {\n specifier.local = this.parseIdentifier();\n } else {\n const { imported } = specifier;\n if (importedIsString) {\n throw this.raise(\n specifier.start,\n Errors.ImportBindingIsString,\n imported.value,\n );\n }\n this.checkReservedWord(imported.name, specifier.start, true, true);\n specifier.local = imported.__clone();\n }\n this.checkLVal(specifier.local, \"import specifier\", BIND_LEXICAL);\n node.specifiers.push(this.finishNode(specifier, \"ImportSpecifier\"));\n }\n\n // This is used in flow and typescript plugin\n // Determine whether a parameter is a this param\n isThisParam(\n param: N.Pattern | N.Identifier | N.TSParameterProperty,\n ): boolean {\n return param.type === \"Identifier\" && param.name === \"this\";\n }\n}\n","// @flow\n\nimport type { Options } from \"../options\";\nimport type { File /*::, JSXOpeningElement */ } from \"../types\";\nimport type { PluginList } from \"../plugin-utils\";\nimport { getOptions } from \"../options\";\nimport StatementParser from \"./statement\";\nimport ScopeHandler from \"../util/scope\";\n\nexport type PluginsMap = Map<string, { [string]: any }>;\n\nexport default class Parser extends StatementParser {\n // Forward-declaration so typescript plugin can override jsx plugin\n /*::\n +jsxParseOpeningElementAfterName: (\n node: JSXOpeningElement,\n ) => JSXOpeningElement;\n */\n\n constructor(options: ?Options, input: string) {\n options = getOptions(options);\n super(options, input);\n\n this.options = options;\n this.initializeScopes();\n this.plugins = pluginsMap(this.options.plugins);\n this.filename = options.sourceFilename;\n }\n\n // This can be overwritten, for example, by the TypeScript plugin.\n getScopeHandler(): Class<ScopeHandler<*>> {\n return ScopeHandler;\n }\n\n parse(): File {\n this.enterInitialScopes();\n const file = this.startNode();\n const program = this.startNode();\n this.nextToken();\n file.errors = null;\n this.parseTopLevel(file, program);\n file.errors = this.state.errors;\n return file;\n }\n}\n\nfunction pluginsMap(plugins: PluginList): PluginsMap {\n const pluginMap: PluginsMap = new Map();\n for (const plugin of plugins) {\n const [name, options] = Array.isArray(plugin) ? plugin : [plugin, {}];\n if (!pluginMap.has(name)) pluginMap.set(name, options || {});\n }\n return pluginMap;\n}\n","// @flow\n\nimport { type Options } from \"./options\";\nimport {\n hasPlugin,\n validatePlugins,\n mixinPluginNames,\n mixinPlugins,\n type PluginList,\n} from \"./plugin-utils\";\nimport Parser from \"./parser\";\n\nimport { types as tokTypes } from \"./tokenizer/types\";\nimport \"./tokenizer/context\";\n\nimport type { Expression, File } from \"./types\";\n\nexport function parse(input: string, options?: Options): File {\n if (options?.sourceType === \"unambiguous\") {\n options = {\n ...options,\n };\n try {\n options.sourceType = \"module\";\n const parser = getParser(options, input);\n const ast = parser.parse();\n\n if (parser.sawUnambiguousESM) {\n return ast;\n }\n\n if (parser.ambiguousScriptDifferentAst) {\n // Top level await introduces code which can be both a valid script and\n // a valid module, but which produces different ASTs:\n // await\n // 0\n // can be parsed either as an AwaitExpression, or as two ExpressionStatements.\n try {\n options.sourceType = \"script\";\n return getParser(options, input).parse();\n } catch {}\n } else {\n // This is both a valid module and a valid script, but\n // we parse it as a script by default\n ast.program.sourceType = \"script\";\n }\n\n return ast;\n } catch (moduleError) {\n try {\n options.sourceType = \"script\";\n return getParser(options, input).parse();\n } catch {}\n\n throw moduleError;\n }\n } else {\n return getParser(options, input).parse();\n }\n}\n\nexport function parseExpression(input: string, options?: Options): Expression {\n const parser = getParser(options, input);\n if (parser.options.strictMode) {\n parser.state.strict = true;\n }\n return parser.getExpression();\n}\n\nexport { tokTypes };\n\nfunction getParser(options: ?Options, input: string): Parser {\n let cls = Parser;\n if (options?.plugins) {\n validatePlugins(options.plugins);\n cls = getParserClass(options.plugins);\n }\n\n return new cls(options, input);\n}\n\nconst parserClassCache: { [key: string]: Class<Parser> } = {};\n\n/** Get a Parser class with plugins applied. */\nfunction getParserClass(pluginsFromOptions: PluginList): Class<Parser> {\n const pluginList = mixinPluginNames.filter(name =>\n hasPlugin(pluginsFromOptions, name),\n );\n\n const key = pluginList.join(\"/\");\n let cls = parserClassCache[key];\n if (!cls) {\n cls = Parser;\n for (const plugin of pluginList) {\n cls = mixinPlugins[plugin](cls);\n }\n parserClassCache[key] = cls;\n }\n return cls;\n}\n"],"names":["beforeExpr","startsExpr","isLoop","isAssign","prefix","postfix","TokenType","constructor","label","conf","keyword","rightAssociative","binop","updateContext","keywords","Map","createKeyword","name","options","token","set","createBinop","types","num","bigint","decimal","regexp","string","privateName","eof","bracketL","bracketHashL","bracketBarL","bracketR","bracketBarR","braceL","braceBarL","braceHashL","braceR","braceBarR","parenL","parenR","comma","semi","colon","doubleColon","dot","question","questionDot","arrow","template","ellipsis","backQuote","dollarBraceL","at","hash","interpreterDirective","eq","assign","slashAssign","incDec","bang","tilde","pipeline","nullishCoalescing","logicalOR","logicalAND","bitwiseOR","bitwiseXOR","bitwiseAND","equality","relational","bitShift","plusMin","modulo","star","slash","exponent","_break","_case","_catch","_continue","_debugger","_default","_do","_else","_finally","_for","_function","_if","_return","_switch","_throw","_try","_var","_const","_while","_with","_new","_this","_super","_class","_extends","_export","_import","_null","_true","_false","_in","_instanceof","_typeof","_void","_delete","lineBreak","lineBreakG","RegExp","source","isNewLine","code","skipWhiteSpace","isWhitespace","Position","line","col","column","SourceLocation","start","end","filename","identifierName","getLineInfo","input","offset","lineStart","match","lastIndex","exec","index","BaseParser","sawUnambiguousESM","ambiguousScriptDifferentAst","hasPlugin","plugins","has","getPluginOption","plugin","get","last","stack","length","CommentsParser","addComment","comment","loc","state","trailingComments","push","leadingComments","adjustCommentsAfterTrailingComma","node","elements","takeAllComments","lastElement","i","j","commentPreviousNode","splice","newTrailingComments","leadingComment","undefined","processComment","type","body","commentStack","firstChild","lastChild","lastInStack","pop","properties","arguments","slice","innerComments","firstTrailingCommentIndex","findIndex","ErrorCodes","Object","freeze","SyntaxError","SourceTypeModuleError","ErrorMessages","makeErrorTemplates","AccessorIsGenerator","ArgumentsInClass","AsyncFunctionInSingleStatementContext","AwaitBindingIdentifier","AwaitBindingIdentifierInStaticBlock","AwaitExpressionFormalParameter","AwaitNotInAsyncContext","AwaitNotInAsyncFunction","BadGetterArity","BadSetterArity","BadSetterRestParameter","ConstructorClassField","ConstructorClassPrivateField","ConstructorIsAccessor","ConstructorIsAsync","ConstructorIsGenerator","DeclarationMissingInitializer","DecoratorBeforeExport","DecoratorConstructor","DecoratorExportClass","DecoratorSemicolon","DecoratorStaticBlock","DeletePrivateField","DestructureNamedImport","DuplicateConstructor","DuplicateDefaultExport","DuplicateExport","DuplicateProto","DuplicateRegExpFlags","ElementAfterRest","EscapedCharNotAnIdentifier","ExportBindingIsString","ExportDefaultFromAsIdentifier","ForInOfLoopInitializer","ForOfAsync","ForOfLet","GeneratorInSingleStatementContext","IllegalBreakContinue","IllegalLanguageModeDirective","IllegalReturn","ImportBindingIsString","ImportCallArgumentTrailingComma","ImportCallArity","ImportCallNotNewExpression","ImportCallSpreadArgument","InvalidBigIntLiteral","InvalidCodePoint","InvalidDecimal","InvalidDigit","InvalidEscapeSequence","InvalidEscapeSequenceTemplate","InvalidEscapedReservedWord","InvalidIdentifier","InvalidLhs","InvalidLhsBinding","InvalidNumber","InvalidOrMissingExponent","InvalidOrUnexpectedToken","InvalidParenthesizedAssignment","InvalidPrivateFieldResolution","InvalidPropertyBindingPattern","InvalidRecordProperty","InvalidRestAssignmentPattern","LabelRedeclaration","LetInLexicalBinding","LineTerminatorBeforeArrow","MalformedRegExpFlags","MissingClassName","MissingEqInAssignment","MissingSemicolon","MissingUnicodeEscape","MixingCoalesceWithLogical","ModuleAttributeDifferentFromType","ModuleAttributeInvalidValue","ModuleAttributesWithDuplicateKeys","ModuleExportNameHasLoneSurrogate","ModuleExportUndefined","MultipleDefaultsInSwitch","NewlineAfterThrow","NoCatchOrFinally","NumberIdentifier","NumericSeparatorInEscapeSequence","ObsoleteAwaitStar","OptionalChainingNoNew","OptionalChainingNoTemplate","OverrideOnConstructor","ParamDupe","PatternHasAccessor","PatternHasMethod","PipelineBodyNoArrow","PipelineBodySequenceExpression","PipelineHeadSequenceExpression","PipelineTopicUnused","PrimaryTopicNotAllowed","PrimaryTopicRequiresSmartPipeline","PrivateInExpectedIn","PrivateNameRedeclaration","RecordExpressionBarIncorrectEndSyntaxType","RecordExpressionBarIncorrectStartSyntaxType","RecordExpressionHashIncorrectStartSyntaxType","RecordNoProto","RestTrailingComma","SloppyFunction","StaticPrototype","StrictDelete","StrictEvalArguments","StrictEvalArgumentsBinding","StrictFunction","StrictNumericEscape","StrictOctalLiteral","StrictWith","SuperNotAllowed","SuperPrivateField","TrailingDecorator","TupleExpressionBarIncorrectEndSyntaxType","TupleExpressionBarIncorrectStartSyntaxType","TupleExpressionHashIncorrectStartSyntaxType","UnexpectedArgumentPlaceholder","UnexpectedAwaitAfterPipelineBody","UnexpectedDigitAfterHash","UnexpectedImportExport","UnexpectedKeyword","UnexpectedLeadingDecorator","UnexpectedLexicalDeclaration","UnexpectedNewTarget","UnexpectedNumericSeparator","UnexpectedPrivateField","UnexpectedReservedWord","UnexpectedSuper","UnexpectedToken","UnexpectedTokenUnaryExponentiation","UnsupportedBind","UnsupportedDecoratorExport","UnsupportedDefaultExport","UnsupportedImport","UnsupportedMetaProperty","UnsupportedParameterDecorator","UnsupportedPropertyDecorator","UnsupportedSuper","UnterminatedComment","UnterminatedRegExp","UnterminatedString","UnterminatedTemplate","VarRedeclaration","YieldBindingIdentifier","YieldInParameter","ZeroDigitNumericSeparator","SourceTypeModuleErrorMessages","ImportMetaOutsideModule","ImportOutsideModule","messages","templates","keys","forEach","reasonCode","ParserError","getLocationForPosition","pos","startLoc","lastTokStart","lastTokStartLoc","endLoc","lastTokEnd","lastTokEndLoc","raise","params","raiseWithData","raiseOverwrite","message","replace","_","errorRecovery","errors","error","_raise","data","errorTemplate","errorContext","err","isLookahead","superClass","parseRegExpLiteral","pattern","flags","regex","e","estreeParseLiteral","parseBigIntLiteral","value","bigInt","BigInt","String","parseDecimalLiteral","parseLiteral","parseStringLiteral","parseNumericLiteral","parseNullLiteral","parseBooleanLiteral","directiveToStmt","directive","directiveLiteral","stmt","startNodeAt","expression","extra","expressionValue","raw","finishNodeAt","initFunction","isAsync","checkDeclaration","isObjectProperty","getObjectOrClassMethodParams","method","isValidDirective","parenthesized","stmtToDirective","addExtra","parseBlockBody","args","directiveStatements","directives","map","d","concat","pushClassMethod","classBody","isGenerator","isConstructor","allowsDirectSuper","parseMethod","typeParameters","parseMaybePrivateName","convertPrivateNameToPrivateIdentifier","getPrivateNameSV","id","isPrivateName","parseFunctionBody","allowExpression","isMethod","allowDirectSuper","inClassScope","funcNode","startNode","kind","computed","finishNode","parseClassProperty","propertyNode","parseClassPrivateProperty","parseObjectMethod","prop","isPattern","isAccessor","shorthand","parseObjectProperty","startPos","refExpressionErrors","toAssignable","isLHS","toAssignableObjectExpressionProp","key","Errors","finishCallExpression","optional","callee","attributes","toReferencedArguments","parseExport","exported","specifiers","parseSubscript","base","noCalls","optionalChainMember","substring","stop","chain","startNodeAtNode","hasPropertyAsPrivateName","isOptionalChain","isObjectMethod","TokContext","preserveSpace","brace","templateQuasi","tt","context","nonASCIIidentifierStartChars","nonASCIIidentifierChars","nonASCIIidentifierStart","nonASCIIidentifier","astralIdentifierStartCodes","astralIdentifierCodes","isInAstralSet","isIdentifierStart","test","fromCharCode","isIdentifierChar","reservedWords","strict","strictBind","Set","reservedWordsStrictSet","reservedWordsStrictBindSet","isReservedWord","word","inModule","isStrictReservedWord","isStrictBindOnlyReservedWord","isStrictBindReservedWord","isKeyword","isIteratorStart","current","next","reservedWordLikeSet","canBeReservedWord","SCOPE_OTHER","SCOPE_PROGRAM","SCOPE_FUNCTION","SCOPE_ARROW","SCOPE_SIMPLE_CATCH","SCOPE_SUPER","SCOPE_DIRECT_SUPER","SCOPE_CLASS","SCOPE_STATIC_BLOCK","SCOPE_TS_MODULE","SCOPE_VAR","BIND_KIND_VALUE","BIND_KIND_TYPE","BIND_SCOPE_VAR","BIND_SCOPE_LEXICAL","BIND_SCOPE_FUNCTION","BIND_FLAGS_NONE","BIND_FLAGS_CLASS","BIND_FLAGS_TS_ENUM","BIND_FLAGS_TS_CONST_ENUM","BIND_FLAGS_TS_EXPORT_ONLY","BIND_FLAGS_FLOW_DECLARE_FN","BIND_CLASS","BIND_LEXICAL","BIND_VAR","BIND_FUNCTION","BIND_TS_INTERFACE","BIND_TS_TYPE","BIND_TS_ENUM","BIND_TS_AMBIENT","BIND_NONE","BIND_OUTSIDE","BIND_TS_CONST_ENUM","BIND_TS_NAMESPACE","BIND_FLOW_DECLARE_FN","CLASS_ELEMENT_FLAG_STATIC","CLASS_ELEMENT_KIND_GETTER","CLASS_ELEMENT_KIND_SETTER","CLASS_ELEMENT_KIND_ACCESSOR","CLASS_ELEMENT_STATIC_GETTER","CLASS_ELEMENT_STATIC_SETTER","CLASS_ELEMENT_INSTANCE_GETTER","CLASS_ELEMENT_INSTANCE_SETTER","CLASS_ELEMENT_OTHER","Scope","var","lexical","functions","ScopeHandler","scopeStack","undefinedExports","undefinedPrivateNames","inFunction","currentVarScopeFlags","allowSuper","currentThisScopeFlags","inClass","inClassAndNotInNonArrowFunction","inStaticBlock","inNonArrowFunction","treatFunctionsAsVar","treatFunctionsAsVarInScope","currentScope","createScope","enter","exit","scope","declareName","bindingType","checkRedeclarationInScope","add","maybeExportDefined","delete","isRedeclaredInScope","values","checkLocalExport","topLevelScope","FlowScope","declareFunctions","FlowScopeHandler","reservedTypes","FlowErrors","AmbiguousConditionalArrow","AmbiguousDeclareModuleKind","AssignReservedType","DeclareClassElement","DeclareClassFieldInitializer","DuplicateDeclareModuleExports","EnumBooleanMemberNotInitialized","EnumDuplicateMemberName","EnumInconsistentMemberValues","EnumInvalidExplicitType","EnumInvalidExplicitTypeUnknownSupplied","EnumInvalidMemberInitializerPrimaryType","EnumInvalidMemberInitializerSymbolType","EnumInvalidMemberInitializerUnknownType","EnumInvalidMemberName","EnumNumberMemberNotInitialized","EnumStringMemberInconsistentlyInitailized","GetterMayNotHaveThisParam","ImportTypeShorthandOnlyInPureImport","InexactInsideExact","InexactInsideNonObject","InexactVariance","InvalidNonTypeImportInDeclareModule","MissingTypeParamDefault","NestedDeclareModule","NestedFlowComment","OptionalBindingPattern","SetterMayNotHaveThisParam","SpreadVariance","ThisParamAnnotationRequired","ThisParamBannedInConstructor","ThisParamMayNotBeOptional","ThisParamMustBeFirst","ThisParamNoDefault","TypeBeforeInitializer","TypeCastInPattern","UnexpectedExplicitInexactInObject","UnexpectedReservedType","UnexpectedReservedUnderscore","UnexpectedSpaceBetweenModuloChecks","UnexpectedSpreadType","UnexpectedSubtractionOperand","UnexpectedTokenAfterTypeParameter","UnexpectedTypeParameterBeforeAsyncArrowFunction","UnsupportedDeclareExportKind","UnsupportedStatementInDeclareModule","UnterminatedFlowComment","isEsModuleType","bodyElement","declaration","hasTypeImportKind","importKind","isMaybeDefaultImport","exportSuggestions","const","let","interface","partition","list","list1","list2","FLOW_PRAGMA_REGEX","flowPragma","getScopeHandler","shouldParseTypes","shouldParseEnums","finishToken","val","matches","Error","flowParseTypeInitialiser","tok","oldInType","inType","expect","flowParseType","flowParsePredicate","moduloPos","expectContextual","eat","parseExpression","flowParseTypeAndPredicateInitialiser","predicate","flowParseDeclareClass","flowParseInterfaceish","flowParseDeclareFunction","parseIdentifier","typeNode","typeContainer","isRelational","flowParseTypeParameterDeclaration","tmp","flowParseFunctionTypeParams","rest","this","returnType","typeAnnotation","resetEndLocation","semicolon","flowParseDeclare","insideModule","flowParseDeclareVariable","eatContextual","flowParseDeclareModuleExports","flowParseDeclareModule","isContextual","flowParseDeclareTypeAlias","flowParseDeclareOpaqueType","flowParseDeclareInterface","flowParseDeclareExportDeclaration","unexpected","flowParseTypeAnnotatableIdentifier","parseExprAtom","bodyNode","parseImport","hasModuleExport","default","isLet","suggestion","exportKind","flowParseTypeAnnotation","flowParseTypeAlias","flowParseOpaqueType","isClass","flowParseRestrictedIdentifier","extends","implements","mixins","flowParseInterfaceExtends","flowParseObjectType","allowStatic","allowExact","allowSpread","allowProto","allowInexact","flowParseQualifiedTypeIdentifier","flowParseTypeParameterInstantiation","flowParseInterface","checkNotUnderscore","checkReservedType","liberal","right","declare","supertype","impltype","flowParseTypeParameter","requireDefault","nodeStart","variance","flowParseVariance","ident","bound","jsxTagStart","defaultRequired","typeParameter","expectRelational","oldNoAnonFunctionType","noAnonFunctionType","flowParseTypeParameterInstantiationCallOrNew","flowParseTypeOrImplicitInstantiation","flowParseInterfaceType","flowParseObjectPropertyKey","flowParseObjectTypeIndexer","isStatic","static","lookahead","flowParseObjectTypeInternalSlot","flowParseObjectTypeMethodish","flowParseFunctionTypeParam","flowParseObjectTypeCallProperty","valueNode","callProperties","indexers","internalSlots","endDelim","exact","inexact","protoStart","inexactStart","propOrInexact","flowParseObjectTypeProperty","flowObjectTypeSemicolon","out","isInexactToken","argument","proto","flowCheckGetterSetterParams","property","paramCount","node2","qualification","flowParseGenericType","flowParseTypeofType","flowParsePrimaryType","flowParseTupleType","first","lh","isThis","reinterpretTypeAsFunctionTypeParam","flowIdentToTypeAnnotation","isGroupedType","parseLiteralAtNode","createIdentifier","flowParsePostfixType","seenOptionalIndexedAccess","canInsertSemicolon","elementType","objectType","indexType","flowParsePrefixType","flowParseAnonFunctionWithoutParens","param","flowParseIntersectionType","flowParseUnionType","allowPrimitiveOverride","typeCastToParameter","allowExpressionBody","forwardNoArrowParamsConversionAt","parseFunctionBodyAndFinish","parseStatement","topLevel","flowParseEnumDeclaration","parseExpressionStatement","expr","shouldParseExportDeclaration","isExportDefaultSpecifier","parseExportDefaultExpression","parseConditional","refNeedsArrowPos","result","tryParse","failState","clone","originalNoArrowAt","noArrowAt","consequent","failed","tryParseConditionalConsequent","valid","invalid","getArrowLikeExpressions","alternate","parseMaybeAssign","noArrowParamsConversionAt","parseMaybeAssignAllowIn","disallowInvalid","arrows","finishArrowValidation","every","isAssignable","toAssignableList","trailingComma","checkParams","parse","indexOf","parseParenItem","typeCastNode","assertModuleNodeAllowed","decl","parseExportDeclaration","declarationNode","parseExportSpecifiers","parseExportFrom","eatExportStar","maybeParseExportNamespaceSpecifier","hasNamespace","parseClassId","isStatement","optionalId","parseClassMember","member","parseClassMemberFromModifier","isIterator","readIterator","readWord1","fullWord","getTokenFromCode","charCodeAt","finishOp","isBinding","element","operator","exprList","trailingCommaPos","toReferencedList","isParenthesizedExpr","parseArrayLike","close","canBePattern","isTuple","maybeInArrowParameters","checkLVal","isClassMethod","isClassProperty","isNonstaticConstructor","isThisParam","pushClassPrivateMethod","parseClassSuper","superTypeParameters","implemented","checkGetterSetterParams","parsePropertyName","isPrivateNameAllowed","parseObjPropValue","parseAssignableListItemTypes","parseMaybeDefault","left","shouldParseDefaultImport","parseImportSpecifierLocal","specifier","contextDescription","local","maybeParseDefaultImportSpecifier","parseImportSpecifier","firstIdentIsString","firstIdent","parseModuleExportName","specifierTypeKind","isLookaheadContextual","as_ident","imported","__clone","nodeIsTypeImport","specifierIsTypeImport","checkReservedWord","parseBindingAtom","parseFunctionParams","allowModifiers","parseVarId","parseAsyncArrowFromCallExpression","call","shouldParseAsyncArrow","afterLeftParse","jsx","tc","j_oTag","j_expr","abort","arrowExpression","resetStartLocationFromNode","maybeUnwrapTypeCastExpression","aborted","async","thrown","parseArrow","shouldParseArrow","setArrowFunctionParameters","allowDuplicates","isArrowFunction","parseParenAndDistinguishExpression","canBeArrow","parseSubscripts","parseCallExpressionArguments","parseAsyncArrowWithTypeParameters","subscriptState","isLookaheadToken_lt","typeArguments","parseNewArguments","targs","parseArrowExpression","readToken_mult_modulo","hasFlowComment","nextToken","readToken_pipe_amp","parseTopLevel","file","program","fileNode","skipBlockComment","skipFlowComment","hasFlowCommentCompletion","shiftToFirstNonWhiteSpace","includes","ch2","ch3","flowEnumErrorBooleanMemberNotInitialized","enumName","memberName","flowEnumErrorInvalidMemberName","toUpperCase","flowEnumErrorDuplicateMemberName","flowEnumErrorInconsistentMemberValues","flowEnumErrorInvalidExplicitType","suppliedType","flowEnumErrorInvalidMemberInitializer","explicitType","flowEnumErrorNumberMemberNotInitialized","flowEnumErrorStringMemberInconsistentlyInitailized","flowEnumMemberInit","endOfInit","literal","flowEnumMemberRaw","init","flowEnumCheckExplicitTypeMismatch","expectedType","flowEnumMembers","seenNames","members","booleanMembers","numberMembers","stringMembers","defaultedMembers","hasUnknownMembers","memberNode","flowEnumStringMembers","initializedMembers","flowEnumParseExplicitType","flowEnumBody","nameLoc","empty","boolsLen","numsLen","strsLen","defaultedLen","nextTokenStart","afterNext","entities","quot","amp","apos","lt","gt","nbsp","iexcl","cent","pound","curren","yen","brvbar","sect","uml","copy","ordf","laquo","not","shy","reg","macr","deg","plusmn","sup2","sup3","acute","micro","para","middot","cedil","sup1","ordm","raquo","frac14","frac12","frac34","iquest","Agrave","Aacute","Acirc","Atilde","Auml","Aring","AElig","Ccedil","Egrave","Eacute","Ecirc","Euml","Igrave","Iacute","Icirc","Iuml","ETH","Ntilde","Ograve","Oacute","Ocirc","Otilde","Ouml","times","Oslash","Ugrave","Uacute","Ucirc","Uuml","Yacute","THORN","szlig","agrave","aacute","acirc","atilde","auml","aring","aelig","ccedil","egrave","eacute","ecirc","euml","igrave","iacute","icirc","iuml","eth","ntilde","ograve","oacute","ocirc","otilde","ouml","divide","oslash","ugrave","uacute","ucirc","uuml","yacute","thorn","yuml","OElig","oelig","Scaron","scaron","Yuml","fnof","circ","Alpha","Beta","Gamma","Delta","Epsilon","Zeta","Eta","Theta","Iota","Kappa","Lambda","Mu","Nu","Xi","Omicron","Pi","Rho","Sigma","Tau","Upsilon","Phi","Chi","Psi","Omega","alpha","beta","gamma","delta","epsilon","zeta","eta","theta","iota","kappa","lambda","mu","nu","xi","omicron","pi","rho","sigmaf","sigma","tau","upsilon","phi","chi","psi","omega","thetasym","upsih","piv","ensp","emsp","thinsp","zwnj","zwj","lrm","rlm","ndash","mdash","lsquo","rsquo","sbquo","ldquo","rdquo","bdquo","dagger","Dagger","bull","hellip","permil","prime","Prime","lsaquo","rsaquo","oline","frasl","euro","image","weierp","real","trade","alefsym","larr","uarr","rarr","darr","harr","crarr","lArr","uArr","rArr","dArr","hArr","forall","part","exist","nabla","isin","notin","ni","prod","sum","minus","lowast","radic","infin","ang","and","or","cap","cup","int","there4","sim","cong","asymp","ne","equiv","le","ge","sub","sup","nsub","sube","supe","oplus","otimes","perp","sdot","lceil","rceil","lfloor","rfloor","lang","rang","loz","spades","clubs","hearts","diams","State","curLine","potentialArrowAt","inPipeline","inPropertyName","isAmbientContext","inAbstractClass","topicContext","maxNumOfResolvableTopics","maxTopicIndex","soloAwait","inFSharpPipelineDirectBody","labels","decoratorStack","comments","ct","exprAllowed","containsEsc","strictErrors","tokensLength","strictMode","sourceType","startLine","curPosition","skipArrays","Array","isArray","HEX_NUMBER","DECIMAL_NUMBER","JsxErrors","AttributeIsEmpty","MissingClosingTagElement","MissingClosingTagFragment","UnexpectedSequenceExpression","UnsupportedJsxValue","UnterminatedJsxContent","UnwrappedAdjacentJSXElements","j_cTag","jsxName","jsxText","jsxTagEnd","isFragment","object","getQualifiedJSXName","namespace","jsxReadToken","chunkStart","ch","jsxReadEntity","jsxReadNewLine","normalizeCRLF","jsxReadString","quote","str","count","entity","substr","fromCodePoint","parseInt","XHTMLEntities","jsxReadWord","jsxParseIdentifier","jsxParseNamespacedName","jsxParseElementName","newNode","jsxParseAttributeValue","jsxParseExpressionContainer","jsxParseEmptyExpression","jsxParseSpreadChild","jsxParseAttribute","jsxParseOpeningElementAt","jsxParseOpeningElementAfterName","selfClosing","jsxParseClosingElementAt","jsxParseElementAt","children","openingElement","closingElement","contents","openingFragment","closingFragment","jsxParseElement","createLookaheadState","lookaheadState","curContext","prevType","TypeScriptScope","enums","constEnums","classes","exportOnlyBindings","TypeScriptScopeHandler","isConst","wasConst","PARAM","PARAM_YIELD","PARAM_AWAIT","PARAM_RETURN","PARAM_IN","ProductionParameterHandler","stacks","currentFlags","hasAwait","hasYield","hasReturn","hasIn","functionFlags","nonNull","x","assert","TSErrors","AbstractMethodHasImplementation","AccesorCannotDeclareThisParameter","AccesorCannotHaveTypeParameters","ClassMethodHasDeclare","ClassMethodHasReadonly","ConstructorHasTypeParameters","DeclareAccessor","DeclareClassFieldHasInitializer","DeclareFunctionHasImplementation","DuplicateAccessibilityModifier","DuplicateModifier","EmptyHeritageClauseType","EmptyTypeArguments","EmptyTypeParameters","ExpectedAmbientAfterExportDeclare","ImportAliasHasImportType","IncompatibleModifiers","IndexSignatureHasAbstract","IndexSignatureHasAccessibility","IndexSignatureHasDeclare","IndexSignatureHasOverride","IndexSignatureHasStatic","InvalidModifierOnTypeMember","InvalidModifiersOrder","InvalidTupleMemberLabel","MixedLabeledAndUnlabeledElements","NonAbstractClassHasAbstractMethod","NonClassMethodPropertyHasAbstractModifer","OptionalTypeBeforeRequired","OverrideNotInSubClass","PatternIsOptional","PrivateElementHasAbstract","PrivateElementHasAccessibility","ReadonlyForMethodSignature","SetAccesorCannotHaveOptionalParameter","SetAccesorCannotHaveRestParameter","SetAccesorCannotHaveReturnType","StaticBlockCannotHaveModifier","TypeAnnotationAfterAssign","TypeImportCannotSpecifyDefaultAndNamed","UnexpectedParameterModifier","UnexpectedReadonly","UnexpectedTypeAnnotation","UnexpectedTypeCastInParameter","UnsupportedImportTypeArgument","UnsupportedParameterPropertyKind","UnsupportedSignatureParameterKind","keywordTypeFromName","tsIsAccessModifier","modifier","tsIsIdentifier","tsTokenCanFollowModifier","isLiteralPropertyName","hasPrecedingLineBreak","tsNextTokenCanFollowModifier","tsParseModifier","allowedModifiers","tsTryParse","bind","tsParseModifiers","modified","disallowedModifiers","enforceOrder","before","after","incompatible","mod1","mod2","accessibility","hasOwnProperty","tsIsListTerminator","tsParseList","parseElement","tsParseDelimitedList","tsParseDelimitedListWorker","expectSuccess","tsParseBracketedList","bracket","skipFirstToken","tsParseImportType","qualifier","tsParseEntityName","tsParseTypeArguments","allowReservedWords","tsParseTypeReference","typeName","tsParseThisTypePredicate","lhs","parameterName","tsParseTypeAnnotation","asserts","tsParseThisTypeNode","tsParseTypeQuery","exprName","tsParseTypeParameter","parseIdentifierName","constraint","tsEatThenParseType","tsTryParseTypeParameters","tsParseTypeParameters","tsTryNextParseConstantContext","tsFillSignature","returnToken","signature","returnTokenRequired","parameters","tsParseBindingListForSignature","tsParseTypeOrTypePredicateAnnotation","parseBindingList","tsParseTypeMemberSemicolon","isLineTerminator","tsParseSignatureMember","tsIsUnambiguouslyIndexSignature","tsTryParseIndexSignature","tsLookAhead","tsTryParseTypeAnnotation","tsParsePropertyOrMethodSignature","readonly","nodeAny","firstParameter","tsParseTypeMember","idx","tsParseTypeLiteral","tsParseObjectTypeMembers","tsIsStartOfMappedType","tsParseMappedTypeParameter","tsExpectThenParseType","tsParseMappedType","nameType","tsParseType","tsTryParseType","tsParseTupleType","elementTypes","tsParseTupleElementType","seenOptionalElement","labeledElements","elementNode","isLabeled","labeled","labeledNode","optionalTypeNode","restNode","tsParseParenthesizedType","tsParseFunctionOrConstructorType","abstract","tsParseLiteralTypeNode","tsParseTemplateLiteralType","parseTemplate","parseTemplateSubstitution","tsParseThisTypeOrThisTypePredicate","thisKeyword","tsParseNonArrayType","lookaheadCharCode","parseMaybeUnary","tsParseArrayTypeOrHigher","tsParseTypeOperator","tsParseTypeOperatorOrHigher","tsCheckTypeAnnotationForReadOnly","tsParseInferType","find","kw","tsParseUnionOrIntersectionType","parseConstituentType","hasLeadingOperator","tsParseIntersectionTypeOrHigher","tsParseUnionTypeOrHigher","tsIsStartOfFunctionType","tsIsUnambiguouslyStartOfFunctionType","tsSkipParameterStart","braceStackCounter","tsInType","t","tsParseTypePredicateAsserts","thisTypePredicate","typePredicateVariable","tsParseTypePredicatePrefix","tsTryParseTypeOrTypePredicateAnnotation","eatColon","tsParseNonConditionalType","checkType","extendsType","trueType","falseType","isAbstractConstructorSignature","tsParseTypeAssertion","tsNextThenParseType","tsParseHeritageClause","descriptor","originalStart","delimitedList","tsParseExpressionWithTypeArguments","tsParseInterfaceDeclaration","tsParseTypeAliasDeclaration","tsInNoContext","cb","oldContext","tsDoThenParseType","tsParseEnumMember","initializer","tsParseEnumDeclaration","tsParseModuleBlock","parseBlockOrModuleBlockBody","tsParseModuleOrNamespaceDeclaration","nested","inner","prodParam","tsParseAmbientExternalModuleDeclaration","global","tsParseImportEqualsDeclaration","isExport","moduleReference","tsParseModuleReference","tsIsExternalModuleReference","tsParseExternalModuleReference","f","res","tsTryParseAndCatch","tsTryParseDeclare","nany","starttype","tsInAmbientContext","parseFunctionStatement","parseClass","parseVarStatement","tsParseDeclaration","tsTryParseExportDeclaration","tsParseExpressionStatement","mod","tsCheckLineTerminator","tsParseAbstractDeclaration","hasFollowingLineBreak","tsTryParseGenericAsyncArrowFunction","oldMaybeInArrowParameters","tsIsDeclarationStart","parseAssignableListItem","decorators","parseAccessModifier","elt","pp","parameter","bodilessType","registerFunctionStatementId","tsCheckForInvalidTypeCasts","items","isInParens","nonNullExpression","atPossibleAsyncArrow","asyncArrowFn","parseTaggedTemplateExpression","parseExprOp","leftStartPos","leftStartLoc","minPrec","reScan_lt_gt","checkKeywords","checkDuplicateExports","ahead","importNode","isAbstractClass","cls","parseStatementContent","tsHasSomeModifiers","modifiers","some","invalidModifersForStaticBlocks","callParseClassMemberWithIsStatic","parseClassStaticBlock","parseClassMemberWithIsStatic","override","hadSuperClass","parsePostMemberNameModifiers","methodOrProp","isDeclare","resetStartLocation","parseClassPropertyAnnotation","definite","typeCast","toAssignableParenthesizedExpression","parseMaybeDecoratorArguments","checkCommaAfterRest","readToken_lt_gt","canHaveLeadingDecorator","getGetterSetterExpectedParamCount","baseCount","firstParam","hasContextParam","parseCatchClauseParam","oldIsAmbientContext","oldInAbstractClass","hasBody","shouldParseAsAmbientContext","getExpression","placeholder","PlaceHolderErrors","ClassNameIsRequired","parsePlaceholder","expectedNode","assertNoSpace","finishPlaceholder","isFinished","verifyBreakContinue","parseBlock","parseFunctionId","takeDecorators","oldStrict","parseClassBody","expectPlugin","isUnparsedContextual","startsWith","nextTokenStartSince","maybeParseExportDefaultSpecifier","checkExport","filter","hasStarImport","maybeParseStarImportSpecifier","parseNamedImportSpecifiers","parseImportSource","parseV8Intrinsic","v8IntrinsicStart","identifier","option","PIPELINE_PROPOSALS","RECORD_AND_TUPLE_SYNTAX_TYPES","validatePlugins","decoratorsBeforeExport","p","join","moduleAttributesVerionPluginOption","missingPlugins","mixinPlugins","estree","flow","typescript","v8intrinsic","placeholders","mixinPluginNames","defaultOptions","sourceFilename","allowAwaitOutsideFunction","allowReturnOutsideFunction","allowImportExportEverywhere","allowSuperOutsideMethod","allowUndeclaredExports","ranges","tokens","createParenthesizedExpressions","getOptions","opts","isDigit","VALID_REGEX_FLAGS","forbiddenNumericSeparatorSiblings","decBinOct","hex","allowedNumericSeparatorSiblings","bin","oct","dec","Token","Tokenizer","ParserErrors","pushToken","checkKeywordEscapes","old","curr","skip","codePointAtPos","cp","trail","setStrict","clear","skipSpace","readTmplToken","pushComment","block","text","skipLineComment","startSkip","loop","readToken_numberSign","readToken_interpreter","nextPos","readToken_dot","readNumber","readToken_slash","width","readToken_caret","readToken_plus_min","size","readToken_eq_excl","readToken_question","next2","readRadixNumber","readString","readWord","readRegexp","escaped","charAt","content","mods","char","charCode","readInt","radix","len","forceLen","allowNumSeparator","forbiddenSiblings","allowedSiblings","total","Infinity","prev","Number","isNaN","isBigInt","startsWithDot","isFloat","isDecimal","hasExponent","isOctal","hasLeadingZero","integer","recordStrictModeErrors","underscorePos","parseFloat","readCodePoint","throwOnInvalid","codePos","readHexChar","readEscapedChar","containsInvalid","inTemplate","octalStr","octal","n","firstCode","escStart","identifierCheck","esc","keywordTypes","ClassScope","privateNames","loneAccessors","ClassScopeHandler","oldClassScope","from","declarePrivateName","classScope","redefined","accessor","oldStatic","newStatic","oldKind","newKind","usePrivateName","kExpression","kMaybeArrowParameterDeclaration","kMaybeAsyncArrowParameterDeclaration","kParameterDeclaration","ExpressionScope","canBeArrowParameterDeclaration","isCertainlyParameterDeclaration","ArrowHeadParsingScope","recordDeclarationError","clearDeclarationError","iterateErrors","iterator","ExpressionScopeHandler","recordParameterInitializerError","recordParenthesizedIdentifierError","recordAsyncArrowParametersError","validateAsPattern","newParameterDeclarationScope","newArrowHeadScope","newAsyncArrowScope","newExpressionScope","UtilParser","op","nameStart","nameEnd","nextCh","allowAsi","messageOrType","missingPlugin","expectOnePlugin","names","fn","oldState","abortSignal","checkExpressionErrors","andThrow","shorthandAssign","doubleProto","initializeScopes","oldLabels","oldExportedIdentifiers","exportedIdentifiers","oldInModule","oldScope","oldProdParam","oldExpressionScope","expressionScope","enterInitialScopes","paramFlags","ExpressionErrors","Node","parser","range","NodeUtils","locationNode","unwrapParenthesizedExpression","LValParser","isLast","raiseRestNotLast","checkToRestConversion","arg","raiseTrailingCommaAfterRest","toReferencedListDeep","parseSpread","parseRestBinding","parseObjectLike","closeCharCode","allowEmpty","elts","parseDecorator","checkClashes","disallowLetBinding","strictModeChanged","elem","ExpressionParser","checkProto","isRecord","protoRef","used","shouldExitDescending","disallowIn","disallowInAnd","parseExpressionBase","allowInAnd","expressions","parseMaybeAssignDisallowIn","parseYield","ownExpressionErrors","parseMaybeConditional","parseExprOps","prec","checkPipelineAtInfixOperator","logical","coalesce","parseExprOpRightExpr","nextOp","withTopicPermittingContext","parseSmartPipelineBody","parseExprOpBaseRightExpr","withSoloAwaitPermittingContext","parseFSharpPipelineBody","checkExponentialAfterUnary","sawUnary","isAwait","isAwaitAllowed","parseAwait","parseModuleExpression","update","isDelete","parseUpdate","isAmbiguousAwait","parseExprSubscripts","maybeAsyncArrow","parseBind","parseCoverCallAndAsyncArrowHead","parseMember","parsePrivateName","parseNoCallExpr","tag","quasi","dynamicImport","allowPlaceholder","nodeForExtra","oldInFSharpPipelineDirectBody","parseExprListItem","parseSuper","parseImportMetaProperty","parseFunction","parseAsyncArrowUnaryFunction","parseDo","parseFunctionOrFunctionSent","parseDecorators","parseNewOrNewTarget","primaryTopicReferenceIsAllowedInCurrentTopicContext","registerTopicReference","lookaheadCh","codePointAt","isPrivate","meta","parseMetaProperty","propertyName","SourceTypeModuleErrors","innerStartPos","innerStartLoc","spreadStart","optionalCommaStart","spreadNodeStartPos","spreadNodeStartLoc","innerEndPos","innerEndLoc","arrowNode","parenExpression","metaProp","parseNew","parseExprList","parseTemplateElement","isTagged","cooked","tail","curElt","quasis","propHash","create","parsePropertyDefinition","maybeAsyncOrAccessorProp","keyName","oldInPropertyName","generator","isExpression","hasStrictModeDirective","nonSimple","isSimpleParamList","errorPos","functionStatement","functionExpression","reservedTest","delegating","delegate","childExpression","checkSmartPipelineBodyEarlyErrors","parseSmartPipelineBodyInStyle","isSimpleReference","topicReferenceWasUsedInCurrentTopicContext","callback","outerContextTopicState","withTopicForbiddingContext","outerContextSoloAwaitState","prodParamToSet","prodParamToClear","ret","revertScopes","parseProgram","loopLabel","switchLabel","FUNC_NO_FLAGS","FUNC_STATEMENT","FUNC_HANGING_STATEMENT","FUNC_NULLABLE_ID","loneSurrogate","keywordRelationalOperator","babel7CompatTokens","hashEndPos","hashEndLoc","StatementParser","interpreter","parseInterpreterDirective","isLetKeyword","matched","endCh","parseBreakContinueStatement","parseDebuggerStatement","parseDoStatement","parseForStatement","parseIfStatement","parseReturnStatement","parseSwitchStatement","parseThrowStatement","parseTryStatement","parseWhileStatement","parseWithStatement","parseEmptyStatement","nextTokenCharCode","isAsyncFunction","maybeName","parseLabeledStatement","allowExport","currentContextDecorators","decorator","isBreak","lab","parseHeaderExpression","awaitAt","parseFor","startsWithLet","parseVar","declarations","parseForIn","startsWithUnescapedName","isForOf","description","declarationPosition","discriminant","cases","cur","sawDefault","isCase","simple","handler","clause","finalizer","statementStart","allowDirectives","createNewLexicalScope","afterBlockParse","parsedNonDirective","isForIn","await","isFor","isTypescript","statement","isHangingStatement","requireId","hadConstructor","publicMethod","privateMethod","publicProp","privateProp","publicMember","parseClassElementName","isSimple","maybeQuestionTokenStart","pushClassPrivateProperty","pushClassProperty","parseInitializer","hasDefault","parseAfterDefault","hasStar","parseAfterNamespace","isFromRequired","hasSpecifiers","maybeParseExportNamedSpecifiers","hasDeclaration","maybeParseExportDeclaration","l","hasFrom","nextAfterFrom","assertions","maybeParseImportAssertions","checkNames","isDefault","isFrom","exportedName","nodes","surrogate","toString","parseNext","maybeParseModuleAttributes","parseAssertEntries","attrs","attrNames","importedIsString","Parser","pluginsMap","pluginMap","getParser","ast","moduleError","getParserClass","parserClassCache","pluginsFromOptions","pluginList"],"mappings":";;;;AAwBA,MAAMA,UAAU,GAAG,IAAnB;AACA,MAAMC,UAAU,GAAG,IAAnB;AACA,MAAMC,MAAM,GAAG,IAAf;AACA,MAAMC,QAAQ,GAAG,IAAjB;AACA,MAAMC,MAAM,GAAG,IAAf;AACA,MAAMC,OAAO,GAAG,IAAhB;AAcO,MAAMC,SAAN,CAAgB;AAarBC,EAAAA,WAAW,CAACC,KAAD,EAAgBC,IAAkB,GAAG,EAArC,EAAyC;AAAA,SAZpDD,KAYoD;AAAA,SAXpDE,OAWoD;AAAA,SAVpDV,UAUoD;AAAA,SATpDC,UASoD;AAAA,SARpDU,gBAQoD;AAAA,SAPpDT,MAOoD;AAAA,SANpDC,QAMoD;AAAA,SALpDC,MAKoD;AAAA,SAJpDC,OAIoD;AAAA,SAHpDO,KAGoD;AAAA,SAFpDC,aAEoD;AAClD,SAAKL,KAAL,GAAaA,KAAb;AACA,SAAKE,OAAL,GAAeD,IAAI,CAACC,OAApB;AACA,SAAKV,UAAL,GAAkB,CAAC,CAACS,IAAI,CAACT,UAAzB;AACA,SAAKC,UAAL,GAAkB,CAAC,CAACQ,IAAI,CAACR,UAAzB;AACA,SAAKU,gBAAL,GAAwB,CAAC,CAACF,IAAI,CAACE,gBAA/B;AACA,SAAKT,MAAL,GAAc,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