1 |
- {"version":3,"file":"index.js","sources":["../src/util/location.js","../src/parse-error/credentials.js","../src/parse-error/module-errors.js","../src/parse-error/to-node-description.js","../src/parse-error/standard-errors.js","../src/parse-error/strict-mode-errors.js","../src/parse-error/pipeline-operator-errors.js","../src/parse-error.js","../src/plugins/estree.js","../src/tokenizer/context.js","../src/tokenizer/types.js","../../babel-helper-validator-identifier/src/identifier.ts","../../babel-helper-validator-identifier/src/keyword.ts","../src/util/identifier.js","../src/util/scopeflags.js","../src/parser/base.js","../src/parser/comments.js","../src/util/whitespace.js","../src/tokenizer/state.js","../src/tokenizer/index.js","../src/util/scope.js","../src/plugins/flow/scope.js","../src/util/class-scope.js","../src/util/expression-scope.js","../src/util/production-parameter.js","../src/parser/util.js","../src/parser/node.js","../src/plugins/flow/index.js","../src/plugins/jsx/xhtml.js","../src/plugins/jsx/index.js","../src/plugins/typescript/scope.js","../src/plugins/typescript/index.js","../src/plugins/placeholders.js","../src/plugins/v8intrinsic.js","../src/plugin-utils.js","../src/options.js","../src/parser/lval.js","../src/parser/expression.js","../src/parser/statement.js","../src/parser/index.js","../src/index.js"],"sourcesContent":["// @flow\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 index: number;\n\n constructor(line: number, col: number, index: number) {\n this.line = line;\n this.column = col;\n this.index = index;\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/**\n * creates a new position with a non-zero column offset from the given position.\n * This function should be only be used when we create AST node out of the token\n * boundaries, such as TemplateElement ends before tt.templateNonTail. This\n * function does not skip whitespaces.\n *\n * @export\n * @param {Position} position\n * @param {number} columnOffset\n * @returns {Position}\n */\nexport function createPositionWithColumnOffset(\n position: Position,\n columnOffset: number,\n) {\n const { line, column, index } = position;\n return new Position(line, column + columnOffset, index + columnOffset);\n}\n","// @flow\n\nexport const ParseErrorCodes = Object.freeze({\n SyntaxError: \"BABEL_PARSER_SYNTAX_ERROR\",\n SourceTypeModuleError: \"BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED\",\n});\n\nexport type ParseErrorCode = $Values<typeof ParseErrorCodes>;\n\nexport type SyntaxPlugin =\n | \"flow\"\n | \"typescript\"\n | \"jsx\"\n | \"pipelineOperator\"\n | \"placeholders\";\n\nexport type ToMessage<ErrorDetails> = (self: ErrorDetails) => string;\n\nexport type ParseErrorCredentials<ErrorDetails> = {\n code: ParseErrorCode,\n reasonCode: string,\n syntaxPlugin?: SyntaxPlugin,\n\n toMessage: ToMessage<ErrorDetails>,\n};\n\nconst reflect = (keys: string[], last = keys.length - 1) => ({\n get() {\n return keys.reduce((object, key) => object[key], this);\n },\n set(value) {\n keys.reduce(\n (item, key, i) => (i === last ? (item[key] = value) : item[key]),\n this,\n );\n },\n});\n\nconst instantiate = <T>(\n constructor: () => any,\n properties: Object,\n descriptors: Object,\n) =>\n Object.keys(descriptors)\n .map(key => [key, descriptors[key]])\n .filter(([, descriptor]) => !!descriptor)\n .map(([key, descriptor]) => [\n key,\n typeof descriptor === \"function\"\n ? { value: descriptor, enumerable: false }\n : typeof descriptor.reflect === \"string\"\n ? { ...descriptor, ...reflect(descriptor.reflect.split(\".\")) }\n : descriptor,\n ])\n .reduce(\n (instance, [key, descriptor]) =>\n Object.defineProperty(instance, key, {\n configurable: true,\n ...descriptor,\n }),\n Object.assign((new constructor(): T), properties),\n );\n\nexport { instantiate };\n","// @flow\n\nimport { ParseErrorCodes, toParseErrorCredentials } from \"../parse-error\";\n\nexport default (_: typeof toParseErrorCredentials) => ({\n ImportMetaOutsideModule: _(\n `import.meta may appear only with 'sourceType: \"module\"'`,\n { code: ParseErrorCodes.SourceTypeModuleError },\n ),\n ImportOutsideModule: _(\n `'import' and 'export' may appear only with 'sourceType: \"module\"'`,\n { code: ParseErrorCodes.SourceTypeModuleError },\n ),\n});\n","const NodeDescriptions = {\n ArrayPattern: \"array destructuring pattern\",\n AssignmentExpression: \"assignment expression\",\n AssignmentPattern: \"assignment expression\",\n ArrowFunctionExpression: \"arrow function expression\",\n ConditionalExpression: \"conditional expression\",\n ForOfStatement: \"for-of statement\",\n ForInStatement: \"for-in statement\",\n ForStatement: \"for-loop\",\n FormalParameters: \"function parameter list\",\n Identifier: \"identifier\",\n ObjectPattern: \"object destructuring pattern\",\n ParenthesizedExpression: \"parenthesized expression\",\n RestElement: \"rest element\",\n UpdateExpression: {\n true: \"prefix operation\",\n false: \"postfix operation\",\n },\n VariableDeclarator: \"variable declaration\",\n YieldExpression: \"yield expression\",\n};\n\ntype NodeTypesWithDescriptions = $Keys<\n $Diff<typeof NodeDescriptions, { UpdateExpression: any }>,\n>;\ntype NodeWithDescription =\n | { type: \"UpdateExpression\", prefix: boolean }\n | { type: NodeTypesWithDescriptions };\n\n// eslint-disable-next-line no-confusing-arrow\nconst toNodeDescription = ({ type, prefix }: NodeWithDescription) =>\n type === \"UpdateExpression\"\n ? NodeDescriptions.UpdateExpression[String(prefix)]\n : NodeDescriptions[type];\n\nexport default toNodeDescription;\n","// @flow\n\nimport { toParseErrorCredentials } from \"../parse-error\";\nimport toNodeDescription from \"./to-node-description\";\n\nexport type LValAncestor =\n | { type: \"UpdateExpression\", prefix: boolean }\n | {\n type:\n | \"ArrayPattern\"\n | \"AssignmentExpression\"\n | \"CatchClause\"\n | \"ForOfStatement\"\n | \"FormalParameters\"\n | \"ForInStatement\"\n | \"ForStatement\"\n | \"Identfier\"\n | \"ObjectPattern\"\n | \"RestElement\"\n | \"VariableDeclarator\",\n };\n\nexport default (_: typeof toParseErrorCredentials) => ({\n AccessorIsGenerator: _<{| kind: \"get\" | \"set\" |}>(\n ({ kind }) => `A ${kind}ter cannot be a generator.`,\n ),\n\n ArgumentsInClass: _(\n \"'arguments' is only allowed in functions and class methods.\",\n ),\n AsyncFunctionInSingleStatementContext: _(\n \"Async functions can only be declared at the top level or inside a block.\",\n ),\n AwaitBindingIdentifier: _(\n \"Can not use 'await' as identifier inside an async function.\",\n ),\n AwaitBindingIdentifierInStaticBlock: _(\n \"Can not use 'await' as identifier inside a static block.\",\n ),\n AwaitExpressionFormalParameter: _(\n \"'await' is not allowed in async function parameters.\",\n ),\n AwaitNotInAsyncContext: _(\n \"'await' is only allowed within async functions and at the top levels of modules.\",\n ),\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 ),\n ConstructorClassField: _(\"Classes may not have a field named 'constructor'.\"),\n ConstructorClassPrivateField: _(\n \"Classes may not have a private field named '#constructor'.\",\n ),\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: _<{| kind: \"const\" | \"destructuring\" |}>(\n ({ kind }) => `Missing initializer in ${kind} declaration.`,\n ),\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 ),\n DecoratorConstructor: _(\n \"Decorators can't be used with a constructor. Did you mean '@dec class { ... }'?\",\n ),\n DecoratorExportClass: _(\n \"Using the export keyword between a decorator and a class is not allowed. Please use `export @dec class` instead.\",\n ),\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 ),\n DuplicateConstructor: _(\"Duplicate constructor in the same class.\"),\n DuplicateDefaultExport: _(\"Only one default export allowed per module.\"),\n DuplicateExport: _<{| exportName: string |}>(\n ({ exportName }) =>\n `\\`${exportName}\\` has already been exported. Exported identifiers must be unique.`,\n ),\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: _<{| localName: string, exportName: string |}>(\n ({ localName, exportName }) =>\n `A string literal cannot be used as an exported binding without \\`from\\`.\\n- Did you mean \\`export { '${localName}' as '${exportName}' } from 'some-module'\\`?`,\n ),\n ExportDefaultFromAsIdentifier: _(\n \"'from' is not allowed as an identifier after 'export default'.\",\n ),\n\n ForInOfLoopInitializer: _<{| type: \"ForInStatement\" | \"ForOfStatement\" |}>(\n ({ type }) =>\n `'${\n type === \"ForInStatement\" ? \"for-in\" : \"for-of\"\n }' loop variable declaration may not have an initializer.`,\n ),\n\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 ),\n\n IllegalBreakContinue: _<{| type: \"BreakStatement\" | \"ContinueStatement\" |}>(\n ({ type }) =>\n `Unsyntactic ${type === \"BreakStatement\" ? \"break\" : \"continue\"}.`,\n ),\n\n IllegalLanguageModeDirective: _(\n \"Illegal 'use strict' directive in function with non-simple parameter list.\",\n ),\n IllegalReturn: _(\"'return' outside of function.\"),\n ImportBindingIsString: _<{| importName: string |}>(\n ({ importName }) =>\n `A string literal cannot be used as an imported binding.\\n- Did you mean \\`import { \"${importName}\" as foo }\\`?`,\n ),\n ImportCallArgumentTrailingComma: _(\n \"Trailing comma is disallowed inside import(...) arguments.\",\n ),\n ImportCallArity: _<{| maxArgumentCount: 1 | 2 |}>(\n ({ maxArgumentCount }) =>\n `\\`import()\\` requires exactly ${\n maxArgumentCount === 1 ? \"one argument\" : \"one or two arguments\"\n }.`,\n ),\n ImportCallNotNewExpression: _(\"Cannot use new with import(...).\"),\n ImportCallSpreadArgument: _(\"`...` is not allowed in `import()`.\"),\n IncompatibleRegExpUVFlags: _(\n \"The 'u' and 'v' regular expression flags cannot be enabled at the same time.\",\n ),\n InvalidBigIntLiteral: _(\"Invalid BigIntLiteral.\"),\n InvalidCodePoint: _(\"Code point out of bounds.\"),\n InvalidCoverInitializedName: _(\"Invalid shorthand property initializer.\"),\n InvalidDecimal: _(\"Invalid decimal.\"),\n InvalidDigit: _<{| radix: number |}>(\n ({ radix }) => `Expected number in radix ${radix}.`,\n ),\n InvalidEscapeSequence: _(\"Bad character escape sequence.\"),\n InvalidEscapeSequenceTemplate: _(\"Invalid escape sequence in template.\"),\n InvalidEscapedReservedWord: _<{| reservedWord: string |}>(\n ({ reservedWord }) => `Escape sequence in keyword ${reservedWord}.`,\n ),\n InvalidIdentifier: _<{| identifierName: string |}>(\n ({ identifierName }) => `Invalid identifier ${identifierName}.`,\n ),\n InvalidLhs: _<{| ancestor: LValAncestor |}>(\n ({ ancestor }) =>\n `Invalid left-hand side in ${toNodeDescription(ancestor)}.`,\n ),\n InvalidLhsBinding: _<{| ancestor: LValAncestor |}>(\n ({ ancestor }) =>\n `Binding invalid left-hand side in ${toNodeDescription(ancestor)}.`,\n ),\n InvalidNumber: _(\"Invalid number.\"),\n InvalidOrMissingExponent: _(\n \"Floating-point numbers require a valid exponent after the 'e'.\",\n ),\n InvalidOrUnexpectedToken: _<{| unexpected: string |}>(\n ({ unexpected }) => `Unexpected character '${unexpected}'.`,\n ),\n InvalidParenthesizedAssignment: _(\n \"Invalid parenthesized assignment pattern.\",\n ),\n InvalidPrivateFieldResolution: _<{| identifierName: string |}>(\n ({ identifierName }) => `Private name #${identifierName} is not defined.`,\n ),\n InvalidPropertyBindingPattern: _(\"Binding member expression.\"),\n InvalidRecordProperty: _(\n \"Only properties and spread elements are allowed in record definitions.\",\n ),\n InvalidRestAssignmentPattern: _(\"Invalid rest operator's argument.\"),\n LabelRedeclaration: _<{| labelName: string |}>(\n ({ labelName }) => `Label '${labelName}' is already declared.`,\n ),\n LetInLexicalBinding: _(\n \"'let' is not allowed to be used as a name in 'let' or 'const' declarations.\",\n ),\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 ),\n MissingSemicolon: _(\"Missing semicolon.\"),\n MissingPlugin: _<{| missingPlugin: [string] |}>(\n ({ missingPlugin }) =>\n `This experimental syntax requires enabling the parser plugin: ${missingPlugin\n .map(name => JSON.stringify(name))\n .join(\", \")}.`,\n ),\n // FIXME: Would be nice to make this \"missingPlugins\" instead.\n // Also), seems like we can drop the \"(s)\" from the message and just make it \"s\".\n MissingOneOfPlugins: _<{| missingPlugin: string[] |}>(\n ({ missingPlugin }) =>\n `This experimental syntax requires enabling one of the following parser plugin(s): ${missingPlugin\n .map(name => JSON.stringify(name))\n .join(\", \")}.`,\n ),\n MissingUnicodeEscape: _(\"Expecting Unicode escape sequence \\\\uXXXX.\"),\n MixingCoalesceWithLogical: _(\n \"Nullish coalescing operator(??) requires parens when mixing with logical operators.\",\n ),\n ModuleAttributeDifferentFromType: _(\n \"The only accepted module attribute is `type`.\",\n ),\n ModuleAttributeInvalidValue: _(\n \"Only string literals are allowed as module attribute values.\",\n ),\n ModuleAttributesWithDuplicateKeys: _<{| key: string |}>(\n ({ key }) => `Duplicate key \"${key}\" is not allowed in module attributes.`,\n ),\n ModuleExportNameHasLoneSurrogate: _<{| surrogateCharCode: number |}>(\n ({ surrogateCharCode }) =>\n `An export name cannot include a lone surrogate, found '\\\\u${surrogateCharCode.toString(\n 16,\n )}'.`,\n ),\n ModuleExportUndefined: _<{| localName: string |}>(\n ({ localName }) => `Export '${localName}' is not defined.`,\n ),\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 ),\n ObsoleteAwaitStar: _(\n \"'await*' has been removed from the async functions proposal. Use Promise.all() instead.\",\n ),\n OptionalChainingNoNew: _(\n \"Constructors in/after an Optional Chain are not allowed.\",\n ),\n OptionalChainingNoTemplate: _(\n \"Tagged Template Literals are not allowed in optionalChain.\",\n ),\n OverrideOnConstructor: _(\n \"'override' modifier cannot appear on a constructor declaration.\",\n ),\n ParamDupe: _(\"Argument name clash.\"),\n PatternHasAccessor: _(\"Object pattern can't contain getter or setter.\"),\n PatternHasMethod: _(\"Object pattern can't contain methods.\"),\n PrivateInExpectedIn: _<{| identifierName: string |}>(\n ({ identifierName }) =>\n `Private names are only allowed in property accesses (\\`obj.#${identifierName}\\`) or in \\`in\\` expressions (\\`#${identifierName} in obj\\`).`,\n ),\n PrivateNameRedeclaration: _<{| identifierName: string |}>(\n ({ identifierName }) => `Duplicate private name #${identifierName}.`,\n ),\n RecordExpressionBarIncorrectEndSyntaxType: _(\n \"Record expressions ending with '|}' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.\",\n ),\n RecordExpressionBarIncorrectStartSyntaxType: _(\n \"Record expressions starting with '{|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.\",\n ),\n RecordExpressionHashIncorrectStartSyntaxType: _(\n \"Record expressions starting with '#{' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.\",\n ),\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 ),\n StaticPrototype: _(\"Classes may not have static property named prototype.\"),\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 ),\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 ),\n TupleExpressionBarIncorrectStartSyntaxType: _(\n \"Tuple expressions starting with '[|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.\",\n ),\n TupleExpressionHashIncorrectStartSyntaxType: _(\n \"Tuple expressions starting with '#[' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.\",\n ),\n UnexpectedArgumentPlaceholder: _(\"Unexpected argument placeholder.\"),\n UnexpectedAwaitAfterPipelineBody: _(\n 'Unexpected \"await\" after pipeline body; await must have parentheses in minimal proposal.',\n ),\n UnexpectedDigitAfterHash: _(\"Unexpected digit after hash token.\"),\n UnexpectedImportExport: _(\n \"'import' and 'export' may only appear at the top level.\",\n ),\n UnexpectedKeyword: _<{| keyword: string |}>(\n ({ keyword }) => `Unexpected keyword '${keyword}'.`,\n ),\n UnexpectedLeadingDecorator: _(\n \"Leading decorators must be attached to a class declaration.\",\n ),\n UnexpectedLexicalDeclaration: _(\n \"Lexical declaration cannot appear in a single-statement context.\",\n ),\n UnexpectedNewTarget: _(\n \"`new.target` can only be used in functions or class properties.\",\n ),\n UnexpectedNumericSeparator: _(\n \"A numeric separator is only allowed between two digits.\",\n ),\n UnexpectedPrivateField: _(\"Unexpected private name.\"),\n UnexpectedReservedWord: _<{| reservedWord: string |}>(\n ({ reservedWord }) => `Unexpected reserved word '${reservedWord}'.`,\n ),\n UnexpectedSuper: _(\"'super' is only allowed in object methods and classes.\"),\n UnexpectedToken: _<{|\n expected?: ?string,\n unexpected?: ?string,\n |}>(\n ({ expected, unexpected }) =>\n `Unexpected token${unexpected ? ` '${unexpected}'.` : \"\"}${\n expected ? `, expected \"${expected}\"` : \"\"\n }`,\n ),\n UnexpectedTokenUnaryExponentiation: _(\n \"Illegal expression. Wrap left hand side or entire exponentiation in parentheses.\",\n ),\n UnsupportedBind: _(\"Binding should be performed on object property.\"),\n UnsupportedDecoratorExport: _(\n \"A decorated export must export a class declaration.\",\n ),\n UnsupportedDefaultExport: _(\n \"Only expressions, functions or classes are allowed as the `default` export.\",\n ),\n UnsupportedImport: _(\n \"`import` can only be used in `import()` or `import.meta`.\",\n ),\n UnsupportedMetaProperty: _<{|\n target: string,\n onlyValidPropertyName: string,\n |}>(\n ({ target, onlyValidPropertyName }) =>\n `The only valid meta property for ${target} is ${target}.${onlyValidPropertyName}.`,\n ),\n UnsupportedParameterDecorator: _(\n \"Decorators cannot be used to decorate parameters.\",\n ),\n UnsupportedPropertyDecorator: _(\n \"Decorators cannot be used to decorate object literal properties.\",\n ),\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 ),\n UnterminatedComment: _(\"Unterminated comment.\"),\n UnterminatedRegExp: _(\"Unterminated regular expression.\"),\n UnterminatedString: _(\"Unterminated string constant.\"),\n UnterminatedTemplate: _(\"Unterminated template.\"),\n VarRedeclaration: _<{| identifierName: string |}>(\n ({ identifierName }) =>\n `Identifier '${identifierName}' has already been declared.`,\n ),\n YieldBindingIdentifier: _(\n \"Can not use 'yield' as identifier inside a generator.\",\n ),\n YieldInParameter: _(\"Yield expression is not allowed in formal parameters.\"),\n ZeroDigitNumericSeparator: _(\n \"Numeric separator can not be used after leading 0.\",\n ),\n});\n","// @flow\n\nimport { toParseErrorCredentials } from \"../parse-error\";\n\nexport default (_: typeof toParseErrorCredentials) => ({\n StrictDelete: _(\"Deleting local variable in strict mode.\"),\n\n // `referenceName` is the StringValue[1] of an IdentifierReference[2], which\n // is represented as just an `Identifier`[3] in the Babel AST.\n // 1. https://tc39.es/ecma262/#sec-static-semantics-stringvalue\n // 2. https://tc39.es/ecma262/#prod-IdentifierReference\n // 3. https://github.com/babel/babel/blob/main/packages/babel-parser/ast/spec.md#identifier\n StrictEvalArguments: _<{| referenceName: string |}>(\n ({ referenceName }) => `Assigning to '${referenceName}' in strict mode.`,\n ),\n // `bindingName` is the StringValue[1] of a BindingIdentifier[2], which is\n // represented as just an `Identifier`[3] in the Babel AST.\n // 1. https://tc39.es/ecma262/#sec-static-semantics-stringvalue\n // 2. https://tc39.es/ecma262/#prod-BindingIdentifier\n // 3. https://github.com/babel/babel/blob/main/packages/babel-parser/ast/spec.md#identifier\n StrictEvalArgumentsBinding: _<{| bindingName: string |}>(\n ({ bindingName }) => `Binding '${bindingName}' in strict mode.`,\n ),\n\n StrictFunction: _(\n \"In strict mode code, functions can only be declared at top level or inside a block.\",\n ),\n StrictNumericEscape: _(\n \"The only valid numeric escape in strict mode is '\\\\0'.\",\n ),\n StrictOctalLiteral: _(\n \"Legacy octal literals are not allowed in strict mode.\",\n ),\n StrictWith: _(\"'with' in strict mode.\"),\n});\n","// @flow\n\nimport { toParseErrorCredentials } from \"../parse-error\";\nimport toNodeDescription from \"./to-node-description\";\n\nexport const UnparenthesizedPipeBodyDescriptions = new Set<string>([\n \"ArrowFunctionExpression\",\n \"AssignmentExpression\",\n \"ConditionalExpression\",\n \"YieldExpression\",\n]);\n\nexport default (_: typeof toParseErrorCredentials) => ({\n // This error is only used by the smart-mix proposal\n PipeBodyIsTighter: _(\n \"Unexpected yield after pipeline body; any yield expression acting as Hack-style pipe body must be parenthesized due to its loose operator precedence.\",\n ),\n PipeTopicRequiresHackPipes: _(\n 'Topic reference is used, but the pipelineOperator plugin was not passed a \"proposal\": \"hack\" or \"smart\" option.',\n ),\n PipeTopicUnbound: _(\n \"Topic reference is unbound; it must be inside a pipe body.\",\n ),\n PipeTopicUnconfiguredToken: _<{| token: string |}>(\n ({ token }) =>\n `Invalid topic token ${token}. In order to use ${token} as a topic reference, the pipelineOperator plugin must be configured with { \"proposal\": \"hack\", \"topicToken\": \"${token}\" }.`,\n ),\n PipeTopicUnused: _(\n \"Hack-style pipe body does not contain a topic reference; Hack-style pipes must use topic at least once.\",\n ),\n PipeUnparenthesizedBody: _<{| type: string |}>(\n ({ type }) =>\n `Hack-style pipe body cannot be an unparenthesized ${toNodeDescription({\n type,\n })}; please wrap it in parentheses.`,\n ),\n\n // Messages whose codes start with “Pipeline” or “PrimaryTopic”\n // are retained for backwards compatibility\n // with the deprecated smart-mix pipe operator proposal plugin.\n // They are subject to removal in a future major version.\n PipelineBodyNoArrow: _(\n 'Unexpected arrow \"=>\" after pipeline body; arrow function in pipeline body must be parenthesized.',\n ),\n PipelineBodySequenceExpression: _(\n \"Pipeline body may not be a comma-separated sequence expression.\",\n ),\n PipelineHeadSequenceExpression: _(\n \"Pipeline head should not be a comma-separated sequence expression.\",\n ),\n PipelineTopicUnused: _(\n \"Pipeline is in topic style but does not use topic reference.\",\n ),\n PrimaryTopicNotAllowed: _(\n \"Topic reference was used in a lexical context without topic binding.\",\n ),\n PrimaryTopicRequiresSmartPipeline: _(\n 'Topic reference is used, but the pipelineOperator plugin was not passed a \"proposal\": \"hack\" or \"smart\" option.',\n ),\n});\n","// @flow\n\nimport { Position } from \"./util/location\";\nimport type { NodeBase } from \"./types\";\nimport {\n instantiate,\n type ParseErrorCode,\n ParseErrorCodes,\n type ParseErrorCredentials,\n} from \"./parse-error/credentials\";\n\n// Babel uses \"normal\" SyntaxErrors for it's errors, but adds some extra\n// functionality. This functionality is defined in the\n// `ParseErrorSpecification` interface below. We may choose to change to someday\n// give our errors their own full-blown class, but until then this allow us to\n// keep all the desirable properties of SyntaxErrors (like their name in stack\n// traces, etc.), and also allows us to punt on any publicly facing\n// class-hierarchy decisions until Babel 8.\ninterface ParseErrorSpecification<ErrorDetails> {\n // Look, these *could* be readonly, but then Flow complains when we initially\n // set them. We could do a whole dance and make a special interface that's not\n // readonly for when we create the error, then cast it to the readonly\n // interface for public use, but the previous implementation didn't have them\n // as readonly, so let's just not worry about it for now.\n code: ParseErrorCode;\n reasonCode: string;\n syntaxPlugin?: string;\n\n missingPlugin?: string | string[];\n\n loc: Position;\n details: ErrorDetails;\n\n // We should consider removing this as it now just contains the same\n // information as `loc.index`.\n // pos: number;\n}\n\nexport type ParseError<ErrorDetails> = SyntaxError &\n ParseErrorSpecification<ErrorDetails>;\n\n// By `ParseErrorConstructor`, we mean something like the new-less style\n// `ErrorConstructor`[1], since `ParseError`'s are not themselves actually\n// separate classes from `SyntaxError`'s.\n//\n// 1. https://github.com/microsoft/TypeScript/blob/v4.5.5/lib/lib.es5.d.ts#L1027\nexport type ParseErrorConstructor<ErrorDetails> = ({\n loc: Position,\n details: ErrorDetails,\n}) => ParseError<ErrorDetails>;\n\nfunction toParseErrorConstructor<ErrorDetails: Object>({\n toMessage,\n ...properties\n}: ParseErrorCredentials<ErrorDetails>): ParseErrorConstructor<ErrorDetails> {\n type ConstructorArgument = { loc: Position, details: ErrorDetails };\n return function constructor({ loc, details }: ConstructorArgument) {\n return instantiate<ParseError<ErrorDetails>>(\n SyntaxError,\n { ...properties, loc },\n {\n clone(overrides: { loc?: Position, details?: ErrorDetails } = {}) {\n const loc = overrides.loc || {};\n return constructor({\n loc: new Position(\n \"line\" in loc ? loc.line : this.loc.line,\n \"column\" in loc ? loc.column : this.loc.column,\n \"index\" in loc ? loc.index : this.loc.index,\n ),\n details: { ...this.details, ...overrides.details },\n });\n },\n details: { value: details, enumerable: false },\n message: {\n get() {\n return `${toMessage(this.details)} (${this.loc.line}:${\n this.loc.column\n })`;\n },\n set(value: string) {\n Object.defineProperty(this, \"message\", { value });\n },\n },\n pos: { reflect: \"loc.index\", enumerable: true },\n missingPlugin: \"missingPlugin\" in details && {\n reflect: \"details.missingPlugin\",\n enumerable: true,\n },\n },\n );\n };\n}\n\n// This part is tricky. You'll probably notice from the name of this function\n// that it is supposed to return `ParseErrorCredentials`, but instead these.\n// declarations seem to instead imply that they return\n// `ParseErrorConstructor<ErrorDetails>` instead. This is because in Flow we\n// can't easily extract parameter types (either from functions, like with\n// Typescript's Parameters<f> utility type, or from generic types either). As\n// such, this function does double duty: packaging up the credentials during\n// its actual runtime operation, but pretending to return the\n// `ParseErrorConstructor<ErrorDetails>` that we won't actually have until later\n// to the type system, avoiding the need to do so with $ObjMap (which doesn't\n// work) in `ParseErrorEnum`. This hack won't be necessary when we switch to\n// Typescript.\ndeclare function toParseErrorCredentials<T: string>(\n T,\n ?{ code?: ParseErrorCode, reasonCode?: string } | boolean,\n): ParseErrorConstructor<{||}>;\n\n// ESLint seems to erroneously think that Flow's overloading syntax is an\n// accidental redeclaration of the function:\n// https://github.com/babel/eslint-plugin-babel/issues/162\n// eslint-disable-next-line no-redeclare\ndeclare function toParseErrorCredentials<ErrorDetails>(\n (ErrorDetails) => string,\n ?{ code?: ParseErrorCode, reasonCode?: string } | boolean,\n): ParseErrorConstructor<ErrorDetails>;\n\n// See comment about eslint and Flow overloading above.\n// eslint-disable-next-line no-redeclare\nexport function toParseErrorCredentials(toMessageOrMessage, credentials) {\n return {\n toMessage:\n typeof toMessageOrMessage === \"string\"\n ? () => toMessageOrMessage\n : toMessageOrMessage,\n ...credentials,\n };\n}\n\n// This is the templated form.\ndeclare function ParseErrorEnum(string[]): typeof ParseErrorEnum;\n\n// See comment about eslint and Flow overloading above.\n// eslint-disable-next-line no-redeclare\ndeclare function ParseErrorEnum<T>(\n toParseErrorCredentials: (typeof toParseErrorCredentials) => T,\n syntaxPlugin?: string,\n): T;\n\n// You call `ParseErrorEnum` with a mapping from `ReasonCode`'s to either error\n// messages, or `toMessage` functions that define additional necessary `details`\n// needed by the `ParseError`:\n//\n// ParseErrorEnum`optionalSyntaxPlugin` (_ => ({\n// ErrorWithStaticMessage: _(\"message\"),\n// ErrorWithDynamicMessage: _<{ type: string }>(({ type }) => `${type}`),\n// });\n//\n// See comment about eslint and Flow overloading above.\n// eslint-disable-next-line no-redeclare\nexport function ParseErrorEnum(argument, syntaxPlugin) {\n // If the first parameter is an array, that means we were called with a tagged\n // template literal. Extract the syntaxPlugin from this, and call again in\n // the \"normalized\" form.\n if (Array.isArray(argument)) {\n return toParseErrorCredentialsMap =>\n ParseErrorEnum(toParseErrorCredentialsMap, argument[0]);\n }\n\n const partialCredentials = argument(toParseErrorCredentials);\n const ParseErrorConstructors = {};\n\n for (const reasonCode of Object.keys(partialCredentials)) {\n ParseErrorConstructors[reasonCode] = toParseErrorConstructor({\n code: ParseErrorCodes.SyntaxError,\n reasonCode,\n ...(syntaxPlugin ? { syntaxPlugin } : {}),\n ...partialCredentials[reasonCode],\n });\n }\n\n return ParseErrorConstructors;\n}\n\nexport type RaiseProperties<ErrorDetails> = {|\n ...ErrorDetails,\n at: Position | NodeBase,\n|};\n\nimport ModuleErrors from \"./parse-error/module-errors\";\nimport StandardErrors from \"./parse-error/standard-errors\";\nimport StrictModeErrors from \"./parse-error/strict-mode-errors\";\nimport PipelineOperatorErrors from \"./parse-error/pipeline-operator-errors\";\n\nexport const Errors = {\n ...ParseErrorEnum(ModuleErrors),\n ...ParseErrorEnum(StandardErrors),\n ...ParseErrorEnum(StrictModeErrors),\n ...ParseErrorEnum`pipelineOperator`(PipelineOperatorErrors),\n};\n\nexport type { LValAncestor } from \"./parse-error/standard-errors\";\n\nexport * from \"./parse-error/credentials\";\n","// @flow\n\nimport { type TokenType } from \"../tokenizer/types\";\nimport type Parser from \"../parser\";\nimport type { ExpressionErrors } from \"../parser/util\";\nimport * as N from \"../types\";\nimport type { Node as NodeType, NodeBase, File } from \"../types\";\nimport type { Position } from \"../util/location\";\nimport { Errors } from \"../parse-error\";\n\nconst { defineProperty } = Object;\nconst toUnenumerable = (object, key) =>\n defineProperty(object, key, { enumerable: false, value: object[key] });\n\nfunction toESTreeLocation(node: any) {\n toUnenumerable(node.loc.start, \"index\");\n toUnenumerable(node.loc.end, \"index\");\n\n return node;\n}\n\nexport default (superClass: Class<Parser>): Class<Parser> =>\n class extends superClass {\n parse(): File {\n const file = toESTreeLocation(super.parse());\n\n if (this.options.tokens) {\n file.tokens = file.tokens.map(toESTreeLocation);\n }\n\n return file;\n }\n\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.loc.end,\n );\n stmt.directive = directiveLiteral.extra.raw.slice(1, -1);\n\n return this.finishNodeAt(stmt, \"ExpressionStatement\", directive.loc.end);\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 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 parsePrivateName(): any {\n const node = super.parsePrivateName();\n if (!process.env.BABEL_8_BREAKING) {\n if (!this.getPluginOption(\"estree\", \"classFeatures\")) {\n return node;\n }\n }\n return this.convertPrivateNameToPrivateIdentifier(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 (!process.env.BABEL_8_BREAKING) {\n if (!this.getPluginOption(\"estree\", \"classFeatures\")) {\n return super.isPrivateName(node);\n }\n }\n return node.type === \"PrivateIdentifier\";\n }\n\n getPrivateNameSV(node: N.Node): string {\n if (!process.env.BABEL_8_BREAKING) {\n if (!this.getPluginOption(\"estree\", \"classFeatures\")) {\n return super.getPrivateNameSV(node);\n }\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 (!process.env.BABEL_8_BREAKING) {\n if (!this.getPluginOption(\"estree\", \"classFeatures\")) {\n return (propertyNode: N.EstreePropertyDefinition);\n }\n }\n propertyNode.type = \"PropertyDefinition\";\n return (propertyNode: N.EstreePropertyDefinition);\n }\n\n parseClassPrivateProperty(...args: [N.ClassPrivateProperty]): any {\n const propertyNode = (super.parseClassPrivateProperty(...args): any);\n if (!process.env.BABEL_8_BREAKING) {\n if (!this.getPluginOption(\"estree\", \"classFeatures\")) {\n return (propertyNode: N.EstreePropertyDefinition);\n }\n }\n propertyNode.type = \"PropertyDefinition\";\n propertyNode.computed = false;\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 isValidLVal(type: string, ...rest) {\n return type === \"Property\" ? \"value\" : super.isValidLVal(type, ...rest);\n }\n\n isAssignable(node: N.Node, isBinding?: boolean): boolean {\n if (node != null && this.isObjectProperty(node)) {\n return this.isAssignable(node.value, isBinding);\n }\n return super.isAssignable(node, isBinding);\n }\n\n toAssignable(node: N.Node, isLHS: boolean = false): N.Node {\n if (node != null && this.isObjectProperty(node)) {\n const { key, value } = node;\n if (this.isPrivateName(key)) {\n this.classScope.usePrivateName(\n this.getPrivateNameSV(key),\n key.loc.start,\n );\n }\n this.toAssignable(value, isLHS);\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(Errors.PatternHasAccessor, { at: prop.key });\n } else if (prop.method) {\n this.raise(Errors.PatternHasMethod, { at: prop.key });\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 finishNodeAt<T: NodeType>(node: T, type: string, endLoc: Position): T {\n return toESTreeLocation(super.finishNodeAt(node, type, endLoc));\n }\n\n resetEndLocation(\n node: NodeBase,\n endLoc?: Position = this.state.lastTokEndLoc,\n ): void {\n super.resetEndLocation(node, endLoc);\n toESTreeLocation(node);\n }\n };\n","// @flow\n\n// The token context is used in JSX plugin to track\n// jsx tag / jsx text / normal JavaScript expression\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\nconst types: {\n [key: string]: TokContext,\n} = {\n brace: new TokContext(\"{\"), // normal JavaScript expression\n j_oTag: new TokContext(\"<tag\"), // JSX openning tag\n j_cTag: new TokContext(\"</tag\"), // JSX closing tag\n j_expr: new TokContext(\"<tag>...</tag>\", true), // JSX expressions\n};\n\nif (!process.env.BABEL_8_BREAKING) {\n types.template = new TokContext(\"`\", true);\n}\n\nexport { types };\n","// @flow\nimport { types as tc, 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\n// Internally the tokenizer stores token as a number\nexport opaque type TokenType = number;\n\n// The `ExportedTokenType` is exported via `tokTypes` and accessible\n// when `tokens: true` is enabled. Unlike internal token type, it provides\n// metadata of the tokens.\nexport class ExportedTokenType {\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 // todo(Babel 8): remove updateContext from exposed token layout\n declare 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 if (!process.env.BABEL_8_BREAKING) {\n this.updateContext = null;\n }\n }\n}\n\n// A map from keyword/keyword-like string value to the token type\nexport const keywords = new Map<string, TokenType>();\n\nfunction createKeyword(name: string, options: TokenOptions = {}): TokenType {\n options.keyword = name;\n const token = createToken(name, options);\n keywords.set(name, token);\n return token;\n}\n\nfunction createBinop(name: string, binop: number) {\n return createToken(name, { beforeExpr, binop });\n}\n\nlet tokenTypeCounter = -1;\nexport const tokenTypes: ExportedTokenType[] = [];\nconst tokenLabels: string[] = [];\nconst tokenBinops: number[] = [];\nconst tokenBeforeExprs: boolean[] = [];\nconst tokenStartsExprs: boolean[] = [];\nconst tokenPrefixes: boolean[] = [];\n\nfunction createToken(name: string, options: TokenOptions = {}): TokenType {\n ++tokenTypeCounter;\n tokenLabels.push(name);\n tokenBinops.push(options.binop ?? -1);\n tokenBeforeExprs.push(options.beforeExpr ?? false);\n tokenStartsExprs.push(options.startsExpr ?? false);\n tokenPrefixes.push(options.prefix ?? false);\n tokenTypes.push(new ExportedTokenType(name, options));\n\n return tokenTypeCounter;\n}\n\nfunction createKeywordLike(\n name: string,\n options: TokenOptions = {},\n): TokenType {\n ++tokenTypeCounter;\n keywords.set(name, tokenTypeCounter);\n tokenLabels.push(name);\n tokenBinops.push(options.binop ?? -1);\n tokenBeforeExprs.push(options.beforeExpr ?? false);\n tokenStartsExprs.push(options.startsExpr ?? false);\n tokenPrefixes.push(options.prefix ?? false);\n // In the exported token type, we set the label as \"name\" for backward compatibility with Babel 7\n tokenTypes.push(new ExportedTokenType(\"name\", options));\n\n return tokenTypeCounter;\n}\n\n// For performance the token type helpers depend on the following declarations order.\n// When adding new token types, please also check if the token helpers need update.\n\nexport const tt: { [name: string]: TokenType } = {\n // Punctuation token types.\n bracketL: createToken(\"[\", { beforeExpr, startsExpr }),\n bracketHashL: createToken(\"#[\", { beforeExpr, startsExpr }),\n bracketBarL: createToken(\"[|\", { beforeExpr, startsExpr }),\n bracketR: createToken(\"]\"),\n bracketBarR: createToken(\"|]\"),\n braceL: createToken(\"{\", { beforeExpr, startsExpr }),\n braceBarL: createToken(\"{|\", { beforeExpr, startsExpr }),\n braceHashL: createToken(\"#{\", { beforeExpr, startsExpr }),\n braceR: createToken(\"}\", { beforeExpr }),\n braceBarR: createToken(\"|}\"),\n parenL: createToken(\"(\", { beforeExpr, startsExpr }),\n parenR: createToken(\")\"),\n comma: createToken(\",\", { beforeExpr }),\n semi: createToken(\";\", { beforeExpr }),\n colon: createToken(\":\", { beforeExpr }),\n doubleColon: createToken(\"::\", { beforeExpr }),\n dot: createToken(\".\"),\n question: createToken(\"?\", { beforeExpr }),\n questionDot: createToken(\"?.\"),\n arrow: createToken(\"=>\", { beforeExpr }),\n template: createToken(\"template\"),\n ellipsis: createToken(\"...\", { beforeExpr }),\n backQuote: createToken(\"`\", { startsExpr }),\n dollarBraceL: createToken(\"${\", { beforeExpr, startsExpr }),\n // start: isTemplate\n templateTail: createToken(\"...`\", { startsExpr }),\n templateNonTail: createToken(\"...${\", { beforeExpr, startsExpr }),\n // end: isTemplate\n at: createToken(\"@\"),\n hash: createToken(\"#\", { startsExpr }),\n\n // Special hashbang token.\n interpreterDirective: createToken(\"#!...\"),\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 // start: isAssign\n eq: createToken(\"=\", { beforeExpr, isAssign }),\n assign: createToken(\"_=\", { beforeExpr, isAssign }),\n slashAssign: createToken(\"_=\", { beforeExpr, isAssign }),\n // These are only needed to support % and ^ as a Hack-pipe topic token.\n // When the proposal settles on a token, the others can be merged with\n // tt.assign.\n xorAssign: createToken(\"_=\", { beforeExpr, isAssign }),\n moduloAssign: createToken(\"_=\", { beforeExpr, isAssign }),\n // end: isAssign\n\n incDec: createToken(\"++/--\", { prefix, postfix, startsExpr }),\n bang: createToken(\"!\", { beforeExpr, prefix, startsExpr }),\n tilde: createToken(\"~\", { beforeExpr, prefix, startsExpr }),\n\n // More possible topic tokens.\n // When the proposal settles on a token, at least one of these may be removed.\n doubleCaret: createToken(\"^^\", { startsExpr }),\n doubleAt: createToken(\"@@\", { startsExpr }),\n\n // start: isBinop\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 lt: createBinop(\"</>/<=/>=\", 7),\n gt: createBinop(\"</>/<=/>=\", 7),\n relational: createBinop(\"</>/<=/>=\", 7),\n bitShift: createBinop(\"<</>>/>>>\", 8),\n bitShiftL: createBinop(\"<</>>/>>>\", 8),\n bitShiftR: createBinop(\"<</>>/>>>\", 8),\n plusMin: createToken(\"+/-\", { beforeExpr, binop: 9, prefix, startsExpr }),\n // startsExpr: required by v8intrinsic plugin\n modulo: createToken(\"%\", { binop: 10, startsExpr }),\n // unset `beforeExpr` as it can be `function *`\n star: createToken(\"*\", { binop: 10 }),\n slash: createBinop(\"/\", 10),\n exponent: createToken(\"**\", {\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 // start: isLiteralPropertyName\n // start: isKeyword\n _in: createKeyword(\"in\", { beforeExpr, binop: 7 }),\n _instanceof: createKeyword(\"instanceof\", { beforeExpr, binop: 7 }),\n // end: isBinop\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 _else: createKeyword(\"else\", { beforeExpr }),\n _finally: createKeyword(\"finally\"),\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 _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 _typeof: createKeyword(\"typeof\", { beforeExpr, prefix, startsExpr }),\n _void: createKeyword(\"void\", { beforeExpr, prefix, startsExpr }),\n _delete: createKeyword(\"delete\", { beforeExpr, prefix, startsExpr }),\n // start: isLoop\n _do: createKeyword(\"do\", { isLoop, beforeExpr }),\n _for: createKeyword(\"for\", { isLoop }),\n _while: createKeyword(\"while\", { isLoop }),\n // end: isLoop\n // end: isKeyword\n\n // Primary literals\n // start: isIdentifier\n _as: createKeywordLike(\"as\", { startsExpr }),\n _assert: createKeywordLike(\"assert\", { startsExpr }),\n _async: createKeywordLike(\"async\", { startsExpr }),\n _await: createKeywordLike(\"await\", { startsExpr }),\n _from: createKeywordLike(\"from\", { startsExpr }),\n _get: createKeywordLike(\"get\", { startsExpr }),\n _let: createKeywordLike(\"let\", { startsExpr }),\n _meta: createKeywordLike(\"meta\", { startsExpr }),\n _of: createKeywordLike(\"of\", { startsExpr }),\n _sent: createKeywordLike(\"sent\", { startsExpr }),\n _set: createKeywordLike(\"set\", { startsExpr }),\n _static: createKeywordLike(\"static\", { startsExpr }),\n _yield: createKeywordLike(\"yield\", { startsExpr }),\n\n // Flow and TypeScript Keywordlike\n _asserts: createKeywordLike(\"asserts\", { startsExpr }),\n _checks: createKeywordLike(\"checks\", { startsExpr }),\n _exports: createKeywordLike(\"exports\", { startsExpr }),\n _global: createKeywordLike(\"global\", { startsExpr }),\n _implements: createKeywordLike(\"implements\", { startsExpr }),\n _intrinsic: createKeywordLike(\"intrinsic\", { startsExpr }),\n _infer: createKeywordLike(\"infer\", { startsExpr }),\n _is: createKeywordLike(\"is\", { startsExpr }),\n _mixins: createKeywordLike(\"mixins\", { startsExpr }),\n _proto: createKeywordLike(\"proto\", { startsExpr }),\n _require: createKeywordLike(\"require\", { startsExpr }),\n // start: isTSTypeOperator\n _keyof: createKeywordLike(\"keyof\", { startsExpr }),\n _readonly: createKeywordLike(\"readonly\", { startsExpr }),\n _unique: createKeywordLike(\"unique\", { startsExpr }),\n // end: isTSTypeOperator\n // start: isTSDeclarationStart\n _abstract: createKeywordLike(\"abstract\", { startsExpr }),\n _declare: createKeywordLike(\"declare\", { startsExpr }),\n _enum: createKeywordLike(\"enum\", { startsExpr }),\n _module: createKeywordLike(\"module\", { startsExpr }),\n _namespace: createKeywordLike(\"namespace\", { startsExpr }),\n // start: isFlowInterfaceOrTypeOrOpaque\n _interface: createKeywordLike(\"interface\", { startsExpr }),\n _type: createKeywordLike(\"type\", { startsExpr }),\n // end: isTSDeclarationStart\n _opaque: createKeywordLike(\"opaque\", { startsExpr }),\n // end: isFlowInterfaceOrTypeOrOpaque\n name: createToken(\"name\", { startsExpr }),\n // end: isIdentifier\n\n string: createToken(\"string\", { startsExpr }),\n num: createToken(\"num\", { startsExpr }),\n bigint: createToken(\"bigint\", { startsExpr }),\n decimal: createToken(\"decimal\", { startsExpr }),\n // end: isLiteralPropertyName\n regexp: createToken(\"regexp\", { startsExpr }),\n privateName: createToken(\"#name\", { startsExpr }),\n eof: createToken(\"eof\"),\n\n // jsx plugin\n jsxName: createToken(\"jsxName\"),\n jsxText: createToken(\"jsxText\", { beforeExpr: true }),\n jsxTagStart: createToken(\"jsxTagStart\", { startsExpr: true }),\n jsxTagEnd: createToken(\"jsxTagEnd\"),\n\n // placeholder plugin\n placeholder: createToken(\"%%\", { startsExpr: true }),\n};\n\nexport function tokenIsIdentifier(token: TokenType): boolean {\n return token >= tt._as && token <= tt.name;\n}\n\nexport function tokenKeywordOrIdentifierIsKeyword(token: TokenType): boolean {\n // we can remove the token >= tt._in check when we\n // know a token is either keyword or identifier\n return token <= tt._while;\n}\n\nexport function tokenIsKeywordOrIdentifier(token: TokenType): boolean {\n return token >= tt._in && token <= tt.name;\n}\n\nexport function tokenIsLiteralPropertyName(token: TokenType): boolean {\n return token >= tt._in && token <= tt.decimal;\n}\n\nexport function tokenComesBeforeExpression(token: TokenType): boolean {\n return tokenBeforeExprs[token];\n}\n\nexport function tokenCanStartExpression(token: TokenType): boolean {\n return tokenStartsExprs[token];\n}\n\nexport function tokenIsAssignment(token: TokenType): boolean {\n return token >= tt.eq && token <= tt.moduloAssign;\n}\n\nexport function tokenIsFlowInterfaceOrTypeOrOpaque(token: TokenType): boolean {\n return token >= tt._interface && token <= tt._opaque;\n}\n\nexport function tokenIsLoop(token: TokenType): boolean {\n return token >= tt._do && token <= tt._while;\n}\n\nexport function tokenIsKeyword(token: TokenType): boolean {\n return token >= tt._in && token <= tt._while;\n}\n\nexport function tokenIsOperator(token: TokenType): boolean {\n return token >= tt.pipeline && token <= tt._instanceof;\n}\n\nexport function tokenIsPostfix(token: TokenType): boolean {\n return token === tt.incDec;\n}\n\nexport function tokenIsPrefix(token: TokenType): boolean {\n return tokenPrefixes[token];\n}\n\nexport function tokenIsTSTypeOperator(token: TokenType): boolean {\n return token >= tt._keyof && token <= tt._unique;\n}\n\nexport function tokenIsTSDeclarationStart(token: TokenType): boolean {\n return token >= tt._abstract && token <= tt._type;\n}\n\nexport function tokenLabelName(token: TokenType): string {\n return tokenLabels[token];\n}\n\nexport function tokenOperatorPrecedence(token: TokenType): number {\n return tokenBinops[token];\n}\n\nexport function tokenIsRightAssociative(token: TokenType): boolean {\n return token === tt.exponent;\n}\n\nexport function tokenIsTemplate(token: TokenType): boolean {\n return token >= tt.templateTail && token <= tt.templateNonTail;\n}\n\nexport function getExportedToken(token: TokenType): ExportedTokenType {\n return tokenTypes[token];\n}\n\nexport function isTokenType(obj: any): boolean {\n return typeof obj === \"number\";\n}\n\nif (!process.env.BABEL_8_BREAKING) {\n tokenTypes[tt.braceR].updateContext = context => {\n context.pop();\n };\n\n tokenTypes[tt.braceL].updateContext =\n tokenTypes[tt.braceHashL].updateContext =\n tokenTypes[tt.dollarBraceL].updateContext =\n context => {\n context.push(tc.brace);\n };\n\n tokenTypes[tt.backQuote].updateContext = context => {\n if (context[context.length - 1] === tc.template) {\n context.pop();\n } else {\n context.push(tc.template);\n }\n };\n\n tokenTypes[tt.jsxTagStart].updateContext = context => {\n context.push(tc.j_expr, tc.j_oTag);\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\\u0870-\\u0887\\u0889-\\u088e\\u08a0-\\u08c9\\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\\u0c5d\\u0c60\\u0c61\\u0c80\\u0c85-\\u0c8c\\u0c8e-\\u0c90\\u0c92-\\u0ca8\\u0caa-\\u0cb3\\u0cb5-\\u0cb9\\u0cbd\\u0cdd\\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-\\u1711\\u171f-\\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-\\u1b4c\\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-\\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-\\ua48c\\ua4d0-\\ua4fd\\ua500-\\ua60c\\ua610-\\ua61f\\ua62a\\ua62b\\ua640-\\ua66e\\ua67f-\\ua69d\\ua6a0-\\ua6ef\\ua717-\\ua71f\\ua722-\\ua788\\ua78b-\\ua7ca\\ua7d0\\ua7d1\\ua7d3\\ua7d5-\\ua7d9\\ua7f2-\\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\\u0898-\\u089f\\u08ca-\\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\\u0c3c\\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-\\u1715\\u1732-\\u1734\\u1752\\u1753\\u1772\\u1773\\u17b4-\\u17d3\\u17dd\\u17e0-\\u17e9\\u180b-\\u180d\\u180f-\\u1819\\u18a9\\u1920-\\u192b\\u1930-\\u193b\\u1946-\\u194f\\u19d0-\\u19da\\u1a17-\\u1a1b\\u1a55-\\u1a5e\\u1a60-\\u1a7c\\u1a7f-\\u1a89\\u1a90-\\u1a99\\u1ab0-\\u1abd\\u1abf-\\u1ace\\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-\\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 */\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,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,68,310,10,21,11,7,25,5,2,41,2,8,70,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,43,17,47,20,28,22,13,52,58,1,3,0,14,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,38,6,186,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,19,72,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,2637,96,16,1070,4050,582,8634,568,8,30,18,78,18,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,8936,3,2,6,2,1,2,290,46,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,1845,30,482,44,11,6,17,0,322,29,19,43,1269,6,2,3,2,1,2,14,2,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,42719,33,4152,8,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,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,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,87,9,39,4,60,6,26,9,1014,0,2,54,8,3,82,0,12,1,19628,1,4706,45,3,22,543,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,357,0,62,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\";\nimport { isIdentifierStart } from \"@babel/helper-validator-identifier\";\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(\n current: number,\n next: number,\n next2: number,\n): boolean {\n return (\n current === charCodes.atSign &&\n next === charCodes.atSign &&\n isIdentifierStart(next2)\n );\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\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 // This method accepts either a string (plugin name) or an array pair\n // (plugin name and options object). If an options object is given,\n // then each value is non-recursively checked for identity with that\n // plugin’s actual option value.\n hasPlugin(pluginConfig: PluginConfig): boolean {\n if (typeof pluginConfig === \"string\") {\n return this.plugins.has(pluginConfig);\n } else {\n const [pluginName, pluginOptions] = pluginConfig;\n if (!this.hasPlugin(pluginName)) {\n return false;\n }\n const actualOptions = this.plugins.get(pluginName);\n for (const key of Object.keys(pluginOptions)) {\n if (actualOptions?.[key] !== pluginOptions[key]) {\n return false;\n }\n }\n return true;\n }\n }\n\n getPluginOption(plugin: string, name: string) {\n return this.plugins.get(plugin)?.[name];\n }\n}\n\nexport type PluginConfig = string | [string, { [string]: any }];\n","// @flow\n\n/*:: declare var invariant; */\n\nimport BaseParser from \"./base\";\nimport type { Comment, Node } from \"../types\";\nimport * as charCodes from \"charcodes\";\n\n/**\n * A whitespace token containing comments\n * @typedef CommentWhitespace\n * @type {object}\n * @property {number} start - the start of the whitespace token.\n * @property {number} end - the end of the whitespace token.\n * @property {Array<Comment>} comments - the containing comments\n * @property {Node | null} leadingNode - the immediately preceding AST node of the whitespace token\n * @property {Node | null} trailingNode - the immediately following AST node of the whitespace token\n * @property {Node | null} containingNode - the innermost AST node containing the whitespace\n * with minimal size (|end - start|)\n */\nexport type CommentWhitespace = {\n start: number,\n end: number,\n comments: Array<Comment>,\n leadingNode: Node | null,\n trailingNode: Node | null,\n containingNode: Node | null,\n};\n\n/**\n * Merge comments with node's trailingComments or assign comments to be\n * trailingComments. New comments will be placed before old comments\n * because the commentStack is enumerated reversely.\n *\n * @param {Node} node\n * @param {Array<Comment>} comments\n */\nfunction setTrailingComments(node: Node, comments: Array<Comment>) {\n if (node.trailingComments === undefined) {\n node.trailingComments = comments;\n } else {\n node.trailingComments.unshift(...comments);\n }\n}\n\n/**\n * Merge comments with node's leadingComments or assign comments to be\n * leadingComments. New comments will be placed before old comments\n * because the commentStack is enumerated reversely.\n *\n * @param {Node} node\n * @param {Array<Comment>} comments\n */\nfunction setLeadingComments(node: Node, comments: Array<Comment>) {\n if (node.leadingComments === undefined) {\n node.leadingComments = comments;\n } else {\n node.leadingComments.unshift(...comments);\n }\n}\n\n/**\n * Merge comments with node's innerComments or assign comments to be\n * innerComments. New comments will be placed before old comments\n * because the commentStack is enumerated reversely.\n *\n * @param {Node} node\n * @param {Array<Comment>} comments\n */\nexport function setInnerComments(node: Node, comments: Array<Comment>) {\n if (node.innerComments === undefined) {\n node.innerComments = comments;\n } else {\n node.innerComments.unshift(...comments);\n }\n}\n\n/**\n * Given node and elements array, if elements has non-null element,\n * merge comments to its trailingComments, otherwise merge comments\n * to node's innerComments\n *\n * @param {Node} node\n * @param {Array<Node>} elements\n * @param {Array<Comment>} comments\n */\nfunction adjustInnerComments(\n node: Node,\n elements: Array<Node>,\n commentWS: CommentWhitespace,\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 || lastElement.start > commentWS.start) {\n setInnerComments(node, commentWS.comments);\n } else {\n setTrailingComments(lastElement, commentWS.comments);\n }\n}\n\n/** @class CommentsParser */\nexport default class CommentsParser extends BaseParser {\n addComment(comment: Comment): void {\n if (this.filename) comment.loc.filename = this.filename;\n this.state.comments.push(comment);\n }\n\n /**\n * Given a newly created AST node _n_, attach _n_ to a comment whitespace _w_ if applicable\n * {@see {@link CommentWhitespace}}\n *\n * @param {Node} node\n * @returns {void}\n * @memberof CommentsParser\n */\n processComment(node: Node): void {\n const { commentStack } = this.state;\n const commentStackLength = commentStack.length;\n if (commentStackLength === 0) return;\n let i = commentStackLength - 1;\n const lastCommentWS = commentStack[i];\n\n if (lastCommentWS.start === node.end) {\n lastCommentWS.leadingNode = node;\n i--;\n }\n\n const { start: nodeStart } = node;\n // invariant: for all 0 <= j <= i, let c = commentStack[j], c must satisfy c.end < node.end\n for (; i >= 0; i--) {\n const commentWS = commentStack[i];\n const commentEnd = commentWS.end;\n if (commentEnd > nodeStart) {\n // by definition of commentWhiteSpace, this implies commentWS.start > nodeStart\n // so node can be a containingNode candidate. At this time we can finalize the comment\n // whitespace, because\n // 1) its leadingNode or trailingNode, if exists, will not change\n // 2) its containingNode have been assigned and will not change because it is the\n // innermost minimal-sized AST node\n commentWS.containingNode = node;\n this.finalizeComment(commentWS);\n commentStack.splice(i, 1);\n } else {\n if (commentEnd === nodeStart) {\n commentWS.trailingNode = node;\n }\n // stop the loop when commentEnd <= nodeStart\n break;\n }\n }\n }\n\n /**\n * Assign the comments of comment whitespaces to related AST nodes.\n * Also adjust innerComments following trailing comma.\n *\n * @memberof CommentsParser\n */\n finalizeComment(commentWS: CommentWhitespace) {\n const { comments } = commentWS;\n if (commentWS.leadingNode !== null || commentWS.trailingNode !== null) {\n if (commentWS.leadingNode !== null) {\n setTrailingComments(commentWS.leadingNode, comments);\n }\n if (commentWS.trailingNode !== null) {\n setLeadingComments(commentWS.trailingNode, comments);\n }\n } else {\n /*:: invariant(commentWS.containingNode !== null) */\n const { containingNode: node, start: commentStart } = commentWS;\n if (this.input.charCodeAt(commentStart - 1) === charCodes.comma) {\n // If a commentWhitespace follows a comma and the containingNode allows\n // list structures with trailing comma, merge it to the trailingComment\n // of the last non-null list element\n switch (node.type) {\n case \"ObjectExpression\":\n case \"ObjectPattern\":\n case \"RecordExpression\":\n adjustInnerComments(node, node.properties, commentWS);\n break;\n case \"CallExpression\":\n case \"OptionalCallExpression\":\n adjustInnerComments(node, node.arguments, commentWS);\n break;\n case \"FunctionDeclaration\":\n case \"FunctionExpression\":\n case \"ArrowFunctionExpression\":\n case \"ObjectMethod\":\n case \"ClassMethod\":\n case \"ClassPrivateMethod\":\n adjustInnerComments(node, node.params, commentWS);\n break;\n case \"ArrayExpression\":\n case \"ArrayPattern\":\n case \"TupleExpression\":\n adjustInnerComments(node, node.elements, commentWS);\n break;\n case \"ExportNamedDeclaration\":\n case \"ImportDeclaration\":\n adjustInnerComments(node, node.specifiers, commentWS);\n break;\n default: {\n setInnerComments(node, comments);\n }\n }\n } else {\n setInnerComments(node, comments);\n }\n }\n }\n\n /**\n * Drains remaning commentStack and applies finalizeComment\n * to each comment whitespace. Used only in parseExpression\n * where the top level AST node is _not_ Program\n * {@see {@link CommentsParser#finalizeComment}}\n *\n * @memberof CommentsParser\n */\n finalizeRemainingComments() {\n const { commentStack } = this.state;\n for (let i = commentStack.length - 1; i >= 0; i--) {\n this.finalizeComment(commentStack[i]);\n }\n this.state.commentStack = [];\n }\n\n /**\n * Reset previous node trailing comments. Used in object / class\n * property parsing. We parse `async`, `static`, `set` and `get`\n * as an identifier but may reinterepret it into an async/static/accessor\n * method later. In this case the identifier is not part of the AST and we\n * should sync the knowledge to commentStacks\n *\n * For example, when parsing */\n // async /* 1 */ function f() {}\n /*\n * the comment whitespace \"* 1 *\" has leading node Identifier(async). When\n * we see the function token, we create a Function node and mark \"* 1 *\" as\n * inner comments. So \"* 1 *\" should be detached from the Identifier node.\n *\n * @param {N.Node} node the last finished AST node _before_ current token\n * @returns\n * @memberof CommentsParser\n */\n resetPreviousNodeTrailingComments(node: Node) {\n const { commentStack } = this.state;\n const { length } = commentStack;\n if (length === 0) return;\n const commentWS = commentStack[length - 1];\n if (commentWS.leadingNode === node) {\n commentWS.leadingNode = null;\n }\n }\n\n /**\n * Attach a node to the comment whitespaces right before/after\n * the given range.\n *\n * This is used to properly attach comments around parenthesized\n * expressions as leading/trailing comments of the inner expression.\n *\n * @param {Node} node\n * @param {number} start\n * @param {number} end\n */\n takeSurroundingComments(node: Node, start: number, end: number) {\n const { commentStack } = this.state;\n const commentStackLength = commentStack.length;\n if (commentStackLength === 0) return;\n let i = commentStackLength - 1;\n\n for (; i >= 0; i--) {\n const commentWS = commentStack[i];\n const commentEnd = commentWS.end;\n const commentStart = commentWS.start;\n\n if (commentStart === end) {\n commentWS.leadingNode = node;\n } else if (commentEnd === start) {\n commentWS.trailingNode = node;\n } else if (commentEnd < start) {\n break;\n }\n }\n }\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\nexport const skipWhiteSpaceInLine =\n /(?:[^\\S\\n\\r\\u2028\\u2029]|\\/\\/.*|\\/\\*.*?\\*\\/)*/y;\n\n// Skip whitespace and single-line comments, including /* no newline here */.\n// After this RegExp matches, its lastIndex points to a line terminator, or\n// the start of multi-line comment (which is effectively a line terminator),\n// or the end of string.\nexport const skipWhiteSpaceToLineBreak = new RegExp(\n // Unfortunately JS doesn't support Perl's atomic /(?>pattern)/ or\n // possessive quantifiers, so we use a trick to prevent backtracking\n // when the look-ahead for line terminator fails.\n \"(?=(\" +\n // Capture the whitespace and comments that should be skipped inside\n // a look-ahead assertion, and then re-match the group as a unit.\n skipWhiteSpaceInLine.source +\n \"))\\\\1\" +\n // Look-ahead for either line terminator, start of multi-line comment,\n // or end of string.\n /(?=[\\n\\r\\u2028\\u2029]|\\/\\*(?!.*?\\*\\/)|$)/.source,\n \"y\", // sticky\n);\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 type { Options } from \"../options\";\nimport * as N from \"../types\";\nimport type { CommentWhitespace } from \"../parser/comments\";\nimport { Position } from \"../util/location\";\n\nimport { types as ct, type TokContext } from \"./context\";\nimport { tt, type TokenType } from \"./types\";\nimport { Errors, type ParseError } from \"../parse-error\";\n\nexport type DeferredStrictError =\n | typeof Errors.StrictNumericEscape\n | typeof Errors.StrictOctalLiteral;\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 lineStart: 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({ strictMode, sourceType, startLine, startColumn }: Options): void {\n this.strict =\n strictMode === false\n ? false\n : strictMode === true\n ? true\n : sourceType === \"module\";\n\n this.curLine = startLine;\n this.lineStart = -startColumn;\n this.startLoc = this.endLoc = new Position(startLine, startColumn, 0);\n }\n\n errors: ParseError<any>[] = [];\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 inType: boolean = false;\n noAnonFunctionType: boolean = false;\n hasFlowComment: boolean = false;\n isAmbientContext: boolean = false;\n inAbstractClass: boolean = false;\n\n // For the Hack-style pipelines plugin\n topicContext: TopicContextState = {\n maxNumOfResolvableTopics: 0,\n maxTopicIndex: null,\n };\n\n // For the F#-style pipelines 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 for Program.comments\n comments: Array<N.Comment> = [];\n\n // Comment attachment store\n commentStack: Array<CommentWhitespace> = [];\n\n // The current position of the tokenizer in the input.\n pos: 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\n // The context stack is used to track whether the apostrophe \"`\" starts\n // or ends a string template\n context: Array<TokContext> = [ct.brace];\n // Used to track whether a JSX element is allowed to form\n canStartJSXElement: 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, [DeferredStrictError, Position]> = 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, this.pos);\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/*:: declare var invariant; */\n\nimport type { Options } from \"../options\";\nimport {\n Position,\n SourceLocation,\n createPositionWithColumnOffset,\n} from \"../util/location\";\nimport CommentsParser from \"../parser/comments\";\nimport * as N from \"../types\";\nimport * as charCodes from \"charcodes\";\nimport { isIdentifierStart, isIdentifierChar } from \"../util/identifier\";\nimport {\n tokenIsKeyword,\n tokenLabelName,\n tt,\n keywords as keywordTypes,\n type TokenType,\n} from \"./types\";\nimport { type TokContext } from \"./context\";\nimport {\n Errors,\n type ParseError,\n type ParseErrorConstructor,\n type RaiseProperties,\n} from \"../parse-error\";\nimport {\n lineBreakG,\n isNewLine,\n isWhitespace,\n skipWhiteSpace,\n} from \"../util/whitespace\";\nimport State from \"./state\";\nimport type { LookaheadState, DeferredStrictError } from \"./state\";\n\nconst VALID_REGEX_FLAGS = new Set([\n charCodes.lowercaseG,\n charCodes.lowercaseM,\n charCodes.lowercaseS,\n charCodes.lowercaseI,\n charCodes.lowercaseY,\n charCodes.lowercaseU,\n charCodes.lowercaseD,\n // This is only valid when using the regexpUnicodeSets plugin\n charCodes.lowercaseV,\n]);\n\n// The following character codes are forbidden from being\n// an immediate sibling of NumericLiteralSeparator _\n\nconst forbiddenNumericSeparatorSiblings = {\n decBinOct: new Set([\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: new Set([\n charCodes.dot,\n charCodes.uppercaseX,\n charCodes.underscore, // multiple separators are not allowed\n charCodes.lowercaseX,\n ]),\n};\n\nconst isAllowedNumericSeparatorSibling = {\n // 0 - 1\n bin: ch => ch === charCodes.digit0 || ch === charCodes.digit1,\n\n // 0 - 7\n oct: ch => ch >= charCodes.digit0 && ch <= charCodes.digit7,\n\n // 0 - 9\n dec: ch => ch >= charCodes.digit0 && ch <= charCodes.digit9,\n\n // 0 - 9, A - F, a - f,\n hex: ch =>\n (ch >= charCodes.digit0 && ch <= charCodes.digit9) ||\n (ch >= charCodes.uppercaseA && ch <= charCodes.uppercaseF) ||\n (ch >= charCodes.lowercaseA && ch <= 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 CommentsParser {\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.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 /**\n * Whether current token matches given type\n *\n * @param {TokenType} type\n * @returns {boolean}\n * @memberof Tokenizer\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 context: [this.curContext()],\n inType: state.inType,\n startLoc: state.startLoc,\n lastTokEndLoc: state.lastTokEndLoc,\n curLine: state.curLine,\n lineStart: state.lineStart,\n curPosition: state.curPosition,\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 return skipWhiteSpace.test(this.input) ? skipWhiteSpace.lastIndex : pos;\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(([toParseError, at]) =>\n this.raise(toParseError, { at }),\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 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 this.getTokenFromCode(this.codePointAtPos(this.state.pos));\n }\n\n skipBlockComment(): N.CommentBlock | void {\n let startLoc;\n if (!this.isLookahead) startLoc = this.state.curPosition();\n const start = this.state.pos;\n const end = this.input.indexOf(\"*/\", start + 2);\n if (end === -1) {\n // We have to call this again here because startLoc may not be set...\n // This seems to be for performance reasons:\n // https://github.com/babel/babel/commit/acf2a10899f696a8aaf34df78bf9725b5ea7f2da\n throw this.raise(Errors.UnterminatedComment, {\n at: this.state.curPosition(),\n });\n }\n\n this.state.pos = end + 2;\n lineBreakG.lastIndex = start + 2;\n while (lineBreakG.test(this.input) && lineBreakG.lastIndex <= end) {\n ++this.state.curLine;\n this.state.lineStart = lineBreakG.lastIndex;\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 const comment = {\n type: \"CommentBlock\",\n value: this.input.slice(start + 2, end),\n start,\n end: end + 2,\n loc: new SourceLocation(startLoc, this.state.curPosition()),\n };\n if (this.options.tokens) this.pushToken(comment);\n return comment;\n }\n\n skipLineComment(startSkip: number): N.CommentLine | 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 const end = this.state.pos;\n const value = this.input.slice(start + startSkip, end);\n\n const comment = {\n type: \"CommentLine\",\n value,\n start,\n end,\n loc: new SourceLocation(startLoc, this.state.curPosition()),\n };\n if (this.options.tokens) this.pushToken(comment);\n return comment;\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 const spaceStart = this.state.pos;\n const comments = [];\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 const comment = this.skipBlockComment();\n if (comment !== undefined) {\n this.addComment(comment);\n if (this.options.attachComment) comments.push(comment);\n }\n break;\n }\n\n case charCodes.slash: {\n const comment = this.skipLineComment(2);\n if (comment !== undefined) {\n this.addComment(comment);\n if (this.options.attachComment) comments.push(comment);\n }\n break;\n }\n\n default:\n break loop;\n }\n break;\n\n default:\n if (isWhitespace(ch)) {\n ++this.state.pos;\n } else if (ch === charCodes.dash && !this.inModule) {\n const pos = this.state.pos;\n if (\n this.input.charCodeAt(pos + 1) === charCodes.dash &&\n this.input.charCodeAt(pos + 2) === charCodes.greaterThan &&\n (spaceStart === 0 || this.state.lineStart > spaceStart)\n ) {\n // A `-->` line comment\n const comment = this.skipLineComment(3);\n if (comment !== undefined) {\n this.addComment(comment);\n if (this.options.attachComment) comments.push(comment);\n }\n } else {\n break loop;\n }\n } else if (ch === charCodes.lessThan && !this.inModule) {\n const pos = this.state.pos;\n if (\n this.input.charCodeAt(pos + 1) === charCodes.exclamationMark &&\n this.input.charCodeAt(pos + 2) === charCodes.dash &&\n this.input.charCodeAt(pos + 3) === charCodes.dash\n ) {\n // `<!--`, an XML-style comment that should be interpreted as a line comment\n const comment = this.skipLineComment(4);\n if (comment !== undefined) {\n this.addComment(comment);\n if (this.options.attachComment) comments.push(comment);\n }\n } else {\n break loop;\n }\n } else {\n break loop;\n }\n }\n }\n\n if (comments.length > 0) {\n const end = this.state.pos;\n const CommentWhitespace = {\n start: spaceStart,\n end,\n comments,\n leadingNode: null,\n trailingNode: null,\n containingNode: null,\n };\n this.state.commentStack.push(CommentWhitespace);\n }\n }\n\n // Called at the end of every token. Sets `end`, `val`, and\n // maintains `context` and `canStartJSXElement`, 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 this.state.endLoc = this.state.curPosition();\n const prevType = this.state.type;\n this.state.type = type;\n this.state.value = val;\n\n if (!this.isLookahead) {\n this.updateContext(prevType);\n }\n }\n\n replaceToken(type: TokenType): void {\n this.state.type = type;\n // the prevType of updateContext is required\n // only when the new type is tt.slash/tt.jsxTagEnd\n // $FlowIgnore\n this.updateContext();\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(Errors.UnexpectedDigitAfterHash, {\n at: this.state.curPosition(),\n });\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 next === charCodes.leftCurlyBrace\n ? Errors.RecordExpressionHashIncorrectStartSyntaxType\n : Errors.TupleExpressionHashIncorrectStartSyntaxType,\n { at: this.state.curPosition() },\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 // '%' or '*'\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 // '%=' or '*='\n if (next === charCodes.equalsTo && !this.state.inType) {\n width++;\n // `tt.moduloAssign` is only needed to support % as a Hack-pipe topic token.\n // If the proposal ends up choosing a different token,\n // it can be merged with tt.assign.\n type = code === charCodes.percentSign ? tt.moduloAssign : 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(Errors.RecordExpressionBarIncorrectEndSyntaxType, {\n at: this.state.curPosition(),\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(Errors.TupleExpressionBarIncorrectEndSyntaxType, {\n at: this.state.curPosition(),\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 const next = this.input.charCodeAt(this.state.pos + 1);\n\n // '^='\n if (next === charCodes.equalsTo && !this.state.inType) {\n // `tt.xorAssign` is only needed to support ^ as a Hack-pipe topic token.\n // If the proposal ends up choosing a different token,\n // it can be merged with tt.assign.\n this.finishOp(tt.xorAssign, 2);\n }\n // '^^'\n else if (\n next === charCodes.caret &&\n // If the ^^ token is not enabled, we don't throw but parse two single ^s\n // because it could be a ^ hack token followed by a ^ binary operator.\n this.hasPlugin([\n \"pipelineOperator\",\n { proposal: \"hack\", topicToken: \"^^\" },\n ])\n ) {\n this.finishOp(tt.doubleCaret, 2);\n\n // `^^^` is forbidden and must be separated by a space.\n const lookaheadCh = this.input.codePointAt(this.state.pos);\n if (lookaheadCh === charCodes.caret) {\n throw this.unexpected();\n }\n }\n // '^'\n else {\n this.finishOp(tt.bitwiseXOR, 1);\n }\n }\n\n readToken_atSign(): void {\n const next = this.input.charCodeAt(this.state.pos + 1);\n\n // '@@'\n if (\n next === charCodes.atSign &&\n this.hasPlugin([\n \"pipelineOperator\",\n { proposal: \"hack\", topicToken: \"@@\" },\n ])\n ) {\n this.finishOp(tt.doubleAt, 2);\n }\n // '@'\n else {\n this.finishOp(tt.at, 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 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(): void {\n // '<'\n const { pos } = this.state;\n const next = this.input.charCodeAt(pos + 1);\n\n if (next === charCodes.lessThan) {\n if (this.input.charCodeAt(pos + 2) === charCodes.equalsTo) {\n this.finishOp(tt.assign, 3);\n return;\n }\n this.finishOp(tt.bitShiftL, 2);\n return;\n }\n\n if (next === charCodes.equalsTo) {\n // <=\n this.finishOp(tt.relational, 2);\n return;\n }\n\n this.finishOp(tt.lt, 1);\n }\n\n readToken_gt(): void {\n // '>'\n const { pos } = this.state;\n const next = this.input.charCodeAt(pos + 1);\n\n if (next === charCodes.greaterThan) {\n const size =\n this.input.charCodeAt(pos + 2) === charCodes.greaterThan ? 3 : 2;\n if (this.input.charCodeAt(pos + size) === charCodes.equalsTo) {\n this.finishOp(tt.assign, size + 1);\n return;\n }\n this.finishOp(tt.bitShiftR, size);\n return;\n }\n\n if (next === charCodes.equalsTo) {\n // <= | >=\n this.finishOp(tt.relational, 2);\n return;\n }\n\n this.finishOp(tt.gt, 1);\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 Errors.TupleExpressionBarIncorrectStartSyntaxType,\n { at: this.state.curPosition() },\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 Errors.RecordExpressionBarIncorrectStartSyntaxType,\n { at: this.state.curPosition() },\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.readTemplateToken();\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 this.readToken_lt();\n return;\n\n case charCodes.greaterThan:\n this.readToken_gt();\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.readToken_atSign();\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(Errors.InvalidOrUnexpectedToken, {\n at: this.state.curPosition(),\n unexpected: 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 startLoc = this.state.startLoc;\n const start = this.state.start + 1;\n let escaped, inClass;\n let { pos } = this.state;\n for (; ; ++pos) {\n if (pos >= this.length) {\n // FIXME: explain\n throw this.raise(Errors.UnterminatedRegExp, {\n at: createPositionWithColumnOffset(startLoc, 1),\n });\n }\n const ch = this.input.charCodeAt(pos);\n if (isNewLine(ch)) {\n throw this.raise(Errors.UnterminatedRegExp, {\n at: createPositionWithColumnOffset(startLoc, 1),\n });\n }\n if (escaped) {\n escaped = false;\n } else {\n if (ch === charCodes.leftSquareBracket) {\n inClass = true;\n } else if (ch === charCodes.rightSquareBracket && inClass) {\n inClass = false;\n } else if (ch === charCodes.slash && !inClass) {\n break;\n }\n escaped = ch === charCodes.backslash;\n }\n }\n const content = this.input.slice(start, pos);\n ++pos;\n\n let mods = \"\";\n\n const nextPos = () =>\n // (pos + 1) + 1 - start\n createPositionWithColumnOffset(startLoc, pos + 2 - start);\n\n while (pos < this.length) {\n const cp = this.codePointAtPos(pos);\n // It doesn't matter if cp > 0xffff, the loop will either throw or break because we check on cp\n const char = String.fromCharCode(cp);\n\n if (VALID_REGEX_FLAGS.has(cp)) {\n if (cp === charCodes.lowercaseV) {\n this.expectPlugin(\"regexpUnicodeSets\", nextPos());\n\n if (mods.includes(\"u\")) {\n this.raise(Errors.IncompatibleRegExpUVFlags, { at: nextPos() });\n }\n } else if (cp === charCodes.lowercaseU) {\n if (mods.includes(\"v\")) {\n this.raise(Errors.IncompatibleRegExpUVFlags, { at: nextPos() });\n }\n }\n if (mods.includes(char)) {\n this.raise(Errors.DuplicateRegExpFlags, { at: nextPos() });\n }\n } else if (isIdentifierChar(cp) || cp === charCodes.backslash) {\n this.raise(Errors.MalformedRegExpFlags, { at: nextPos() });\n } else {\n break;\n }\n\n ++pos;\n mods += char;\n }\n this.state.pos = pos;\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 | \"bail\" = true,\n ): number | null {\n const start = this.state.pos;\n const forbiddenSiblings =\n radix === 16\n ? forbiddenNumericSeparatorSiblings.hex\n : forbiddenNumericSeparatorSiblings.decBinOct;\n const isAllowedSibling =\n radix === 16\n ? isAllowedNumericSeparatorSibling.hex\n : radix === 10\n ? isAllowedNumericSeparatorSibling.dec\n : radix === 8\n ? isAllowedNumericSeparatorSibling.oct\n : isAllowedNumericSeparatorSibling.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 && allowNumSeparator !== \"bail\") {\n const prev = this.input.charCodeAt(this.state.pos - 1);\n const next = this.input.charCodeAt(this.state.pos + 1);\n\n if (!allowNumSeparator) {\n this.raise(Errors.NumericSeparatorInEscapeSequence, {\n at: this.state.curPosition(),\n });\n } else if (\n Number.isNaN(next) ||\n !isAllowedSibling(next) ||\n forbiddenSiblings.has(prev) ||\n forbiddenSiblings.has(next)\n ) {\n this.raise(Errors.UnexpectedNumericSeparator, {\n at: this.state.curPosition(),\n });\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(Errors.InvalidDigit, {\n at: this.state.curPosition(),\n radix,\n });\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 startLoc = this.state.curPosition();\n let isBigInt = false;\n\n this.state.pos += 2; // 0x\n const val = this.readInt(radix);\n if (val == null) {\n this.raise(Errors.InvalidDigit, {\n // Numeric literals can't have newlines, so this is safe to do.\n at: createPositionWithColumnOffset(startLoc, 2),\n radix,\n });\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(Errors.InvalidDecimal, { at: startLoc });\n }\n\n if (isIdentifierStart(this.codePointAtPos(this.state.pos))) {\n throw this.raise(Errors.NumberIdentifier, {\n at: this.state.curPosition(),\n });\n }\n\n if (isBigInt) {\n const str = this.input\n .slice(startLoc.index, this.state.pos)\n .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 const startLoc = this.state.curPosition();\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(Errors.InvalidNumber, { at: this.state.curPosition() });\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(Errors.StrictOctalLiteral, { at: startLoc });\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 // Numeric literals can't have newlines, so this is safe to do.\n this.raise(Errors.ZeroDigitNumericSeparator, {\n at: createPositionWithColumnOffset(startLoc, underscorePos),\n });\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(Errors.InvalidOrMissingExponent, { at: startLoc });\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(Errors.InvalidBigIntLiteral, { at: startLoc });\n }\n ++this.state.pos;\n isBigInt = true;\n }\n\n if (next === charCodes.lowercaseM) {\n this.expectPlugin(\"decimal\", this.state.curPosition());\n if (hasExponent || hasLeadingZero) {\n this.raise(Errors.InvalidDecimal, { at: startLoc });\n }\n ++this.state.pos;\n isDecimal = true;\n }\n\n if (isIdentifierStart(this.codePointAtPos(this.state.pos))) {\n throw this.raise(Errors.NumberIdentifier, {\n at: this.state.curPosition(),\n });\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 ++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(Errors.InvalidCodePoint, { at: this.state.curPosition() });\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(Errors.UnterminatedString, {\n at: this.state.startLoc,\n });\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(Errors.UnterminatedString, {\n at: this.state.startLoc,\n });\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 tempalte continuation `}...`\n readTemplateContinuation(): void {\n if (!this.match(tt.braceR)) {\n this.unexpected(null, tt.braceR);\n }\n // rewind pos to `}`\n this.state.pos--;\n this.readTemplateToken();\n }\n\n // Reads template string tokens.\n readTemplateToken(): void {\n let out = \"\",\n chunkStart = this.state.pos,\n containsInvalid = false;\n ++this.state.pos; // eat '`' or `}`\n for (;;) {\n if (this.state.pos >= this.length) {\n // FIXME: explain\n throw this.raise(Errors.UnterminatedTemplate, {\n at: createPositionWithColumnOffset(this.state.startLoc, 1),\n });\n }\n const ch = this.input.charCodeAt(this.state.pos);\n if (ch === charCodes.graveAccent) {\n ++this.state.pos; // eat '`'\n out += this.input.slice(chunkStart, this.state.pos);\n this.finishToken(tt.templateTail, containsInvalid ? null : out);\n return;\n }\n if (\n ch === charCodes.dollarSign &&\n this.input.charCodeAt(this.state.pos + 1) === charCodes.leftCurlyBrace\n ) {\n this.state.pos += 2; // eat '${'\n out += this.input.slice(chunkStart, this.state.pos);\n this.finishToken(tt.templateNonTail, 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(\n toParseError: DeferredStrictError,\n { at }: { at: Position },\n ) {\n const index = at.index;\n\n if (this.state.strict && !this.state.strictErrors.has(index)) {\n this.raise(toParseError, { at });\n } else {\n this.state.strictErrors.set(index, [toParseError, at]);\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(Errors.StrictNumericEscape, {\n // We immediately follow a \"\\\\\", and we're an 8 or a 9, so we must\n // be on the same line.\n at: createPositionWithColumnOffset(this.state.curPosition(), -1),\n });\n }\n // fall through\n default:\n if (ch >= charCodes.digit0 && ch <= charCodes.digit7) {\n // We immediately follow a \"\\\\\", and we're something between 0 and 7,\n // so we must be on the same line.\n const codePos = createPositionWithColumnOffset(\n this.state.curPosition(),\n -1,\n );\n const match = this.input\n .slice(this.state.pos - 1, this.state.pos + 2)\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(Errors.StrictNumericEscape, {\n at: codePos,\n });\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 codeLoc = this.state.curPosition();\n const n = this.readInt(16, len, forceLen, false);\n if (n === null) {\n if (throwOnInvalid) {\n this.raise(Errors.InvalidEscapeSequence, { at: codeLoc });\n } else {\n this.state.pos = codeLoc.index - 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.curPosition();\n const identifierCheck =\n this.state.pos === start ? isIdentifierStart : isIdentifierChar;\n\n if (this.input.charCodeAt(++this.state.pos) !== charCodes.lowercaseU) {\n this.raise(Errors.MissingUnicodeEscape, {\n at: this.state.curPosition(),\n });\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(Errors.EscapedCharNotAnIdentifier, { at: escStart });\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);\n if (type !== undefined) {\n // We don't use word as state.value here because word is a dynamic string\n // while token label is a shared constant string\n this.finishToken(type, tokenLabelName(type));\n } else {\n this.finishToken(tt.name, word);\n }\n }\n\n checkKeywordEscapes(): void {\n const { type } = this.state;\n if (tokenIsKeyword(type) && this.state.containsEsc) {\n this.raise(Errors.InvalidEscapedReservedWord, {\n at: this.state.startLoc,\n reservedWord: tokenLabelName(type),\n });\n }\n }\n\n /**\n * Raise a `ParseError` given the appropriate properties. If passed a\n * `Position` for the `at` property, raises the `ParseError` at that location.\n * Otherwise, if passed a `Node`, raises the `ParseError` at the start\n * location of that `Node`.\n *\n * If `errorRecovery` is `true`, the error is pushed to the errors array and\n * returned. If `errorRecovery` is `false`, the error is instead thrown.\n *\n * @param {Class<ParseError<ErrorDetails>>>} ParseErrorClass\n * @param {RaiseProperties<ErrorDetails>} raiseProperties\n * @returns {(ParseError<ErrorDetails> | empty)}\n * @memberof Tokenizer\n */\n raise<ErrorDetails>(\n toParseError: ParseErrorConstructor<ErrorDetails>,\n raiseProperties: RaiseProperties<ErrorDetails>,\n ): ParseError<ErrorDetails> {\n const { at, ...details } = raiseProperties;\n const loc = at instanceof Position ? at : at.loc.start;\n const error = toParseError({ loc, details });\n\n if (!this.options.errorRecovery) throw error;\n if (!this.isLookahead) this.state.errors.push(error);\n\n return error;\n }\n\n /**\n * If `errorRecovery` is `false`, this method behaves identically to `raise`.\n * If `errorRecovery` is `true`, this method will first see if there is\n * already an error stored at the same `Position`, and replaces it with the\n * one generated here.\n *\n * @param {Class<ParseError<ErrorDetails>>>} ParseErrorClass\n * @param {RaiseProperties<ErrorDetails>} raiseProperties\n * @returns {(ParseError<ErrorDetails> | empty)}\n * @memberof Tokenizer\n */\n raiseOverwrite<ErrorDetails>(\n toParseError: ParseErrorConstructor<ErrorDetails>,\n raiseProperties: RaiseProperties<ErrorDetails>,\n ): ParseError<ErrorDetails> | empty {\n const { at, ...details } = raiseProperties;\n const loc = at instanceof Position ? at : at.loc.start;\n const pos = loc.index;\n const errors = this.state.errors;\n\n for (let i = errors.length - 1; i >= 0; i--) {\n const error = errors[i];\n if (error.loc.index === pos) {\n return (errors[i] = toParseError({ loc, details }));\n }\n if (error.loc.index < pos) break;\n }\n\n return this.raise(toParseError, raiseProperties);\n }\n\n // updateContext is used by the jsx plugin\n // eslint-disable-next-line no-unused-vars\n updateContext(prevType: TokenType): void {}\n\n // Raise an unexpected token error. Can take the expected token type.\n unexpected(loc?: Position | null, type?: TokenType): void {\n throw this.raise(Errors.UnexpectedToken, {\n expected: type ? tokenLabelName(type) : null,\n at: loc != null ? loc : this.state.startLoc,\n });\n }\n\n expectPlugin(pluginName: string, loc?: Position): true {\n if (this.hasPlugin(pluginName)) {\n return true;\n }\n\n throw this.raise(Errors.MissingPlugin, {\n at: loc != null ? loc : this.state.startLoc,\n missingPlugin: [pluginName],\n });\n }\n\n expectOnePlugin(pluginNames: string[]): void {\n if (!pluginNames.some(name => this.hasPlugin(name))) {\n throw this.raise(Errors.MissingOneOfPlugins, {\n at: this.state.startLoc,\n missingPlugin: pluginNames,\n });\n }\n }\n}\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 { Position } from \"./location\";\nimport * as N from \"../types\";\nimport { Errors } from \"../parse-error\";\nimport Tokenizer from \"../tokenizer\";\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 parser: Tokenizer;\n scopeStack: Array<IScope> = [];\n inModule: boolean;\n undefinedExports: Map<string, Position> = new Map();\n\n constructor(parser: Tokenizer, inModule: boolean) {\n this.parser = parser;\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 for (let i = this.scopeStack.length - 1; ; i--) {\n const { flags } = this.scopeStack[i];\n if (flags & SCOPE_STATIC_BLOCK) {\n return true;\n }\n if (flags & (SCOPE_VAR | SCOPE_CLASS)) {\n // function body, module body, class property initializers\n return false;\n }\n }\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 | SCOPE_STATIC_BLOCK) ||\n (!this.parser.inModule && scope.flags & SCOPE_PROGRAM)\n );\n }\n\n declareName(name: string, bindingType: BindingTypes, loc: Position) {\n let scope = this.currentScope();\n if (bindingType & BIND_SCOPE_LEXICAL || bindingType & BIND_SCOPE_FUNCTION) {\n this.checkRedeclarationInScope(scope, name, bindingType, loc);\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, loc);\n scope.var.add(name);\n this.maybeExportDefined(scope, name);\n\n if (scope.flags & SCOPE_VAR) break;\n }\n }\n if (this.parser.inModule && scope.flags & SCOPE_PROGRAM) {\n this.undefinedExports.delete(name);\n }\n }\n\n maybeExportDefined(scope: IScope, name: string) {\n if (this.parser.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 loc: Position,\n ) {\n if (this.isRedeclaredInScope(scope, name, bindingType)) {\n this.parser.raise(Errors.VarRedeclaration, {\n at: loc,\n identifierName: name,\n });\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.loc.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 { Position } from \"../../util/location\";\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, loc: Position) {\n const scope = this.currentScope();\n if (bindingType & BIND_FLAGS_FLOW_DECLARE_FN) {\n this.checkRedeclarationInScope(scope, name, bindingType, loc);\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\nimport {\n CLASS_ELEMENT_KIND_ACCESSOR,\n CLASS_ELEMENT_FLAG_STATIC,\n type ClassElementTypes,\n} from \"./scopeflags\";\nimport { Position } from \"./location\";\nimport { Errors } from \"../parse-error\";\nimport Tokenizer from \"../tokenizer\";\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, Position> = new Map();\n}\n\nexport default class ClassScopeHandler {\n parser: Tokenizer;\n stack: Array<ClassScope> = [];\n undefinedPrivateNames: Map<string, Position> = new Map();\n\n constructor(parser: Tokenizer) {\n this.parser = parser;\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, loc] of Array.from(oldClassScope.undefinedPrivateNames)) {\n if (current) {\n if (!current.undefinedPrivateNames.has(name)) {\n current.undefinedPrivateNames.set(name, loc);\n }\n } else {\n this.parser.raise(Errors.InvalidPrivateFieldResolution, {\n at: loc,\n identifierName: name,\n });\n }\n }\n }\n\n declarePrivateName(\n name: string,\n elementType: ClassElementTypes,\n loc: Position,\n ) {\n const { privateNames, loneAccessors, undefinedPrivateNames } =\n this.current();\n let redefined = privateNames.has(name);\n\n if (elementType & CLASS_ELEMENT_KIND_ACCESSOR) {\n const accessor = redefined && 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) loneAccessors.delete(name);\n } else if (!redefined) {\n loneAccessors.set(name, elementType);\n }\n }\n\n if (redefined) {\n this.parser.raise(Errors.PrivateNameRedeclaration, {\n at: loc,\n identifierName: name,\n });\n }\n\n privateNames.add(name);\n undefinedPrivateNames.delete(name);\n }\n\n usePrivateName(name: string, loc: Position) {\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, loc);\n } else {\n // top-level\n this.parser.raise(Errors.InvalidPrivateFieldResolution, {\n at: loc,\n identifierName: name,\n });\n }\n }\n}\n","// @flow\n\nimport { Errors } from \"../parse-error\";\nimport { Position } from \"./location\";\nimport type { Node } from \"../types\";\nimport Tokenizer from \"../tokenizer\";\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-errors/standard) 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\ntype ArrowHeadParsingParameterInitializerError =\n | typeof Errors.AwaitExpressionFormalParameter\n | typeof Errors.YieldInParameter;\n\ntype ArrowHeadParsingDeclarationError =\n | ArrowHeadParsingParameterInitializerError\n | typeof Errors.InvalidParenthesizedAssignment\n | typeof Errors.AwaitBindingIdentifier;\n\nclass ArrowHeadParsingScope extends ExpressionScope {\n declarationErrors: Map<number, [ArrowHeadParsingDeclarationError, Position]> =\n new Map();\n constructor(type: 1 | 2) {\n super(type);\n }\n recordDeclarationError<T: ArrowHeadParsingDeclarationError>(\n ParsingErrorClass: T,\n { at }: { at: Position },\n ) {\n const index = at.index;\n\n this.declarationErrors.set(index, [ParsingErrorClass, at]);\n }\n clearDeclarationError(index: number) {\n this.declarationErrors.delete(index);\n }\n iterateErrors(\n iterator: ([ArrowHeadParsingDeclarationError, Position]) => void,\n ) {\n this.declarationErrors.forEach(iterator);\n }\n}\n\nexport default class ExpressionScopeHandler {\n parser: Tokenizer;\n stack: Array<ExpressionScope> = [new ExpressionScope()];\n\n constructor(parser: Tokenizer) {\n this.parser = parser;\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(\n toParseError: ArrowHeadParsingParameterInitializerError,\n { at: node }: { at: Node },\n ): void {\n const origin = { at: node.loc.start };\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(toParseError, origin);\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 this.parser.raise(toParseError, origin);\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({ at: node }: { at: Node }): void {\n const { stack } = this;\n const scope: ExpressionScope = stack[stack.length - 1];\n const origin = { at: node.loc.start };\n if (scope.isCertainlyParameterDeclaration()) {\n this.parser.raise(Errors.InvalidParenthesizedAssignment, origin);\n } else if (scope.canBeArrowParameterDeclaration()) {\n /*:: invariant(scope instanceof ArrowHeadParsingScope) */\n scope.recordDeclarationError(\n Errors.InvalidParenthesizedAssignment,\n origin,\n );\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({ at }: { at: Position }): 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(Errors.AwaitBindingIdentifier, { at });\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(([toParseError, loc]) => {\n this.parser.raise(toParseError, { at: loc });\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(loc.index);\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\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\nimport { type Position } from \"../util/location\";\nimport {\n tokenIsLiteralPropertyName,\n tt,\n type TokenType,\n} from \"../tokenizer/types\";\nimport Tokenizer from \"../tokenizer\";\nimport State from \"../tokenizer/state\";\nimport type { Node } from \"../types\";\nimport { lineBreak, skipWhiteSpaceToLineBreak } 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 {\n Errors,\n type ParseError,\n type ParseErrorConstructor,\n} from \"../parse-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(\n node: Node,\n key: string,\n value: any,\n enumerable: boolean = true,\n ): void {\n if (!node) return;\n\n const extra = (node.extra = node.extra || {});\n if (enumerable) {\n extra[key] = value;\n } else {\n Object.defineProperty(extra, key, { enumerable, value });\n }\n }\n\n // Tests whether parsed token is a contextual keyword.\n\n isContextual(token: TokenType): boolean {\n return this.state.type === token && !this.state.containsEsc;\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(token: TokenType): boolean {\n if (this.isContextual(token)) {\n this.next();\n return true;\n }\n return false;\n }\n\n // Asserts that following token is given contextual keyword.\n\n expectContextual(\n token: TokenType,\n toParseError?: ParseErrorConstructor<any>,\n ): void {\n if (!this.eatContextual(token)) {\n if (toParseError != null) {\n throw this.raise(toParseError, { at: this.state.startLoc });\n }\n throw this.unexpected(null, token);\n }\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.lastTokEndLoc.index, this.state.start),\n );\n }\n\n hasFollowingLineBreak(): boolean {\n skipWhiteSpaceToLineBreak.lastIndex = this.state.end;\n return skipWhiteSpaceToLineBreak.test(this.input);\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(Errors.MissingSemicolon, { at: this.state.lastTokEndLoc });\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, loc?: ?Position): void {\n this.eat(type) || this.unexpected(loc, type);\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, ParseError<any>, 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]: ParseError<any>),\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 {\n shorthandAssignLoc,\n doubleProtoLoc,\n privateKeyLoc,\n optionalParametersLoc,\n } = refExpressionErrors;\n\n const hasErrors =\n !!shorthandAssignLoc ||\n !!doubleProtoLoc ||\n !!optionalParametersLoc ||\n !!privateKeyLoc;\n\n if (!andThrow) {\n return hasErrors;\n }\n\n if (shorthandAssignLoc != null) {\n this.raise(Errors.InvalidCoverInitializedName, {\n at: shorthandAssignLoc,\n });\n }\n\n if (doubleProtoLoc != null) {\n this.raise(Errors.DuplicateProto, { at: doubleProtoLoc });\n }\n\n if (privateKeyLoc != null) {\n this.raise(Errors.UnexpectedPrivateField, { at: privateKeyLoc });\n }\n\n if (optionalParametersLoc != null) {\n this.unexpected(optionalParametersLoc);\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 tokenIsLiteralPropertyName(this.state.type);\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/ecma262/#sec-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, inModule);\n\n const oldProdParam = this.prodParam;\n this.prodParam = new ProductionParameterHandler();\n\n const oldClassScope = this.classScope;\n this.classScope = new ClassScopeHandler(this);\n\n const oldExpressionScope = this.expressionScope;\n this.expressionScope = new ExpressionScopeHandler(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.inModule) {\n paramFlags |= PARAM_AWAIT;\n }\n this.scope.enter(SCOPE_PROGRAM);\n this.prodParam.enter(paramFlags);\n }\n\n checkDestructuringPrivate(refExpressionErrors: ExpressionErrors) {\n const { privateKeyLoc } = refExpressionErrors;\n if (privateKeyLoc !== null) {\n this.expectPlugin(\"destructuringPrivate\", privateKeyLoc);\n }\n }\n}\n\n/**\n * The ExpressionErrors is a context struct used to track ambiguous patterns\n * When we are sure the parsed pattern is a RHS, which means it is not a pattern,\n * we will throw on this position on invalid assign syntax, otherwise it will be reset to -1\n *\n * Types of ExpressionErrors:\n *\n * - **shorthandAssignLoc**: track initializer `=` position\n * - **doubleProtoLoc**: track the duplicate `__proto__` key position\n * - **privateKey**: track private key `#p` position\n * - **optionalParametersLoc**: track the optional paramter (`?`).\n * It's only used by typescript and flow plugins\n */\nexport class ExpressionErrors {\n shorthandAssignLoc: ?Position = null;\n doubleProtoLoc: ?Position = null;\n privateKeyLoc: ?Position = null;\n optionalParametersLoc: ?Position = null;\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.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 declare start: number;\n declare end: number;\n declare loc: SourceLocation;\n declare range: [number, number];\n declare leadingComments: Array<Comment>;\n declare trailingComments: Array<Comment>;\n declare innerComments: Array<Comment>;\n declare extra: { [key: string]: any };\n}\nconst NodePrototype = Node.prototype;\n\nif (!process.env.BABEL_8_BREAKING) {\n // $FlowIgnore\n NodePrototype.__clone = function (): Node {\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 newNode[key] = this[key];\n }\n }\n\n return newNode;\n };\n}\n\nfunction clonePlaceholder(node: any): any {\n return cloneIdentifier(node);\n}\n\nexport function cloneIdentifier(node: any): any {\n // We don't need to clone `typeAnnotations` and `optional`: because\n // cloneIdentifier is only used in object shorthand and named import/export.\n // Neither of them allow type annotations after the identifier or optional identifier\n const { type, start, end, loc, range, extra, name } = node;\n const cloned = Object.create(NodePrototype);\n cloned.type = type;\n cloned.start = start;\n cloned.end = end;\n cloned.loc = loc;\n cloned.range = range;\n cloned.extra = extra;\n cloned.name = name;\n if (type === \"Placeholder\") {\n cloned.expectedNode = node.expectedNode;\n }\n return cloned;\n}\n\nexport function cloneStringLiteral(node: any): any {\n const { type, start, end, loc, range, extra } = node;\n if (type === \"Placeholder\") {\n return clonePlaceholder(node);\n }\n const cloned = Object.create(NodePrototype);\n cloned.type = type;\n cloned.start = start;\n cloned.end = end;\n cloned.loc = loc;\n cloned.range = range;\n if (node.raw !== undefined) {\n // estree set node.raw instead of node.extra\n cloned.raw = node.raw;\n } else {\n cloned.extra = extra;\n }\n cloned.value = node.value;\n return cloned;\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(node, type, this.state.lastTokEndLoc);\n }\n\n // Finish node at given position\n\n finishNodeAt<T: NodeType>(node: T, type: string, endLoc: Position): 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 = endLoc.index;\n node.loc.end = endLoc;\n if (this.options.ranges) node.range[1] = endLoc.index;\n if (this.options.attachComment) 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 endLoc?: Position = this.state.lastTokEndLoc,\n ): void {\n node.end = endLoc.index;\n node.loc.end = endLoc;\n if (this.options.ranges) node.range[1] = endLoc.index;\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; */\n\nimport type Parser from \"../../parser\";\nimport {\n tokenIsIdentifier,\n tokenIsKeyword,\n tokenIsKeywordOrIdentifier,\n tokenIsLiteralPropertyName,\n tokenLabelName,\n tt,\n type TokenType,\n tokenIsFlowInterfaceOrTypeOrOpaque,\n} from \"../../tokenizer/types\";\nimport * as N from \"../../types\";\nimport { Position } from \"../../util/location\";\nimport { types as tc } from \"../../tokenizer/context\";\nimport * as charCodes from \"charcodes\";\nimport { isIteratorStart } from \"../../util/identifier\";\nimport FlowScopeHandler from \"./scope\";\nimport {\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, ParseErrorEnum } from \"../../parse-error\";\nimport { cloneIdentifier } from \"../../parser/node\";\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 = ParseErrorEnum`flow`(_ => ({\n AmbiguousConditionalArrow: _(\n \"Ambiguous expression: wrap the arrow functions in parentheses to disambiguate.\",\n ),\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 ),\n // TODO: When we get proper string enums in typescript make this ReservedType.\n // Not really worth it to do the whole $Values dance with reservedTypes set.\n AssignReservedType: _<{| reservedType: string |}>(\n ({ reservedType }) => `Cannot overwrite reserved type ${reservedType}.`,\n ),\n DeclareClassElement: _(\n \"The `declare` modifier can only appear on class fields.\",\n ),\n DeclareClassFieldInitializer: _(\n \"Initializers are not allowed in fields with the `declare` modifier.\",\n ),\n DuplicateDeclareModuleExports: _(\n \"Duplicate `declare module.exports` statement.\",\n ),\n EnumBooleanMemberNotInitialized: _<{|\n memberName: string,\n enumName: string,\n |}>(\n ({ memberName, enumName }) =>\n `Boolean enum members need to be initialized. Use either \\`${memberName} = true,\\` or \\`${memberName} = false,\\` in enum \\`${enumName}\\`.`,\n ),\n EnumDuplicateMemberName: _<{| memberName: string, enumName: string |}>(\n ({ memberName, enumName }) =>\n `Enum member names need to be unique, but the name \\`${memberName}\\` has already been used before in enum \\`${enumName}\\`.`,\n ),\n EnumInconsistentMemberValues: _<{| enumName: string |}>(\n ({ enumName }) =>\n `Enum \\`${enumName}\\` has inconsistent member initializers. Either use no initializers, or consistently use literals (either booleans, numbers, or strings) for all member initializers.`,\n ),\n EnumInvalidExplicitType: _<{| invalidEnumType: string, enumName: string |}>(\n ({ invalidEnumType, enumName }) =>\n `Enum type \\`${invalidEnumType}\\` is not valid. Use one of \\`boolean\\`, \\`number\\`, \\`string\\`, or \\`symbol\\` in enum \\`${enumName}\\`.`,\n ),\n EnumInvalidExplicitTypeUnknownSupplied: _<{| enumName: string |}>(\n ({ enumName }) =>\n `Supplied enum type is not valid. Use one of \\`boolean\\`, \\`number\\`, \\`string\\`, or \\`symbol\\` in enum \\`${enumName}\\`.`,\n ),\n\n // TODO: When moving to typescript, we should either have each of the\n // following errors only accept the specific strings they want:\n //\n // ...PrimaryType: explicitType: \"string\" | \"number\" | \"boolean\"\n // ...SymbolType: explicitType: \"symbol\"\n // ...UnknownType: explicitType: null\n //\n // Or, alternatively, merge these three errors together into one\n // `EnumInvalidMemberInitializer` error that can accept `EnumExplicitType`\n // without alteration, and then just have its message change based on the\n // explicitType.\n EnumInvalidMemberInitializerPrimaryType: _<{|\n enumName: string,\n memberName: string,\n explicitType: EnumExplicitType,\n |}>(\n ({ enumName, memberName, explicitType }) =>\n // $FlowIgnore (coercing null which never actually happens)\n `Enum \\`${enumName}\\` has type \\`${explicitType}\\`, so the initializer of \\`${memberName}\\` needs to be a ${explicitType} literal.`,\n ),\n EnumInvalidMemberInitializerSymbolType: _<{|\n enumName: string,\n memberName: string,\n explicitType: EnumExplicitType,\n |}>(\n ({ enumName, memberName }) =>\n `Symbol enum members cannot be initialized. Use \\`${memberName},\\` in enum \\`${enumName}\\`.`,\n ),\n EnumInvalidMemberInitializerUnknownType: _<{|\n enumName: string,\n memberName: string,\n explicitType: EnumExplicitType,\n |}>(\n ({ enumName, memberName }) =>\n `The enum member initializer for \\`${memberName}\\` needs to be a literal (either a boolean, number, or string) in enum \\`${enumName}\\`.`,\n ),\n EnumInvalidMemberName: _<{|\n enumName: string,\n memberName: string,\n suggestion: string,\n |}>(\n ({ enumName, memberName, suggestion }) =>\n `Enum member names cannot start with lowercase 'a' through 'z'. Instead of using \\`${memberName}\\`, consider using \\`${suggestion}\\`, in enum \\`${enumName}\\`.`,\n ),\n EnumNumberMemberNotInitialized: _<{|\n enumName: string,\n memberName: string,\n |}>(\n ({ enumName, memberName }) =>\n `Number enum members need to be initialized, e.g. \\`${memberName} = 1\\` in enum \\`${enumName}\\`.`,\n ),\n EnumStringMemberInconsistentlyInitailized: _<{| enumName: string |}>(\n ({ enumName }) =>\n `String enum members need to consistently either all use initializers, or use no initializers, in enum \\`${enumName}\\`.`,\n ),\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 ),\n InexactInsideExact: _(\n \"Explicit inexact syntax cannot appear inside an explicit exact object type.\",\n ),\n InexactInsideNonObject: _(\n \"Explicit inexact syntax cannot appear in class or interface definitions.\",\n ),\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 ),\n MissingTypeParamDefault: _(\n \"Type parameter declaration needs a default, since a preceding type parameter declaration has a default.\",\n ),\n NestedDeclareModule: _(\n \"`declare module` cannot be used inside another `declare module`.\",\n ),\n NestedFlowComment: _(\n \"Cannot have a flow comment inside another flow comment.\",\n ),\n PatternIsOptional: _(\n \"A binding pattern parameter cannot be optional in an implementation signature.\",\n // For consistency in TypeScript and Flow error codes\n !process.env.BABEL_8_BREAKING\n ? { reasonCode: \"OptionalBindingPattern\" }\n : {},\n ),\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 ),\n ThisParamBannedInConstructor: _(\n \"Constructors cannot have a `this` parameter; constructors don't bind `this` like other functions.\",\n ),\n ThisParamMayNotBeOptional: _(\"The `this` parameter cannot be optional.\"),\n ThisParamMustBeFirst: _(\n \"The `this` parameter must be the first function parameter.\",\n ),\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 ),\n TypeCastInPattern: _(\n \"The type cast expression is expected to be wrapped with parenthesis.\",\n ),\n UnexpectedExplicitInexactInObject: _(\n \"Explicit inexact syntax must appear at the end of an inexact object.\",\n ),\n UnexpectedReservedType: _<{| reservedType: string |}>(\n ({ reservedType }) => `Unexpected reserved type ${reservedType}.`,\n ),\n UnexpectedReservedUnderscore: _(\n \"`_` is only allowed as a type argument to call or new.\",\n ),\n UnexpectedSpaceBetweenModuloChecks: _(\n \"Spaces between `%` and `checks` are not allowed here.\",\n ),\n UnexpectedSpreadType: _(\n \"Spread operator cannot appear in class or interface definitions.\",\n ),\n UnexpectedSubtractionOperand: _(\n 'Unexpected token, expected \"number\" or \"bigint\".',\n ),\n UnexpectedTokenAfterTypeParameter: _(\n \"Expected an arrow function after this type parameter declaration.\",\n ),\n UnexpectedTypeParameterBeforeAsyncArrowFunction: _(\n \"Type parameters must come after the async keyword, e.g. instead of `<T> async () => {}`, use `async <T>() => {}`.\",\n ),\n UnsupportedDeclareExportKind: _<{|\n unsupportedExportKind: string,\n suggestion: string,\n |}>(\n ({ unsupportedExportKind, suggestion }) =>\n `\\`declare export ${unsupportedExportKind}\\` is not supported. Use \\`${suggestion}\\` instead.`,\n ),\n UnsupportedStatementInDeclareModule: _(\n \"Only declares and type imports are allowed inside declare module.\",\n ),\n UnterminatedFlowComment: _(\"Unterminated flow-comment.\"),\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(type: TokenType): boolean {\n return tokenIsKeywordOrIdentifier(type) && type !== tt._from;\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\", loc: Position, value: N.Node |}\n | {| type: \"string\", loc: Position, value: N.Node |}\n | {| type: \"boolean\", loc: Position, value: N.Node |}\n | {| type: \"invalid\", loc: Position |}\n | {| type: \"none\", loc: Position |};\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 moduloLoc = this.state.startLoc;\n this.next(); // eat `%`\n this.expectContextual(tt._checks);\n // Force '%' and 'checks' to be adjacent\n if (this.state.lastTokStart > moduloLoc.index + 1) {\n this.raise(FlowErrors.UnexpectedSpaceBetweenModuloChecks, {\n at: moduloLoc,\n });\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.match(tt.lt)) {\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(\n node.id.name,\n BIND_FLOW_DECLARE_FN,\n node.id.loc.start,\n );\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(tt._module)) {\n if (this.match(tt.dot)) {\n return this.flowParseDeclareModuleExports(node);\n } else {\n if (insideModule) {\n this.raise(FlowErrors.NestedDeclareModule, {\n at: this.state.lastTokStartLoc,\n });\n }\n return this.flowParseDeclareModule(node);\n }\n } else if (this.isContextual(tt._type)) {\n return this.flowParseDeclareTypeAlias(node);\n } else if (this.isContextual(tt._opaque)) {\n return this.flowParseDeclareOpaqueType(node);\n } else if (this.isContextual(tt._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.loc.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(tt._type) && !this.match(tt._typeof)) {\n this.raise(FlowErrors.InvalidNonTypeImportInDeclareModule, {\n at: this.state.lastTokStartLoc,\n });\n }\n this.parseImport(bodyNode);\n } else {\n this.expectContextual(\n tt._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(FlowErrors.AmbiguousDeclareModuleKind, {\n at: bodyElement,\n });\n }\n kind = \"ES\";\n } else if (bodyElement.type === \"DeclareModuleExports\") {\n if (hasModuleExport) {\n this.raise(FlowErrors.DuplicateDeclareModuleExports, {\n at: bodyElement,\n });\n }\n if (kind === \"ES\") {\n this.raise(FlowErrors.AmbiguousDeclareModuleKind, {\n at: bodyElement,\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(tt._type) || this.isContextual(tt._interface)) &&\n !insideModule)\n ) {\n const label = this.state.value;\n throw this.raise(FlowErrors.UnsupportedDeclareExportKind, {\n at: this.state.startLoc,\n unsupportedExportKind: label,\n suggestion: exportSuggestions[label],\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(tt._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(tt._interface) || // declare export interface ...\n this.isContextual(tt._type) || // declare export type ...\n this.isContextual(tt._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(tt._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.loc.start,\n );\n\n if (this.match(tt.lt)) {\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(tt._mixins)) {\n this.next();\n do {\n node.mixins.push(this.flowParseInterfaceExtends());\n } while (this.eat(tt.comma));\n }\n\n if (this.isContextual(tt._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.match(tt.lt)) {\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(FlowErrors.UnexpectedReservedUnderscore, {\n at: this.state.startLoc,\n });\n }\n }\n\n checkReservedType(word: string, startLoc: Position, declaration?: boolean) {\n if (!reservedTypes.has(word)) return;\n\n this.raise(\n declaration\n ? FlowErrors.AssignReservedType\n : FlowErrors.UnexpectedReservedType,\n {\n at: startLoc,\n reservedType: word,\n },\n );\n }\n\n flowParseRestrictedIdentifier(\n liberal?: boolean,\n declaration?: boolean,\n ): N.Identifier {\n this.checkReservedType(\n this.state.value,\n this.state.startLoc,\n declaration,\n );\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.loc.start);\n\n if (this.match(tt.lt)) {\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(tt._type);\n node.id = this.flowParseRestrictedIdentifier(\n /* liberal */ true,\n /* declaration */ true,\n );\n this.scope.declareName(node.id.name, BIND_LEXICAL, node.id.loc.start);\n\n if (this.match(tt.lt)) {\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 nodeStartLoc = this.state.startLoc;\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(FlowErrors.MissingTypeParamDefault, { at: nodeStartLoc });\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.match(tt.lt) || 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.match(tt.gt)) {\n this.expect(tt.comma);\n }\n } while (!this.match(tt.gt));\n this.expect(tt.gt);\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.expect(tt.lt);\n const oldNoAnonFunctionType = this.state.noAnonFunctionType;\n this.state.noAnonFunctionType = false;\n while (!this.match(tt.gt)) {\n node.params.push(this.flowParseType());\n if (!this.match(tt.gt)) {\n this.expect(tt.comma);\n }\n }\n this.state.noAnonFunctionType = oldNoAnonFunctionType;\n this.expect(tt.gt);\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.expect(tt.lt);\n while (!this.match(tt.gt)) {\n node.params.push(this.flowParseTypeOrImplicitInstantiation());\n if (!this.match(tt.gt)) {\n this.expect(tt.comma);\n }\n }\n this.expect(tt.gt);\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(tt._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.match(tt.lt) || 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.match(tt.lt)) {\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 protoStartLoc: ?Position = null;\n let inexactStartLoc: ?Position = null;\n const node = this.startNode();\n\n if (allowProto && this.isContextual(tt._proto)) {\n const lookahead = this.lookahead();\n\n if (lookahead.type !== tt.colon && lookahead.type !== tt.question) {\n this.next();\n protoStartLoc = this.state.startLoc;\n allowStatic = false;\n }\n }\n\n if (allowStatic && this.isContextual(tt._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 (protoStartLoc != null) {\n this.unexpected(protoStartLoc);\n }\n if (this.eat(tt.bracketL)) {\n if (variance) {\n this.unexpected(variance.loc.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.match(tt.lt)) {\n if (protoStartLoc != null) {\n this.unexpected(protoStartLoc);\n }\n if (variance) {\n this.unexpected(variance.loc.start);\n }\n nodeStart.callProperties.push(\n this.flowParseObjectTypeCallProperty(node, isStatic),\n );\n } else {\n let kind = \"init\";\n\n if (this.isContextual(tt._get) || this.isContextual(tt._set)) {\n const lookahead = this.lookahead();\n if (tokenIsLiteralPropertyName(lookahead.type)) {\n kind = this.state.value;\n this.next();\n }\n }\n\n const propOrInexact = this.flowParseObjectTypeProperty(\n node,\n isStatic,\n protoStartLoc,\n variance,\n kind,\n allowSpread,\n allowInexact ?? !exact,\n );\n\n if (propOrInexact === null) {\n inexact = true;\n inexactStartLoc = this.state.lastTokStartLoc;\n } else {\n nodeStart.properties.push(propOrInexact);\n }\n }\n\n this.flowObjectTypeSemicolon();\n\n if (\n inexactStartLoc &&\n !this.match(tt.braceR) &&\n !this.match(tt.braceBarR)\n ) {\n this.raise(FlowErrors.UnexpectedExplicitInexactInObject, {\n at: inexactStartLoc,\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 protoStartLoc: ?Position,\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(FlowErrors.InexactInsideNonObject, {\n at: this.state.lastTokStartLoc,\n });\n } else if (!allowInexact) {\n this.raise(FlowErrors.InexactInsideExact, {\n at: this.state.lastTokStartLoc,\n });\n }\n if (variance) {\n this.raise(FlowErrors.InexactVariance, { at: variance });\n }\n\n return null;\n }\n\n if (!allowSpread) {\n this.raise(FlowErrors.UnexpectedSpreadType, {\n at: this.state.lastTokStartLoc,\n });\n }\n if (protoStartLoc != null) {\n this.unexpected(protoStartLoc);\n }\n if (variance) {\n this.raise(FlowErrors.SpreadVariance, { at: variance });\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 = protoStartLoc != null;\n node.kind = kind;\n\n let optional = false;\n if (this.match(tt.lt) || this.match(tt.parenL)) {\n // This is a method property\n node.method = true;\n\n if (protoStartLoc != null) {\n this.unexpected(protoStartLoc);\n }\n if (variance) {\n this.unexpected(variance.loc.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(FlowErrors.ThisParamBannedInConstructor, {\n at: node.value.this,\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 length =\n property.value.params.length + (property.value.rest ? 1 : 0);\n\n if (property.value.this) {\n this.raise(\n property.kind === \"get\"\n ? FlowErrors.GetterMayNotHaveThisParam\n : FlowErrors.SetterMayNotHaveThisParam,\n { at: property.value.this },\n );\n }\n\n if (length !== paramCount) {\n this.raise(\n property.kind === \"get\"\n ? Errors.BadGetterArity\n : Errors.BadSetterArity,\n { at: property },\n );\n }\n\n if (property.kind === \"set\" && property.value.rest) {\n this.raise(Errors.BadSetterRestParameter, { at: property });\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.match(tt.lt)) {\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(FlowErrors.ThisParamMustBeFirst, { at: node });\n }\n name = this.parseIdentifier(isThis);\n if (this.eat(tt.question)) {\n optional = true;\n if (isThis) {\n this.raise(FlowErrors.ThisParamMayNotBeOptional, { at: node });\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.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.lt:\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 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 (tokenIsIdentifier(this.state.type) || 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(FlowErrors.UnexpectedSubtractionOperand, {\n at: this.state.startLoc,\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 case tt._typeof:\n return this.flowParseTypeofType();\n\n default:\n if (tokenIsKeyword(this.state.type)) {\n const label = tokenLabelName(this.state.type);\n this.next();\n return super.createIdentifier(node, label);\n } else if (tokenIsIdentifier(this.state.type)) {\n if (this.isContextual(tt._interface)) {\n return this.flowParseInterfaceType();\n }\n\n return this.flowIdentToTypeAnnotation(\n startPos,\n startLoc,\n node,\n this.parseIdentifier(),\n );\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(node.expression, node.typeAnnotation.loc.end);\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 (this.state.strict && this.isContextual(tt._interface)) {\n const lookahead = this.lookahead();\n if (tokenIsKeywordOrIdentifier(lookahead.type)) {\n const node = this.startNode();\n this.next();\n return this.flowParseInterface(node);\n }\n } else if (this.shouldParseEnums() && this.isContextual(tt._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 tokenIsIdentifier(this.state.type) ||\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 (tokenIsIdentifier(this.state.type)) {\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 const { type } = this.state;\n if (\n tokenIsFlowInterfaceOrTypeOrOpaque(type) ||\n (this.shouldParseEnums() && type === tt._enum)\n ) {\n return !this.state.containsEsc;\n }\n return super.shouldParseExportDeclaration();\n }\n\n isExportDefaultSpecifier(): boolean {\n const { type } = this.state;\n if (\n tokenIsFlowInterfaceOrTypeOrOpaque(type) ||\n (this.shouldParseEnums() && type === tt._enum)\n ) {\n return this.state.containsEsc;\n }\n\n return super.isExportDefaultSpecifier();\n }\n\n parseExportDefaultExpression(): N.Expression | N.Declaration {\n if (this.shouldParseEnums() && this.isContextual(tt._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 refExpressionErrors?: ?ExpressionErrors,\n ): N.Expression {\n if (!this.match(tt.question)) return expr;\n\n if (this.state.maybeInArrowParameters) {\n const nextCh = this.lookaheadCharCode();\n // These tokens cannot start an expression, so if one of them follows\n // ? then we are probably in an arrow function parameters list and we\n // don't parse the conditional expression.\n if (\n nextCh === charCodes.comma || // (a?, b) => c\n nextCh === charCodes.equalsTo || // (a? = b) => c\n nextCh === charCodes.colon || // (a?: b) => c\n nextCh === charCodes.rightParenthesis // (a?) => c\n ) {\n /*:: invariant(refExpressionErrors != null) */\n this.setOptionalParametersError(refExpressionErrors);\n return expr;\n }\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(FlowErrors.AmbiguousConditionalArrow, {\n at: state.startLoc,\n });\n }\n\n if (failed && valid.length === 1) {\n this.state = state;\n noArrowAt.push(valid[0].start);\n this.state.noArrowAt = noArrowAt;\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),\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?.trailingCommaLoc,\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(tt._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 /* isInTypeExport */ true,\n );\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(tt._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(tt._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(tt._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(tt._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 { startLoc } = this.state;\n const hasNamespace = super.maybeParseExportNamespaceSpecifier(node);\n if (hasNamespace && node.exportKind === \"type\") {\n this.unexpected(startLoc);\n }\n return hasNamespace;\n }\n\n parseClassId(node: N.Class, isStatement: boolean, optionalId: ?boolean) {\n super.parseClassId(node, isStatement, optionalId);\n if (this.match(tt.lt)) {\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 { startLoc } = this.state;\n if (this.isContextual(tt._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(FlowErrors.DeclareClassElement, { at: startLoc });\n } else if (member.value) {\n this.raise(FlowErrors.DeclareClassFieldInitializer, {\n at: member.value,\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(Errors.InvalidIdentifier, {\n at: this.state.curPosition(),\n identifierName: fullWord,\n });\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(code === charCodes.greaterThan ? tt.gt : tt.lt, 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 (\n isIteratorStart(code, next, this.input.charCodeAt(this.state.pos + 2))\n ) {\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 if (node.type === \"TypeCastExpression\") {\n return this.isAssignable(node.expression, isBinding);\n } else {\n return super.isAssignable(node, isBinding);\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 trailingCommaLoc?: ?Position,\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, trailingCommaLoc, 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(FlowErrors.TypeCastInPattern, {\n at: expr.typeAnnotation,\n });\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 isValidLVal(type: string, ...rest) {\n return type === \"TypeCastExpression\" || super.isValidLVal(type, ...rest);\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.match(tt.lt) || 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.loc.start);\n }\n delete (method: $FlowFixMe).variance;\n if (this.match(tt.lt)) {\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(FlowErrors.ThisParamBannedInConstructor, { at: method });\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(FlowErrors.ThisParamBannedInConstructor, { at: method });\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.loc.start);\n }\n delete (method: $FlowFixMe).variance;\n if (this.match(tt.lt)) {\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.match(tt.lt)) {\n node.superTypeParameters = this.flowParseTypeParameterInstantiation();\n }\n if (this.isContextual(tt._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.match(tt.lt)) {\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(FlowErrors.GetterMayNotHaveThisParam, { at: param });\n } else if (this.isThisParam(param)) {\n this.raise(FlowErrors.SetterMayNotHaveThisParam, { at: param });\n }\n }\n }\n\n parsePropertyNamePrefixOperator(\n node: N.ObjectOrClassMember | N.ClassMember,\n ): void {\n node.variance = this.flowParseVariance();\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.loc.start);\n }\n delete (prop: $FlowFixMe).variance;\n\n let typeParameters;\n\n // method shorthand\n if (this.match(tt.lt) && !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(FlowErrors.PatternIsOptional, { at: param });\n }\n if (this.isThisParam(param)) {\n this.raise(FlowErrors.ThisParamMayNotBeOptional, { at: param });\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(FlowErrors.ThisParamAnnotationRequired, { at: param });\n }\n\n if (this.match(tt.eq) && this.isThisParam(param)) {\n this.raise(FlowErrors.ThisParamNoDefault, { at: param });\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(FlowErrors.TypeBeforeInitializer, {\n at: node.typeAnnotation,\n });\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.type);\n }\n\n parseImportSpecifierLocal(\n node: N.ImportDeclaration,\n specifier: N.Node,\n type: string,\n ): void {\n specifier.local = hasTypeImportKind(node)\n ? this.flowParseRestrictedIdentifier(\n /* liberal */ true,\n /* declaration */ true,\n )\n : this.parseIdentifier();\n\n node.specifiers.push(this.finishImportSpecifier(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(tt._type)) {\n kind = \"type\";\n }\n if (kind) {\n const lh = this.lookahead();\n const { type } = lh;\n\n // import type * is not allowed\n if (kind === \"type\" && type === tt.star) {\n // FIXME: lh.start?\n this.unexpected(null, lh.type);\n }\n\n if (\n isMaybeDefaultImport(type) ||\n type === tt.braceL ||\n 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(\n specifier: any,\n importedIsString: boolean,\n isInTypeOnlyImport: boolean,\n // eslint-disable-next-line no-unused-vars\n isMaybeTypeOnly: boolean,\n ): N.ImportSpecifier {\n const firstIdent = specifier.imported;\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(tt._as) && !this.isLookaheadContextual(\"as\")) {\n const as_ident = this.parseIdentifier(true);\n if (\n specifierTypeKind !== null &&\n !tokenIsKeywordOrIdentifier(this.state.type)\n ) {\n // `import {type as ,` or `import {type as }`\n specifier.imported = as_ident;\n specifier.importKind = specifierTypeKind;\n specifier.local = cloneIdentifier(as_ident);\n } else {\n // `import {type as foo`\n specifier.imported = firstIdent;\n specifier.importKind = null;\n specifier.local = this.parseIdentifier();\n }\n } else {\n if (\n specifierTypeKind !== null &&\n tokenIsKeywordOrIdentifier(this.state.type)\n ) {\n // `import {type foo`\n specifier.imported = this.parseIdentifier(true);\n specifier.importKind = specifierTypeKind;\n } else {\n if (importedIsString) {\n /*:: invariant(firstIdent instanceof N.StringLiteral) */\n throw this.raise(Errors.ImportBindingIsString, {\n at: specifier,\n importName: firstIdent.value,\n });\n }\n /*:: invariant(firstIdent instanceof N.Node) */\n specifier.imported = firstIdent;\n specifier.importKind = null;\n }\n\n if (this.eatContextual(tt._as)) {\n specifier.local = this.parseIdentifier();\n } else {\n isBinding = true;\n specifier.local = cloneIdentifier(specifier.imported);\n }\n }\n\n const specifierIsTypeImport = hasTypeImportKind(specifier);\n\n if (isInTypeOnlyImport && specifierIsTypeImport) {\n this.raise(FlowErrors.ImportTypeShorthandOnlyInPureImport, {\n at: specifier,\n });\n }\n\n if (isInTypeOnlyImport || specifierIsTypeImport) {\n this.checkReservedType(\n specifier.local.name,\n specifier.local.loc.start,\n /* declaration */ true,\n );\n }\n\n if (isBinding && !isInTypeOnlyImport && !specifierIsTypeImport) {\n this.checkReservedWord(\n specifier.local.name,\n specifier.loc.start,\n true,\n true,\n );\n }\n\n return this.finishImportSpecifier(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.match(tt.lt)) {\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 ): N.Expression {\n let state = null;\n\n let jsx;\n\n if (\n this.hasPlugin(\"jsx\") &&\n (this.match(tt.jsxTagStart) || this.match(tt.lt))\n ) {\n state = this.state.clone();\n\n jsx = this.tryParse(\n () => super.parseMaybeAssign(refExpressionErrors, afterLeftParse),\n state,\n );\n\n /*:: invariant(!jsx.aborted) */\n /*:: invariant(jsx.node != null) */\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 const currentContext = context[context.length - 1];\n if (currentContext === tc.j_oTag || currentContext === tc.j_expr) {\n context.pop();\n }\n }\n\n if (jsx?.error || this.match(tt.lt)) {\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 );\n\n this.resetStartLocationFromNode(result, typeParameters);\n\n return result;\n },\n );\n\n // <T>(() => {});\n // <T>(() => {}: any);\n if (arrowExpression.extra?.parenthesized) abort();\n\n // The above can return a TypeCastExpression when the arrow\n // expression is not wrapped in parens. See also `this.parseParenItem`.\n // (<T>() => {}: any);\n const expr = this.maybeUnwrapTypeCastExpression(arrowExpression);\n\n if (expr.type !== \"ArrowFunctionExpression\") abort();\n\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 FlowErrors.UnexpectedTypeParameterBeforeAsyncArrowFunction,\n { at: typeParameters },\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(FlowErrors.UnexpectedTokenAfterTypeParameter, {\n at: typeParameters,\n });\n }\n\n return super.parseMaybeAssign(refExpressionErrors, afterLeftParse);\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(params: Array<N.Node>): boolean {\n return this.match(tt.colon) || super.shouldParseArrow(params);\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(FlowErrors.ThisParamMustBeFirst, { at: node.params[i] });\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.match(tt.lt)\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 /*:: invariant(arrow.node != null) */\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 (!noCalls && this.shouldParseTypes() && this.match(tt.lt)) {\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.match(tt.lt)) {\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(FlowErrors.UnterminatedFlowComment, {\n at: this.state.curPosition(),\n });\n }\n return fileNode;\n }\n\n skipBlockComment(): N.CommentBlock | void {\n if (this.hasPlugin(\"flowComments\") && this.skipFlowComment()) {\n if (this.state.hasFlowComment) {\n throw this.raise(FlowErrors.NestedFlowComment, {\n at: this.state.startLoc,\n });\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(Errors.UnterminatedComment, {\n at: this.state.curPosition(),\n });\n }\n this.state.pos = end + 2 + 3;\n return;\n }\n\n return 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(Errors.UnterminatedComment, {\n at: this.state.curPosition(),\n });\n }\n }\n\n // Flow enum parsing\n\n flowEnumErrorBooleanMemberNotInitialized(\n loc: Position,\n { enumName, memberName }: { enumName: string, memberName: string },\n ): void {\n this.raise(FlowErrors.EnumBooleanMemberNotInitialized, {\n at: loc,\n memberName,\n enumName,\n });\n }\n\n flowEnumErrorInvalidMemberInitializer(\n loc: Position,\n enumContext: EnumContext,\n ) {\n return this.raise(\n !enumContext.explicitType\n ? FlowErrors.EnumInvalidMemberInitializerUnknownType\n : enumContext.explicitType === \"symbol\"\n ? FlowErrors.EnumInvalidMemberInitializerSymbolType\n : FlowErrors.EnumInvalidMemberInitializerPrimaryType,\n {\n at: loc,\n ...enumContext,\n },\n );\n }\n\n flowEnumErrorNumberMemberNotInitialized(\n loc: Position,\n { enumName, memberName }: { enumName: string, memberName: string },\n ): void {\n this.raise(FlowErrors.EnumNumberMemberNotInitialized, {\n at: loc,\n enumName,\n memberName,\n });\n }\n\n flowEnumErrorStringMemberInconsistentlyInitailized(\n node: N.Node,\n { enumName }: { enumName: string },\n ): void {\n this.raise(FlowErrors.EnumStringMemberInconsistentlyInitailized, {\n at: node,\n enumName,\n });\n }\n\n flowEnumMemberInit(): EnumMemberInit {\n const startLoc = this.state.startLoc;\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\", loc: literal.loc.start, value: literal };\n }\n return { type: \"invalid\", loc: startLoc };\n }\n case tt.string: {\n const literal = this.parseStringLiteral(this.state.value);\n if (endOfInit()) {\n return { type: \"string\", loc: literal.loc.start, value: literal };\n }\n return { type: \"invalid\", loc: startLoc };\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 loc: literal.loc.start,\n value: literal,\n };\n }\n return { type: \"invalid\", loc: startLoc };\n }\n default:\n return { type: \"invalid\", loc: startLoc };\n }\n }\n\n flowEnumMemberRaw(): { id: N.Node, init: EnumMemberInit } {\n const loc = this.state.startLoc;\n const id = this.parseIdentifier(true);\n const init = this.eat(tt.eq)\n ? this.flowEnumMemberInit()\n : { type: \"none\", loc };\n return { id, init };\n }\n\n flowEnumCheckExplicitTypeMismatch(\n loc: Position,\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(loc, 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.raise(FlowErrors.EnumInvalidMemberName, {\n at: id,\n memberName,\n suggestion: memberName[0].toUpperCase() + memberName.slice(1),\n enumName,\n });\n }\n if (seenNames.has(memberName)) {\n this.raise(FlowErrors.EnumDuplicateMemberName, {\n at: id,\n memberName,\n enumName,\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.loc,\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.loc, 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.loc, 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.loc, context);\n }\n case \"none\": {\n switch (explicitType) {\n case \"boolean\":\n this.flowEnumErrorBooleanMemberNotInitialized(\n init.loc,\n context,\n );\n break;\n case \"number\":\n this.flowEnumErrorNumberMemberNotInitialized(init.loc, 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(member, {\n enumName,\n });\n }\n return defaultedMembers;\n } else {\n for (const member of defaultedMembers) {\n this.flowEnumErrorStringMemberInconsistentlyInitailized(member, {\n enumName,\n });\n }\n return initializedMembers;\n }\n }\n\n flowEnumParseExplicitType({\n enumName,\n }: {\n enumName: string,\n }): EnumExplicitType {\n if (!this.eatContextual(tt._of)) return null;\n\n if (!tokenIsIdentifier(this.state.type)) {\n throw this.raise(FlowErrors.EnumInvalidExplicitTypeUnknownSupplied, {\n at: this.state.startLoc,\n enumName,\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.raise(FlowErrors.EnumInvalidExplicitType, {\n at: this.state.startLoc,\n enumName,\n invalidEnumType: value,\n });\n }\n\n return value;\n }\n\n flowEnumBody(node: N.Node, id: N.Node): N.Node {\n const enumName = id.name;\n const nameLoc = id.loc.start;\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.loc.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.loc.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.raise(FlowErrors.EnumInconsistentMemberValues, {\n at: nameLoc,\n enumName,\n });\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(), id);\n return this.finishNode(node, \"EnumDeclaration\");\n }\n\n // check if the next token is a tt.lt\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, __proto__: null } = {\n __proto__: null,\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 * as charCodes from \"charcodes\";\n\nimport XHTMLEntities from \"./xhtml\";\nimport type Parser from \"../../parser\";\nimport type { ExpressionErrors } from \"../../parser/util\";\nimport {\n tokenComesBeforeExpression,\n tokenIsKeyword,\n tokenLabelName,\n type TokenType,\n tt,\n} 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, ParseErrorEnum } from \"../../parse-error\";\n\n/* eslint sort-keys: \"error\" */\nconst JsxErrors = ParseErrorEnum`jsx`(_ => ({\n AttributeIsEmpty: _(\n \"JSX attributes must only be assigned a non-empty expression.\",\n ),\n MissingClosingTagElement: _<{| openingTagName: string |}>(\n ({ openingTagName }) =>\n `Expected corresponding JSX closing tag for <${openingTagName}>.`,\n ),\n MissingClosingTagFragment: _(\n \"Expected corresponding JSX closing tag for <>.\",\n ),\n UnexpectedSequenceExpression: _(\n \"Sequence expressions cannot be directly nested inside JSX. Did you mean to wrap it in parentheses (...)?\",\n ),\n // FIXME: Unify with Errors.UnexpectedToken\n UnexpectedToken: _<{| unexpected: string, HTMLEntity: string |}>(\n ({ unexpected, HTMLEntity }) =>\n `Unexpected token \\`${unexpected}\\`. Did you mean \\`${HTMLEntity}\\` or \\`{'${unexpected}'}\\`?`,\n ),\n UnsupportedJsxValue: _(\n \"JSX value should be either an expression or a quoted JSX text.\",\n ),\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}));\n\n/* eslint-disable sort-keys */\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(JsxErrors.UnterminatedJsxContent, {\n at: this.state.startLoc,\n });\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.canStartJSXElement) {\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 this.raise(JsxErrors.UnexpectedToken, {\n at: this.state.curPosition(),\n unexpected: this.input[this.state.pos],\n HTMLEntity:\n ch === charCodes.rightCurlyBrace ? \"}\" : \">\",\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(Errors.UnterminatedString, {\n at: this.state.startLoc,\n });\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 const startPos = ++this.state.pos;\n if (this.codePointAtPos(this.state.pos) === charCodes.numberSign) {\n ++this.state.pos;\n\n let radix = 10;\n if (this.codePointAtPos(this.state.pos) === charCodes.lowercaseX) {\n radix = 16;\n ++this.state.pos;\n }\n\n const codePoint = this.readInt(\n radix,\n /* len */ undefined,\n /* forceLen */ false,\n /* allowNumSeparator */ \"bail\",\n );\n if (\n codePoint !== null &&\n this.codePointAtPos(this.state.pos) === charCodes.semicolon\n ) {\n ++this.state.pos;\n return String.fromCodePoint(codePoint);\n }\n } else {\n let count = 0;\n let semi = false;\n while (\n count++ < 10 &&\n this.state.pos < this.length &&\n !(semi = this.codePointAtPos(this.state.pos) == charCodes.semicolon)\n ) {\n ++this.state.pos;\n }\n\n if (semi) {\n const desc = this.input.slice(startPos, this.state.pos);\n const entity = XHTMLEntities[desc];\n ++this.state.pos;\n\n if (entity) {\n return entity;\n }\n }\n }\n\n // Not a valid entity\n this.state.pos = startPos;\n return \"&\";\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 (tokenIsKeyword(this.state.type)) {\n node.name = tokenLabelName(this.state.type);\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.setContext(tc.brace);\n this.next();\n node = this.jsxParseExpressionContainer(node, tc.j_oTag);\n if (node.expression.type === \"JSXEmptyExpression\") {\n this.raise(JsxErrors.AttributeIsEmpty, { at: node });\n }\n return node;\n\n case tt.jsxTagStart:\n case tt.string:\n return this.parseExprAtom();\n\n default:\n throw this.raise(JsxErrors.UnsupportedJsxValue, {\n at: this.state.startLoc,\n });\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.lastTokEndLoc.index,\n this.state.lastTokEndLoc,\n );\n return this.finishNodeAt(node, \"JSXEmptyExpression\", this.state.startLoc);\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.setContext(tc.j_oTag);\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 previousContext: TokContext,\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(JsxErrors.UnexpectedSequenceExpression, {\n at: expression.expressions[1],\n });\n }\n }\n\n node.expression = expression;\n }\n this.setContext(previousContext);\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.match(tt.braceL)) {\n this.setContext(tc.brace);\n this.next();\n this.expect(tt.ellipsis);\n node.argument = this.parseMaybeAssignAllowIn();\n this.setContext(tc.j_oTag);\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.setContext(tc.brace);\n this.next();\n if (this.match(tt.ellipsis)) {\n children.push(this.jsxParseSpreadChild(node));\n } else {\n children.push(\n this.jsxParseExpressionContainer(node, tc.j_expr),\n );\n }\n\n break;\n }\n // istanbul ignore next - should never happen\n default:\n throw this.unexpected();\n }\n }\n\n if (\n isFragment(openingElement) &&\n !isFragment(closingElement) &&\n closingElement !== null\n ) {\n this.raise(JsxErrors.MissingClosingTagFragment, {\n at: closingElement,\n });\n } else if (!isFragment(openingElement) && isFragment(closingElement)) {\n this.raise(JsxErrors.MissingClosingTagElement, {\n // $FlowIgnore\n at: closingElement,\n openingTagName: 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(JsxErrors.MissingClosingTagElement, {\n // $FlowIgnore\n at: closingElement,\n openingTagName: 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.match(tt.lt)) {\n throw this.raise(JsxErrors.UnwrappedAdjacentJSXElements, {\n at: this.state.startLoc,\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 setContext(newContext: TokContext) {\n const { context } = this.state;\n context[context.length - 1] = newContext;\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.match(tt.lt) &&\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.replaceToken(tt.jsxTagStart);\n return this.jsxParseElement();\n } else {\n return super.parseExprAtom(refExpressionErrors);\n }\n }\n\n skipSpace() {\n const curContext = this.curContext();\n if (!curContext.preserveSpace) super.skipSpace();\n }\n\n getTokenFromCode(code: number): void {\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.canStartJSXElement &&\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 const { context, type } = this.state;\n if (type === tt.slash && prevType === tt.jsxTagStart) {\n // do not consider JSX expr -> JSX open tag -> ... anymore\n // reconsider as closing tag context\n context.splice(-2, 2, tc.j_cTag);\n this.state.canStartJSXElement = false;\n } else if (type === tt.jsxTagStart) {\n // start opening tag context\n context.push(tc.j_oTag);\n } else if (type === tt.jsxTagEnd) {\n const out = context[context.length - 1];\n if ((out === tc.j_oTag && prevType === tt.slash) || out === tc.j_cTag) {\n context.pop();\n this.state.canStartJSXElement =\n context[context.length - 1] === tc.j_expr;\n } else {\n this.setContext(tc.j_expr);\n this.state.canStartJSXElement = true;\n }\n } else {\n this.state.canStartJSXElement = tokenComesBeforeExpression(type);\n }\n }\n };\n","// @flow\n\nimport { Position } from \"../../util/location\";\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, loc: Position) {\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, loc);\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\n\n/*:: declare var invariant; */\n\nimport type State from \"../../tokenizer/state\";\nimport {\n tokenIsIdentifier,\n tokenIsTSDeclarationStart,\n tokenIsTSTypeOperator,\n tokenOperatorPrecedence,\n tokenIsKeywordOrIdentifier,\n tt,\n type TokenType,\n tokenIsTemplate,\n} from \"../../tokenizer/types\";\nimport { types as tc } from \"../../tokenizer/context\";\nimport * as N from \"../../types\";\nimport { Position, createPositionWithColumnOffset } 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 BIND_NONE,\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 { Errors, ParseErrorEnum } from \"../../parse-error\";\nimport { cloneIdentifier } from \"../../parser/node\";\n\nconst getOwn = (object, key) =>\n Object.hasOwnProperty.call(object, key) && object[key];\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 = ParseErrorEnum`typescript`(_ => ({\n AbstractMethodHasImplementation: _<{| methodName: string |}>(\n ({ methodName }) =>\n `Method '${methodName}' cannot have an implementation because it is marked abstract.`,\n ),\n AbstractPropertyHasInitializer: _<{| propertyName: string |}>(\n ({ propertyName }) =>\n `Property '${propertyName}' cannot have an initializer because it is marked abstract.`,\n ),\n AccesorCannotDeclareThisParameter: _(\n \"'get' and 'set' accessors cannot declare 'this' parameters.\",\n ),\n AccesorCannotHaveTypeParameters: _(\n \"An accessor cannot have type parameters.\",\n ),\n CannotFindName: _<{| name: string |}>(\n ({ name }) => `Cannot find name '${name}'.`,\n ),\n ClassMethodHasDeclare: _(\"Class methods cannot have the 'declare' modifier.\"),\n ClassMethodHasReadonly: _(\n \"Class methods cannot have the 'readonly' modifier.\",\n ),\n ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumReference: _(\n \"A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference.\",\n ),\n ConstructorHasTypeParameters: _(\n \"Type parameters cannot appear on a constructor declaration.\",\n ),\n DeclareAccessor: _<{| kind: \"get\" | \"set\" |}>(\n ({ kind }) => `'declare' is not allowed in ${kind}ters.`,\n ),\n DeclareClassFieldHasInitializer: _(\n \"Initializers are not allowed in ambient contexts.\",\n ),\n DeclareFunctionHasImplementation: _(\n \"An implementation cannot be declared in ambient contexts.\",\n ),\n DuplicateAccessibilityModifier: _<{| modifier: N.Accessibility |}>(\n // `Accessibility modifier already seen: ${modifier}` would be more helpful.\n // eslint-disable-next-line no-unused-vars\n ({ modifier }) => `Accessibility modifier already seen.`,\n ),\n DuplicateModifier: _<{| modifier: TsModifier |}>(\n ({ modifier }) => `Duplicate modifier: '${modifier}'.`,\n ),\n // `token` matches the terminology used by typescript:\n // https://github.com/microsoft/TypeScript/blob/main/src/compiler/types.ts#L2915\n EmptyHeritageClauseType: _<{| token: \"extends\" | \"implements\" |}>(\n ({ token }) => `'${token}' list cannot be empty.`,\n ),\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 ),\n ImportAliasHasImportType: _(\"An import alias can not use 'import type'.\"),\n IncompatibleModifiers: _<{| modifiers: [TsModifier, TsModifier] |}>(\n ({ modifiers }) =>\n `'${modifiers[0]}' modifier cannot be used with '${modifiers[1]}' modifier.`,\n ),\n IndexSignatureHasAbstract: _(\n \"Index signatures cannot have the 'abstract' modifier.\",\n ),\n IndexSignatureHasAccessibility: _<{| modifier: N.Accessibility |}>(\n ({ modifier }) =>\n `Index signatures cannot have an accessibility modifier ('${modifier}').`,\n ),\n IndexSignatureHasDeclare: _(\n \"Index signatures cannot have the 'declare' modifier.\",\n ),\n IndexSignatureHasOverride: _(\n \"'override' modifier cannot appear on an index signature.\",\n ),\n IndexSignatureHasStatic: _(\n \"Index signatures cannot have the 'static' modifier.\",\n ),\n InitializerNotAllowedInAmbientContext: _(\n \"Initializers are not allowed in ambient contexts.\",\n ),\n InvalidModifierOnTypeMember: _<{| modifier: TsModifier |}>(\n ({ modifier }) => `'${modifier}' modifier cannot appear on a type member.`,\n ),\n InvalidModifiersOrder: _<{| orderedModifiers: [TsModifier, TsModifier] |}>(\n ({ orderedModifiers }) =>\n `'${orderedModifiers[0]}' modifier must precede '${orderedModifiers[1]}' modifier.`,\n ),\n InvalidTupleMemberLabel: _(\n \"Tuple members must be labeled with a simple identifier.\",\n ),\n MissingInterfaceName: _(\n \"'interface' declarations must be followed by an identifier.\",\n ),\n MixedLabeledAndUnlabeledElements: _(\n \"Tuple members must all have names or all not have names.\",\n ),\n NonAbstractClassHasAbstractMethod: _(\n \"Abstract methods can only appear within an abstract class.\",\n ),\n NonClassMethodPropertyHasAbstractModifer: _(\n \"'abstract' modifier can only appear on a class, method, or property declaration.\",\n ),\n OptionalTypeBeforeRequired: _(\n \"A required element cannot follow an optional element.\",\n ),\n OverrideNotInSubClass: _(\n \"This member cannot have an 'override' modifier because its containing class does not extend another class.\",\n ),\n PatternIsOptional: _(\n \"A binding pattern parameter cannot be optional in an implementation signature.\",\n ),\n PrivateElementHasAbstract: _(\n \"Private elements cannot have the 'abstract' modifier.\",\n ),\n PrivateElementHasAccessibility: _<{| modifier: N.Accessibility |}>(\n ({ modifier }) =>\n `Private elements cannot have an accessibility modifier ('${modifier}').`,\n ),\n ReadonlyForMethodSignature: _(\n \"'readonly' modifier can only appear on a property declaration or index signature.\",\n ),\n ReservedArrowTypeParam: _(\n \"This syntax is reserved in files with the .mts or .cts extension. Add a trailing comma, as in `<T,>() => ...`.\",\n ),\n ReservedTypeAssertion: _(\n \"This syntax is reserved in files with the .mts or .cts extension. Use an `as` expression instead.\",\n ),\n SetAccesorCannotHaveOptionalParameter: _(\n \"A 'set' accessor cannot have an optional parameter.\",\n ),\n SetAccesorCannotHaveRestParameter: _(\n \"A 'set' accessor cannot have rest parameter.\",\n ),\n SetAccesorCannotHaveReturnType: _(\n \"A 'set' accessor cannot have a return type annotation.\",\n ),\n SingleTypeParameterWithoutTrailingComma: _<{| typeParameterName: string |}>(\n ({ typeParameterName }) =>\n `Single type parameter ${typeParameterName} should have a trailing comma. Example usage: <${typeParameterName},>.`,\n ),\n StaticBlockCannotHaveModifier: _(\n \"Static class blocks cannot have any modifier.\",\n ),\n TypeAnnotationAfterAssign: _(\n \"Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.\",\n ),\n TypeImportCannotSpecifyDefaultAndNamed: _(\n \"A type-only import can specify a default import or named bindings, but not both.\",\n ),\n TypeModifierIsUsedInTypeExports: _(\n \"The 'type' modifier cannot be used on a named export when 'export type' is used on its export statement.\",\n ),\n TypeModifierIsUsedInTypeImports: _(\n \"The 'type' modifier cannot be used on a named import when 'import type' is used on its import statement.\",\n ),\n UnexpectedParameterModifier: _(\n \"A parameter property is only allowed in a constructor implementation.\",\n ),\n UnexpectedReadonly: _(\n \"'readonly' type modifier is only permitted on array and tuple literal types.\",\n ),\n UnexpectedTypeAnnotation: _(\"Did not expect a type annotation here.\"),\n UnexpectedTypeCastInParameter: _(\n \"Unexpected type cast in parameter position.\",\n ),\n UnsupportedImportTypeArgument: _(\n \"Argument in a type import must be a string literal.\",\n ),\n UnsupportedParameterPropertyKind: _(\n \"A parameter property may not be declared using a binding pattern.\",\n ),\n UnsupportedSignatureParameterKind: _<{| type: string |}>(\n ({ type }) =>\n `Name in a signature must be an Identifier, ObjectPattern or ArrayPattern, instead got ${type}.`,\n ),\n}));\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 tokenIsIdentifier(this.state.type);\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>(\n allowedModifiers: T[],\n stopOnStartOfClassStaticBlock?: boolean,\n ): ?T {\n if (!tokenIsIdentifier(this.state.type)) {\n return undefined;\n }\n\n const modifier = this.state.value;\n if (allowedModifiers.indexOf(modifier) !== -1) {\n if (stopOnStartOfClassStaticBlock && this.tsIsStartOfStaticBlocks()) {\n return undefined;\n }\n if (this.tsTryParse(this.tsNextTokenCanFollowModifier.bind(this))) {\n return modifier;\n }\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({ modified: node, allowedModifiers: [\"public\"] });\n * this.tsParseModifiers({ modified: node, allowedModifiers: [\"abstract\", \"readonly\"] });\n */\n tsParseModifiers({\n modified,\n allowedModifiers,\n disallowedModifiers,\n stopOnStartOfClassStaticBlock,\n }: {\n modified: {\n [key: TsModifier]: ?true,\n accessibility?: N.Accessibility,\n },\n allowedModifiers: TsModifier[],\n disallowedModifiers?: TsModifier[],\n stopOnStartOfClassStaticBlock?: boolean,\n }): void {\n const enforceOrder = (loc, modifier, before, after) => {\n if (modifier === before && modified[after]) {\n this.raise(TSErrors.InvalidModifiersOrder, {\n at: loc,\n orderedModifiers: [before, after],\n });\n }\n };\n const incompatible = (loc, modifier, mod1, mod2) => {\n if (\n (modified[mod1] && modifier === mod2) ||\n (modified[mod2] && modifier === mod1)\n ) {\n this.raise(TSErrors.IncompatibleModifiers, {\n at: loc,\n modifiers: [mod1, mod2],\n });\n }\n };\n\n for (;;) {\n const { startLoc } = this.state;\n const modifier: ?TsModifier = this.tsParseModifier(\n allowedModifiers.concat(disallowedModifiers ?? []),\n stopOnStartOfClassStaticBlock,\n );\n\n if (!modifier) break;\n\n if (tsIsAccessModifier(modifier)) {\n if (modified.accessibility) {\n this.raise(TSErrors.DuplicateAccessibilityModifier, {\n at: startLoc,\n modifier,\n });\n } else {\n enforceOrder(startLoc, modifier, modifier, \"override\");\n enforceOrder(startLoc, modifier, modifier, \"static\");\n enforceOrder(startLoc, modifier, modifier, \"readonly\");\n\n modified.accessibility = modifier;\n }\n } else {\n if (Object.hasOwnProperty.call(modified, modifier)) {\n this.raise(TSErrors.DuplicateModifier, { at: startLoc, modifier });\n } else {\n enforceOrder(startLoc, modifier, \"static\", \"readonly\");\n enforceOrder(startLoc, modifier, \"static\", \"override\");\n enforceOrder(startLoc, modifier, \"override\", \"readonly\");\n enforceOrder(startLoc, modifier, \"abstract\", \"override\");\n\n incompatible(startLoc, modifier, \"declare\", \"override\");\n incompatible(startLoc, modifier, \"static\", \"abstract\");\n }\n modified[modifier] = true;\n }\n\n if (disallowedModifiers?.includes(modifier)) {\n this.raise(TSErrors.InvalidModifierOnTypeMember, {\n at: startLoc,\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.match(tt.gt);\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 refTrailingCommaPos?: { value: number },\n ): T[] {\n return nonNull(\n this.tsParseDelimitedListWorker(\n kind,\n parseElement,\n /* expectSuccess */ true,\n refTrailingCommaPos,\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 refTrailingCommaPos?: { value: number },\n ): ?(T[]) {\n const result = [];\n let trailingCommaPos = -1;\n\n for (;;) {\n if (this.tsIsListTerminator(kind)) {\n break;\n }\n trailingCommaPos = -1;\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 trailingCommaPos = this.state.lastTokStart;\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 if (refTrailingCommaPos) {\n refTrailingCommaPos.value = trailingCommaPos;\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 refTrailingCommaPos?: { value: number },\n ): T[] {\n if (!skipFirstToken) {\n if (bracket) {\n this.expect(tt.bracketL);\n } else {\n this.expect(tt.lt);\n }\n }\n\n const result = this.tsParseDelimitedList(\n kind,\n parseElement,\n refTrailingCommaPos,\n );\n\n if (bracket) {\n this.expect(tt.bracketR);\n } else {\n this.expect(tt.gt);\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(TSErrors.UnsupportedImportTypeArgument, {\n at: this.state.startLoc,\n });\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 // In this instance, the entity name will actually itself be a\n // qualifier, so allow it to be a reserved word as well.\n node.qualifier = this.tsParseEntityName();\n }\n if (this.match(tt.lt)) {\n node.typeParameters = this.tsParseTypeArguments();\n }\n return this.finishNode(node, \"TSImportType\");\n }\n\n tsParseEntityName(allowReservedWords: boolean = true): N.TsEntityName {\n let entity: N.TsEntityName = this.parseIdentifier(allowReservedWords);\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();\n if (!this.hasPrecedingLineBreak() && this.match(tt.lt)) {\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();\n }\n return this.finishNode(node, \"TSTypeQuery\");\n }\n\n tsParseTypeParameter(): N.TsTypeParameter {\n const node: N.TsTypeParameter = this.startNode();\n node.name = this.tsParseTypeParameterName();\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.match(tt.lt)) {\n return this.tsParseTypeParameters();\n }\n }\n\n tsParseTypeParameters() {\n const node: N.TsTypeParameterDeclaration = this.startNode();\n\n if (this.match(tt.lt) || this.match(tt.jsxTagStart)) {\n this.next();\n } else {\n this.unexpected();\n }\n\n const refTrailingCommaPos = { value: -1 };\n\n node.params = this.tsParseBracketedList(\n \"TypeParametersOrArguments\",\n this.tsParseTypeParameter.bind(this),\n /* bracket */ false,\n /* skipFirstToken */ true,\n refTrailingCommaPos,\n );\n if (node.params.length === 0) {\n this.raise(TSErrors.EmptyTypeParameters, { at: node });\n }\n if (refTrailingCommaPos.value !== -1) {\n this.addExtra(node, \"trailingComma\", refTrailingCommaPos.value);\n }\n return this.finishNode(node, \"TSTypeParameterDeclaration\");\n }\n\n tsTryNextParseConstantContext(): ?N.TsTypeReference {\n if (this.lookahead().type !== tt._const) return null;\n\n this.next();\n const typeReference = this.tsParseTypeReference();\n\n // If the type reference has type parameters, then you are using it as a\n // type and not as a const signifier. We'll *never* be able to find this\n // name, since const isn't allowed as a type name. So in this instance we\n // get to pretend we're the type checker.\n if (typeReference.typeParameters) {\n this.raise(TSErrors.CannotFindName, {\n at: typeReference.typeName,\n name: \"const\",\n });\n }\n\n return typeReference;\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\n // https://github.com/babel/babel/issues/9231\n const paramsKey = process.env.BABEL_8_BREAKING ? \"params\" : \"parameters\";\n const returnTypeKey = process.env.BABEL_8_BREAKING\n ? \"returnType\"\n : \"typeAnnotation\";\n\n signature.typeParameters = this.tsTryParseTypeParameters();\n this.expect(tt.parenL);\n signature[paramsKey] = this.tsParseBindingListForSignature();\n if (returnTokenRequired) {\n signature[returnTypeKey] =\n this.tsParseTypeOrTypePredicateAnnotation(returnToken);\n } else if (this.match(returnToken)) {\n signature[returnTypeKey] =\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(TSErrors.UnsupportedSignatureParameterKind, {\n at: pattern,\n type: 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 if (tokenIsIdentifier(this.state.type)) {\n this.next();\n return this.match(tt.colon);\n }\n return false;\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.match(tt.lt)) {\n if (readonly) {\n this.raise(TSErrors.ReadonlyForMethodSignature, { at: node });\n }\n const method: N.TsMethodSignature = nodeAny;\n if (method.kind && this.match(tt.lt)) {\n this.raise(TSErrors.AccesorCannotHaveTypeParameters, {\n at: this.state.curPosition(),\n });\n }\n this.tsFillSignature(tt.colon, method);\n this.tsParseTypeMemberSemicolon();\n const paramsKey = process.env.BABEL_8_BREAKING\n ? \"params\"\n : \"parameters\";\n const returnTypeKey = process.env.BABEL_8_BREAKING\n ? \"returnType\"\n : \"typeAnnotation\";\n if (method.kind === \"get\") {\n if (method[paramsKey].length > 0) {\n this.raise(Errors.BadGetterArity, { at: this.state.curPosition() });\n if (this.isThisParam(method[paramsKey][0])) {\n this.raise(TSErrors.AccesorCannotDeclareThisParameter, {\n at: this.state.curPosition(),\n });\n }\n }\n } else if (method.kind === \"set\") {\n if (method[paramsKey].length !== 1) {\n this.raise(Errors.BadSetterArity, { at: this.state.curPosition() });\n } else {\n const firstParameter = method[paramsKey][0];\n if (this.isThisParam(firstParameter)) {\n this.raise(TSErrors.AccesorCannotDeclareThisParameter, {\n at: this.state.curPosition(),\n });\n }\n if (\n firstParameter.type === \"Identifier\" &&\n firstParameter.optional\n ) {\n this.raise(TSErrors.SetAccesorCannotHaveOptionalParameter, {\n at: this.state.curPosition(),\n });\n }\n if (firstParameter.type === \"RestElement\") {\n this.raise(TSErrors.SetAccesorCannotHaveRestParameter, {\n at: this.state.curPosition(),\n });\n }\n }\n if (method[returnTypeKey]) {\n this.raise(TSErrors.SetAccesorCannotHaveReturnType, {\n at: method[returnTypeKey],\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.match(tt.lt)) {\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.match(tt.lt)) {\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 modified: node,\n allowedModifiers: [\"readonly\"],\n disallowedModifiers: [\n \"declare\",\n \"abstract\",\n \"private\",\n \"protected\",\n \"public\",\n \"static\",\n \"override\",\n ],\n });\n\n const idx = this.tsTryParseIndexSignature(node);\n if (idx) {\n return idx;\n }\n\n this.parsePropertyName(node);\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);\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(tt._readonly);\n }\n if (this.isContextual(tt._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.tsParseTypeParameterName();\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(tt._readonly);\n } else if (this.eatContextual(tt._readonly)) {\n node.readonly = true;\n }\n\n this.expect(tt.bracketL);\n node.typeParameter = this.tsParseMappedTypeParameter();\n node.nameType = this.eatContextual(tt._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(TSErrors.OptionalTypeBeforeRequired, {\n at: elementNode,\n });\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(TSErrors.MixedLabeledAndUnlabeledElements, {\n at: elementNode,\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(TSErrors.InvalidTupleMemberLabel, { at: type });\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(tt._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.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.templateNonTail:\n case tt.templateTail:\n return this.tsParseTemplateLiteralType();\n default: {\n const { type } = this.state;\n if (\n tokenIsIdentifier(type) ||\n type === tt._void ||\n type === tt._null\n ) {\n const nodeType =\n type === tt._void\n ? \"TSVoidKeyword\"\n : type === tt._null\n ? \"TSNullKeyword\"\n : keywordTypeFromName(this.state.value);\n if (\n nodeType !== undefined &&\n this.lookaheadCharCode() !== charCodes.dot\n ) {\n const node: N.TsKeywordType = this.startNode();\n this.next();\n return this.finishNode(node, nodeType);\n }\n return this.tsParseTypeReference();\n }\n }\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.TsTypeOperator {\n const node: N.TsTypeOperator = this.startNode();\n const operator = this.state.value;\n this.next(); // eat 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(TSErrors.UnexpectedReadonly, { at: node });\n }\n }\n\n tsParseInferType(): N.TsInferType {\n const node = this.startNode();\n this.expectContextual(tt._infer);\n const typeParameter = this.startNode();\n typeParameter.name = this.tsParseTypeParameterName();\n node.typeParameter = this.finishNode(typeParameter, \"TSTypeParameter\");\n return this.finishNode(node, \"TSInferType\");\n }\n\n tsParseTypeOperatorOrHigher(): N.TsType {\n const isTypeOperator =\n tokenIsTSTypeOperator(this.state.type) && !this.state.containsEsc;\n return isTypeOperator\n ? this.tsParseTypeOperator()\n : this.isContextual(tt._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.match(tt.lt)) {\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 (tokenIsIdentifier(this.state.type) || this.match(tt._this)) {\n this.next();\n return true;\n }\n\n if (this.match(tt.braceL)) {\n // Return true if we can parse an object pattern without errors\n const { errors } = this.state;\n const previousErrorCount = errors.length;\n try {\n this.parseObjectLike(tt.braceR, true);\n return errors.length === previousErrorCount;\n } catch {\n return false;\n }\n }\n\n if (this.match(tt.bracketL)) {\n this.next();\n // Return true if we can parse an array pattern without errors\n const { errors } = this.state;\n const previousErrorCount = errors.length;\n try {\n this.parseBindingList(\n tt.bracketR,\n charCodes.rightSquareBracket,\n true,\n );\n return errors.length === previousErrorCount;\n } catch {\n return false;\n }\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(tt._is) && !this.hasPrecedingLineBreak()) {\n this.next();\n return id;\n }\n }\n\n tsParseTypePredicateAsserts(): boolean {\n if (this.state.type !== tt._asserts) {\n return false;\n }\n const containsEsc = this.state.containsEsc;\n this.next();\n if (!tokenIsIdentifier(this.state.type) && !this.match(tt._this)) {\n return false;\n }\n\n if (containsEsc) {\n this.raise(Errors.InvalidEscapedReservedWord, {\n at: this.state.lastTokStartLoc,\n reservedWord: \"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 (\n this.isContextual(tt._abstract) && this.lookahead().type === tt._new\n );\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 if (this.getPluginOption(\"typescript\", \"disallowAmbiguousJSXLike\")) {\n this.raise(TSErrors.ReservedTypeAssertion, { at: this.state.startLoc });\n }\n\n const node: N.TsTypeAssertion = this.startNode();\n const _const = this.tsTryNextParseConstantContext();\n node.typeAnnotation = _const || this.tsNextThenParseType();\n this.expect(tt.gt);\n node.expression = this.parseMaybeUnary();\n return this.finishNode(node, \"TSTypeAssertion\");\n }\n\n tsParseHeritageClause(\n token: \"extends\" | \"implements\",\n ): $ReadOnlyArray<N.TsExpressionWithTypeArguments> {\n const originalStartLoc = this.state.startLoc;\n\n const delimitedList = this.tsParseDelimitedList(\n \"HeritageClauseElement\",\n this.tsParseExpressionWithTypeArguments.bind(this),\n );\n\n if (!delimitedList.length) {\n this.raise(TSErrors.EmptyHeritageClauseType, {\n at: originalStartLoc,\n token,\n });\n }\n\n return delimitedList;\n }\n\n tsParseExpressionWithTypeArguments(): N.TsExpressionWithTypeArguments {\n const node: N.TsExpressionWithTypeArguments = this.startNode();\n node.expression = this.tsParseEntityName();\n if (this.match(tt.lt)) {\n node.typeParameters = this.tsParseTypeArguments();\n }\n\n return this.finishNode(node, \"TSExpressionWithTypeArguments\");\n }\n\n tsParseInterfaceDeclaration(\n node: N.TsInterfaceDeclaration,\n properties: { declare?: true } = {},\n ): ?N.TsInterfaceDeclaration {\n if (this.hasFollowingLineBreak()) return null;\n this.expectContextual(tt._interface);\n if (properties.declare) node.declare = true;\n if (tokenIsIdentifier(this.state.type)) {\n node.id = this.parseIdentifier();\n this.checkIdentifier(node.id, BIND_TS_INTERFACE);\n } else {\n node.id = null;\n this.raise(TSErrors.MissingInterfaceName, { at: this.state.startLoc });\n }\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.checkIdentifier(node.id, BIND_TS_TYPE);\n node.typeAnnotation = this.tsInType(() => {\n node.typeParameters = this.tsTryParseTypeParameters();\n this.expect(tt.eq);\n\n if (\n this.isContextual(tt._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 properties: { const?: true, declare?: true } = {},\n ): N.TsEnumDeclaration {\n if (properties.const) node.const = true;\n if (properties.declare) node.declare = true;\n this.expectContextual(tt._enum);\n node.id = this.parseIdentifier();\n this.checkIdentifier(\n node.id,\n node.const ? 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.checkIdentifier(node.id, BIND_TS_NAMESPACE);\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(tt._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.checkIdentifier(node.id, 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(TSErrors.ImportAliasHasImportType, {\n at: moduleReference,\n });\n }\n node.moduleReference = moduleReference;\n this.semicolon();\n return this.finishNode(node, \"TSImportEqualsDeclaration\");\n }\n\n tsIsExternalModuleReference(): boolean {\n return (\n this.isContextual(tt._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(tt._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(tt._let)) {\n starttype = tt._var;\n kind = \"let\";\n }\n\n return this.tsInAmbientContext(() => {\n if (starttype === tt._function) {\n nany.declare = true;\n return this.parseFunctionStatement(\n nany,\n /* async */ false,\n /* declarationPosition */ true,\n );\n }\n\n if (starttype === tt._class) {\n // While this is also set by tsParseExpressionStatement, we need to set it\n // before parsing the class declaration to know 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 }\n\n if (starttype === tt._enum) {\n return this.tsParseEnumDeclaration(nany, { declare: true });\n }\n\n if (starttype === tt._global) {\n return this.tsParseAmbientExternalModuleDeclaration(nany);\n }\n\n if (starttype === tt._const || starttype === tt._var) {\n if (!this.match(tt._const) || !this.isLookaheadContextual(\"enum\")) {\n nany.declare = true;\n return this.parseVarStatement(nany, kind || this.state.value, true);\n }\n\n // `const enum = 0;` not allowed because \"enum\" is a strict mode reserved word.\n this.expect(tt._const);\n return this.tsParseEnumDeclaration(nany, {\n const: true,\n declare: true,\n });\n }\n\n if (starttype === tt._interface) {\n const result = this.tsParseInterfaceDeclaration(nany, {\n declare: true,\n });\n if (result) return result;\n }\n\n if (tokenIsIdentifier(starttype)) {\n return this.tsParseDeclaration(\n nany,\n this.state.value,\n /* next */ true,\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) || tokenIsIdentifier(this.state.type))\n ) {\n return this.tsParseAbstractDeclaration(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 (tokenIsIdentifier(this.state.type)) {\n return this.tsParseModuleOrNamespaceDeclaration(node);\n }\n }\n break;\n\n case \"namespace\":\n if (\n this.tsCheckLineTerminator(next) &&\n tokenIsIdentifier(this.state.type)\n ) {\n return this.tsParseModuleOrNamespaceDeclaration(node);\n }\n break;\n\n case \"type\":\n if (\n this.tsCheckLineTerminator(next) &&\n tokenIsIdentifier(this.state.type)\n ) {\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.match(tt.lt)) {\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 // Used when parsing type arguments from ES productions, where the first token\n // has been created without state.inType. Thus we need to rescan the lt token.\n tsParseTypeArgumentsInExpression(): N.TsTypeParameterInstantiation | void {\n if (this.reScan_lt() !== tt.lt) {\n return undefined;\n }\n return this.tsParseTypeArguments();\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.expect(tt.lt);\n return this.tsParseDelimitedList(\n \"TypeParametersOrArguments\",\n this.tsParseType.bind(this),\n );\n }),\n );\n if (node.params.length === 0) {\n this.raise(TSErrors.EmptyTypeArguments, { at: node });\n }\n this.expect(tt.gt);\n return this.finishNode(node, \"TSTypeParameterInstantiation\");\n }\n\n tsIsDeclarationStart(): boolean {\n return tokenIsTSDeclarationStart(this.state.type);\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 let override = false;\n if (allowModifiers !== undefined) {\n const modified = {};\n this.tsParseModifiers({\n modified,\n allowedModifiers: [\n \"public\",\n \"private\",\n \"protected\",\n \"override\",\n \"readonly\",\n ],\n });\n accessibility = modified.accessibility;\n override = modified.override;\n readonly = modified.readonly;\n if (\n allowModifiers === false &&\n (accessibility || readonly || override)\n ) {\n this.raise(TSErrors.UnexpectedParameterModifier, { at: startLoc });\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 || override) {\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 (override) pp.override = override;\n if (elt.type !== \"Identifier\" && elt.type !== \"AssignmentPattern\") {\n this.raise(TSErrors.UnsupportedParameterPropertyKind, { at: pp });\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 isSimpleParameter(node) {\n return (\n (node.type === \"TSParameterProperty\" &&\n super.isSimpleParameter(node.parameter)) ||\n super.isSimpleParameter(node)\n );\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\" || type === \"ClassPrivateMethod\"\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(TSErrors.DeclareFunctionHasImplementation, { at: node });\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.checkIdentifier(node.id, 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(TSErrors.UnexpectedTypeAnnotation, {\n at: node.typeAnnotation,\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 // When ! is consumed as a postfix operator (non-null assertion),\n // disallow JSX tag forming after. e.g. When parsing `p! < n.p!`\n // `<n.p` can not be a start of JSX tag\n this.state.canStartJSXElement = false;\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 let isOptionalCall = false;\n if (\n this.match(tt.questionDot) &&\n this.lookaheadCharCode() === charCodes.lessThan\n ) {\n if (noCalls) {\n state.stop = true;\n return base;\n }\n state.optionalChainMember = isOptionalCall = true;\n this.next();\n }\n\n // handles 'f<<T>'\n if (this.match(tt.lt) || this.match(tt.bitShiftL)) {\n let missingParenErrorLoc;\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.tsParseTypeArgumentsInExpression();\n\n if (typeArguments) {\n if (isOptionalCall && !this.match(tt.parenL)) {\n missingParenErrorLoc = this.state.curPosition();\n this.unexpected();\n }\n\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 = isOptionalCall;\n }\n\n return this.finishCallExpression(node, state.optionalChainMember);\n } else if (tokenIsTemplate(this.state.type)) {\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 (missingParenErrorLoc) {\n this.unexpected(missingParenErrorLoc, tt.parenL);\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 // 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 // Also handles `new C<<T>`\n if (this.match(tt.lt) || this.match(tt.bitShiftL)) {\n const typeParameters = this.tsTryParseAndCatch(() => {\n const args = this.tsParseTypeArgumentsInExpression();\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 tokenOperatorPrecedence(tt._in) > minPrec &&\n !this.hasPrecedingLineBreak() &&\n this.isContextual(tt._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,\n startLoc: Position,\n checkKeywords: boolean,\n isBinding: boolean,\n ): void {\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 if (!this.state.isAmbientContext) {\n super.checkReservedWord(word, startLoc, checkKeywords, isBinding);\n }\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 (\n tokenIsIdentifier(this.state.type) ||\n this.match(tt.star) ||\n this.match(tt.braceL)\n ) {\n let ahead = this.lookahead();\n\n if (\n this.isContextual(tt._type) &&\n // import type, { a } from \"b\";\n ahead.type !== tt.comma &&\n // import type from \"a\";\n ahead.type !== tt._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 (tokenIsIdentifier(this.state.type) && 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(TSErrors.TypeImportCannotSpecifyDefaultAndNamed, {\n at: importNode,\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(tt._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(tt._as)) {\n // `export as namespace A;`\n const decl: N.TsNamespaceExportDeclaration = node;\n // See `parseNamespaceExportDeclaration` in TypeScript's own parser\n this.expectContextual(tt._namespace);\n decl.id = this.parseIdentifier();\n this.semicolon();\n return this.finishNode(decl, \"TSNamespaceExportDeclaration\");\n } else {\n if (\n this.isContextual(tt._type) &&\n this.lookahead().type === tt.braceL\n ) {\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(tt._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.match(tt._interface)) {\n const result = this.tsParseInterfaceDeclaration(this.startNode());\n if (result) return result;\n }\n\n return super.parseExportDefaultExpression();\n }\n\n parseVarStatement(\n node: N.VariableDeclaration,\n kind: \"var\" | \"let\" | \"const\",\n allowMissingInitializer: boolean = false,\n ) {\n const { isAmbientContext } = this.state;\n const declaration = super.parseVarStatement(\n node,\n kind,\n allowMissingInitializer || isAmbientContext,\n );\n\n if (!isAmbientContext) return declaration;\n\n for (const { id, init } of declaration.declarations) {\n // Empty initializer is the easy case that we want.\n if (!init) continue;\n\n // var and let aren't ever allowed initializers.\n //\n // If a const declaration has no type annotation and is initiailized to\n // a string literal, numeric literal, or enum reference, then it is\n // allowed. In an ideal world, we'd check whether init was *actually* an\n // enum reference, but we allow anything that \"could be\" a literal enum\n // in `isPossiblyLiteralEnum` since we don't have all the information\n // that the typescript compiler has.\n if (kind !== \"const\" || !!id.typeAnnotation) {\n this.raise(TSErrors.InitializerNotAllowedInAmbientContext, {\n at: init,\n });\n } else if (\n init.type !== \"StringLiteral\" &&\n init.type !== \"BooleanLiteral\" &&\n init.type !== \"NumericLiteral\" &&\n init.type !== \"BigIntLiteral\" &&\n (init.type !== \"TemplateLiteral\" || init.expressions.length > 0) &&\n !isPossiblyLiteralEnum(init)\n ) {\n this.raise(\n TSErrors.ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumReference,\n { at: init },\n );\n }\n }\n\n return declaration;\n }\n\n parseStatementContent(context: ?string, topLevel: ?boolean): N.Statement {\n if (this.match(tt._const) && this.isLookaheadContextual(\"enum\")) {\n const node: N.TsEnumDeclaration = this.startNode();\n this.expect(tt._const); // eat 'const'\n return this.tsParseEnumDeclaration(node, { const: true });\n }\n\n if (this.isContextual(tt._enum)) {\n return this.tsParseEnumDeclaration(this.startNode());\n }\n\n if (this.isContextual(tt._interface)) {\n const result = this.tsParseInterfaceDeclaration(this.startNode());\n if (result) return result;\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 tsIsStartOfStaticBlocks() {\n return (\n this.isContextual(tt._static) &&\n this.lookaheadCharCode() === charCodes.leftCurlyBrace\n );\n }\n\n parseClassMember(\n classBody: N.ClassBody,\n member: any,\n state: N.ParseClassMemberState,\n ): void {\n const modifiers = [\n \"declare\",\n \"private\",\n \"public\",\n \"protected\",\n \"override\",\n \"abstract\",\n \"readonly\",\n \"static\",\n ];\n this.tsParseModifiers({\n modified: member,\n allowedModifiers: modifiers,\n stopOnStartOfClassStaticBlock: true,\n });\n\n const callParseClassMemberWithIsStatic = () => {\n if (this.tsIsStartOfStaticBlocks()) {\n this.next(); // eat \"static\"\n this.next(); // eat \"{\"\n if (this.tsHasSomeModifiers(member, modifiers)) {\n this.raise(TSErrors.StaticBlockCannotHaveModifier, {\n at: this.state.curPosition(),\n });\n }\n this.parseClassStaticBlock(classBody, ((member: any): N.StaticBlock));\n } else {\n this.parseClassMemberWithIsStatic(\n classBody,\n member,\n state,\n !!member.static,\n );\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(TSErrors.IndexSignatureHasAbstract, { at: member });\n }\n if ((member: any).accessibility) {\n this.raise(TSErrors.IndexSignatureHasAccessibility, {\n at: member,\n modifier: (member: any).accessibility,\n });\n }\n if ((member: any).declare) {\n this.raise(TSErrors.IndexSignatureHasDeclare, { at: member });\n }\n if ((member: any).override) {\n this.raise(TSErrors.IndexSignatureHasOverride, { at: member });\n }\n\n return;\n }\n\n if (!this.state.inAbstractClass && (member: any).abstract) {\n this.raise(TSErrors.NonAbstractClassHasAbstractMethod, {\n at: member,\n });\n }\n\n if ((member: any).override) {\n if (!state.hadSuperClass) {\n this.raise(TSErrors.OverrideNotInSubClass, { at: member });\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(TSErrors.ClassMethodHasReadonly, { at: methodOrProp });\n }\n\n if ((methodOrProp: any).declare && this.match(tt.parenL)) {\n this.raise(TSErrors.ClassMethodHasDeclare, { at: methodOrProp });\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 refExpressionErrors?: ?ExpressionErrors,\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 (!this.state.maybeInArrowParameters || !this.match(tt.question)) {\n return super.parseConditional(\n expr,\n startPos,\n startLoc,\n refExpressionErrors,\n );\n }\n\n const result = this.tryParse(() =>\n super.parseConditional(expr, startPos, startLoc),\n );\n\n if (!result.node) {\n if (result.error) {\n /*:: invariant(refExpressionErrors != null) */\n super.setOptionalParametersError(refExpressionErrors, result.error);\n }\n\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 if (!this.state.isAmbientContext && this.isContextual(tt._declare)) {\n return this.tsInAmbientContext(() => this.parseExportDeclaration(node));\n }\n\n // Store original location/position\n const startPos = this.state.start;\n const startLoc = this.state.startLoc;\n\n const isDeclare = this.eatContextual(tt._declare);\n\n if (\n isDeclare &&\n (this.isContextual(tt._declare) || !this.shouldParseExportDeclaration())\n ) {\n throw this.raise(TSErrors.ExpectedAmbientAfterExportDeclare, {\n at: this.state.startLoc,\n });\n }\n\n const isIdentifier = tokenIsIdentifier(this.state.type);\n const declaration: ?N.Declaration =\n (isIdentifier && this.tsTryParseExportDeclaration()) ||\n super.parseExportDeclaration(node);\n\n if (!declaration) return null;\n\n if (\n declaration.type === \"TSInterfaceDeclaration\" ||\n declaration.type === \"TSTypeAliasDeclaration\" ||\n isDeclare\n ) {\n node.exportKind = \"type\";\n }\n\n if (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(tt._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(TSErrors.DeclareClassFieldHasInitializer, {\n at: this.state.startLoc,\n });\n }\n if (node.abstract && this.match(tt.eq)) {\n const { key } = node;\n this.raise(TSErrors.AbstractPropertyHasInitializer, {\n at: this.state.startLoc,\n propertyName:\n key.type === \"Identifier\" && !node.computed\n ? key.name\n : `[${this.input.slice(key.start, key.end)}]`,\n });\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(TSErrors.PrivateElementHasAbstract, { at: node });\n }\n\n // $FlowIgnore\n if (node.accessibility) {\n this.raise(TSErrors.PrivateElementHasAccessibility, {\n at: node,\n modifier: 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(TSErrors.ConstructorHasTypeParameters, {\n at: typeParameters,\n });\n }\n\n // $FlowIgnore\n const { declare = false, kind } = method;\n\n if (declare && (kind === \"get\" || kind === \"set\")) {\n this.raise(TSErrors.DeclareAccessor, { at: 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 declareClassPrivateMethodInScope(\n node: N.ClassPrivateMethod | N.EstreeMethodDefinition | N.TSDeclareMethod,\n kind: number,\n ) {\n if (node.type === \"TSDeclareMethod\") return;\n // This happens when using the \"estree\" plugin.\n if (node.type === \"MethodDefinition\" && !node.value.body) return;\n\n super.declareClassPrivateMethodInScope(node, kind);\n }\n\n parseClassSuper(node: N.Class): void {\n super.parseClassSuper(node);\n // handle `extends f<<T>\n if (node.superClass && (this.match(tt.lt) || this.match(tt.bitShiftL))) {\n node.superTypeParameters = this.tsParseTypeArgumentsInExpression();\n }\n if (this.eatContextual(tt._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 (\n decl.id.type === \"Identifier\" &&\n !this.hasPrecedingLineBreak() &&\n this.eat(tt.bang)\n ) {\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.match(tt.lt))\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\n /*:: invariant(!jsx.aborted) */\n /*:: invariant(jsx.node != null) */\n if (!jsx.error) return jsx.node;\n\n // Remove `tc.j_expr` or `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 const currentContext = context[context.length - 1];\n if (currentContext === tc.j_oTag || currentContext === tc.j_expr) {\n context.pop();\n }\n }\n\n if (!jsx?.error && !this.match(tt.lt)) {\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 let invalidSingleType: ?N.TsTypeParameter;\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\n // report error if single type parameter used without trailing comma.\n if (\n this.hasPlugin(\"jsx\") &&\n expr.typeParameters.params.length === 1 &&\n !expr.typeParameters.extra?.trailingComma\n ) {\n const parameter = expr.typeParameters.params[0];\n if (!parameter.constraint) {\n // A single type parameter must either have constraints\n // or a trailing comma, otherwise it's ambiguous with JSX.\n invalidSingleType = parameter;\n }\n }\n\n return expr;\n }, state);\n\n if (process.env.BABEL_8_BREAKING) {\n if (invalidSingleType) {\n this.raise(TSErrors.SingleTypeParameterWithoutTrailingComma, {\n at: createPositionWithColumnOffset(invalidSingleType.loc.end, 1),\n typeParameterName: invalidSingleType.name.name,\n });\n }\n }\n\n /*:: invariant(arrow.node != null) */\n if (!arrow.error && !arrow.aborted) {\n // This error is reported outside of the this.tryParse call so that\n // in case of <T>(x) => 2, we don't consider <T>(x) as a type assertion\n // because of this error.\n if (typeParameters) this.reportReservedArrowTypeParam(typeParameters);\n return arrow.node;\n }\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 /*:: invariant(typeCast.node != null) */\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 if (typeParameters) this.reportReservedArrowTypeParam(typeParameters);\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 reportReservedArrowTypeParam(node: any) {\n if (\n node.params.length === 1 &&\n !node.extra?.trailingComma &&\n this.getPluginOption(\"typescript\", \"disallowAmbiguousJSXLike\")\n ) {\n this.raise(TSErrors.ReservedArrowTypeParam, { at: node });\n }\n }\n\n // Handle type assertions\n parseMaybeUnary(refExpressionErrors?: ?ExpressionErrors): N.Expression {\n if (!this.hasPlugin(\"jsx\") && this.match(tt.lt)) {\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(TSErrors.PatternIsOptional, { at: param });\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 isAssignable(node: N.Node, isBinding?: boolean): boolean {\n switch (node.type) {\n case \"TSTypeCastExpression\":\n return this.isAssignable(node.expression, isBinding);\n case \"TSParameterProperty\":\n return true;\n default:\n return super.isAssignable(node, isBinding);\n }\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 isValidLVal(type: string, isParenthesized: boolean, binding: BindingTypes) {\n return (\n getOwn(\n {\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 TSTypeCastExpression: true,\n TSParameterProperty: \"parameter\",\n TSNonNullExpression: \"expression\",\n TSAsExpression: (binding !== BIND_NONE || isParenthesized) && [\n \"expression\",\n true,\n ],\n TSTypeAssertion: (binding !== BIND_NONE || isParenthesized) && [\n \"expression\",\n true,\n ],\n },\n type,\n ) || super.isValidLVal(type, isParenthesized, binding)\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 // handles `@f<<T>`\n if (this.match(tt.lt) || this.match(tt.bitShiftL)) {\n const typeArguments = this.tsParseTypeArgumentsInExpression();\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(null, tt.parenL);\n }\n\n return super.parseMaybeDecoratorArguments(expr);\n }\n\n checkCommaAfterRest(close): boolean {\n if (\n this.state.isAmbientContext &&\n this.match(tt.comma) &&\n this.lookaheadCharCode() === close\n ) {\n this.next();\n return false;\n } else {\n return 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.match(tt.lt) || 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(TSErrors.TypeAnnotationAfterAssign, {\n at: node.typeAnnotation,\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 (this.state.inType) {\n if (code === charCodes.greaterThan) {\n return this.finishOp(tt.gt, 1);\n }\n if (code === charCodes.lessThan) {\n return this.finishOp(tt.lt, 1);\n }\n }\n return super.getTokenFromCode(code);\n }\n\n // used after we have finished parsing types\n reScan_lt_gt() {\n const { type } = this.state;\n if (type === tt.lt) {\n this.state.pos -= 1;\n this.readToken_lt();\n } else if (type === tt.gt) {\n this.state.pos -= 1;\n this.readToken_gt();\n }\n }\n\n reScan_lt() {\n const { type } = this.state;\n if (type === tt.bitShiftL) {\n this.state.pos -= 2;\n this.finishOp(tt.lt, 1);\n return tt.lt;\n }\n return type;\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(TSErrors.UnexpectedTypeCastInParameter, {\n at: expr,\n });\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(node.expression, node.typeAnnotation.loc.end);\n\n return node.expression;\n }\n\n shouldParseArrow(params: Array<N.Node>) {\n if (this.match(tt.colon)) {\n return params.every(expr => this.isAssignable(expr, true));\n }\n return super.shouldParseArrow(params);\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 // handles `<Component<<T>`\n if (this.match(tt.lt) || this.match(tt.bitShiftL)) {\n const typeArguments = this.tsTryParseAndCatch(() =>\n this.tsParseTypeArgumentsInExpression(),\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 {\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(tt._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(TSErrors.NonClassMethodPropertyHasAbstractModifer, {\n at: node,\n });\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(TSErrors.AbstractMethodHasImplementation, {\n at: method,\n methodName:\n key.type === \"Identifier\" && !method.computed\n ? key.name\n : `[${this.input.slice(key.start, key.end)}]`,\n });\n }\n }\n return method;\n }\n\n tsParseTypeParameterName(): N.Identifier | string {\n const typeName: N.Identifier = this.parseIdentifier();\n return process.env.BABEL_8_BREAKING ? typeName : typeName.name;\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 parseExportSpecifier(\n node: any,\n isString: boolean,\n isInTypeExport: boolean,\n isMaybeTypeOnly: boolean,\n ) {\n if (!isString && isMaybeTypeOnly) {\n this.parseTypeOnlyImportExportSpecifier(\n node,\n /* isImport */ false,\n isInTypeExport,\n );\n return this.finishNode<N.ExportSpecifier>(node, \"ExportSpecifier\");\n }\n node.exportKind = \"value\";\n return super.parseExportSpecifier(\n node,\n isString,\n isInTypeExport,\n isMaybeTypeOnly,\n );\n }\n\n parseImportSpecifier(\n specifier: any,\n importedIsString: boolean,\n isInTypeOnlyImport: boolean,\n isMaybeTypeOnly: boolean,\n ): N.ImportSpecifier {\n if (!importedIsString && isMaybeTypeOnly) {\n this.parseTypeOnlyImportExportSpecifier(\n specifier,\n /* isImport */ true,\n isInTypeOnlyImport,\n );\n return this.finishNode<N.ImportSpecifier>(specifier, \"ImportSpecifier\");\n }\n specifier.importKind = \"value\";\n return super.parseImportSpecifier(\n specifier,\n importedIsString,\n isInTypeOnlyImport,\n isMaybeTypeOnly,\n );\n }\n\n parseTypeOnlyImportExportSpecifier(\n node: any,\n isImport: boolean,\n isInTypeOnlyImportExport: boolean,\n ): void {\n const leftOfAsKey = isImport ? \"imported\" : \"local\";\n const rightOfAsKey = isImport ? \"local\" : \"exported\";\n\n let leftOfAs = node[leftOfAsKey];\n let rightOfAs;\n\n let hasTypeSpecifier = false;\n let canParseAsKeyword = true;\n\n const loc = leftOfAs.loc.start;\n\n // https://github.com/microsoft/TypeScript/blob/fc4f9d83d5939047aa6bb2a43965c6e9bbfbc35b/src/compiler/parser.ts#L7411-L7456\n // import { type } from \"mod\"; - hasTypeSpecifier: false, leftOfAs: type\n // import { type as } from \"mod\"; - hasTypeSpecifier: true, leftOfAs: as\n // import { type as as } from \"mod\"; - hasTypeSpecifier: false, leftOfAs: type, rightOfAs: as\n // import { type as as as } from \"mod\"; - hasTypeSpecifier: true, leftOfAs: as, rightOfAs: as\n if (this.isContextual(tt._as)) {\n // { type as ...? }\n const firstAs = this.parseIdentifier();\n if (this.isContextual(tt._as)) {\n // { type as as ...? }\n const secondAs = this.parseIdentifier();\n if (tokenIsKeywordOrIdentifier(this.state.type)) {\n // { type as as something }\n hasTypeSpecifier = true;\n leftOfAs = firstAs;\n rightOfAs = isImport\n ? this.parseIdentifier()\n : this.parseModuleExportName();\n canParseAsKeyword = false;\n } else {\n // { type as as }\n rightOfAs = secondAs;\n canParseAsKeyword = false;\n }\n } else if (tokenIsKeywordOrIdentifier(this.state.type)) {\n // { type as something }\n canParseAsKeyword = false;\n rightOfAs = isImport\n ? this.parseIdentifier()\n : this.parseModuleExportName();\n } else {\n // { type as }\n hasTypeSpecifier = true;\n leftOfAs = firstAs;\n }\n } else if (tokenIsKeywordOrIdentifier(this.state.type)) {\n // { type something ...? }\n hasTypeSpecifier = true;\n leftOfAs = isImport\n ? this.parseIdentifier()\n : this.parseModuleExportName();\n }\n if (hasTypeSpecifier && isInTypeOnlyImportExport) {\n this.raise(\n isImport\n ? TSErrors.TypeModifierIsUsedInTypeImports\n : TSErrors.TypeModifierIsUsedInTypeExports,\n { at: loc },\n );\n }\n\n node[leftOfAsKey] = leftOfAs;\n node[rightOfAsKey] = rightOfAs;\n\n const kindKey = isImport ? \"importKind\" : \"exportKind\";\n node[kindKey] = hasTypeSpecifier ? \"type\" : \"value\";\n\n if (canParseAsKeyword && this.eatContextual(tt._as)) {\n node[rightOfAsKey] = isImport\n ? this.parseIdentifier()\n : this.parseModuleExportName();\n }\n if (!node[rightOfAsKey]) {\n node[rightOfAsKey] = cloneIdentifier(node[leftOfAsKey]);\n }\n if (isImport) {\n this.checkIdentifier(node[rightOfAsKey], BIND_LEXICAL);\n }\n }\n };\n\nfunction isPossiblyLiteralEnum(expression: N.Expression): boolean {\n if (expression.type !== \"MemberExpression\") return false;\n\n const { computed, property } = expression;\n\n if (\n computed &&\n property.type !== \"StringLiteral\" &&\n (property.type !== \"TemplateLiteral\" || property.expressions.length > 0)\n ) {\n return false;\n }\n\n return isUncomputedMemberExpressionChain(expression.object);\n}\n\nfunction isUncomputedMemberExpressionChain(expression: N.Expression): boolean {\n if (expression.type === \"Identifier\") return true;\n if (expression.type !== \"MemberExpression\") return false;\n if (expression.computed) return false;\n\n return isUncomputedMemberExpressionChain(expression.object);\n}\n","// @flow\n\nimport * as charCodes from \"charcodes\";\n\nimport { tokenLabelName, tt } from \"../tokenizer/types\";\nimport type Parser from \"../parser\";\nimport * as N from \"../types\";\nimport { ParseErrorEnum } from \"../parse-error\";\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\n/* eslint sort-keys: \"error\" */\nconst PlaceholderErrors = ParseErrorEnum`placeholders`(_ => ({\n ClassNameIsRequired: _(\"A class name is required.\"),\n UnexpectedSpace: _(\"Unexpected space in placeholder.\"),\n}));\n/* eslint-disable sort-keys */\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();\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();\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 isValidLVal(type: string, ...rest) {\n return type === \"Placeholder\" || super.isValidLVal(type, ...rest);\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(tt._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 throw this.raise(PlaceholderErrors.ClassNameIsRequired, {\n at: this.state.startLoc,\n });\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(tt._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 tokenLabelName(tt.placeholder),\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(tt._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(tt._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 // Throws if the current token and the prev one are separated by a space.\n assertNoSpace(): void {\n if (this.state.start > this.state.lastTokEndLoc.index) {\n this.raise(PlaceholderErrors.UnexpectedSpace, {\n at: this.state.lastTokEndLoc,\n });\n }\n }\n };\n","import type Parser from \"../parser\";\nimport { tokenIsIdentifier, 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 v8IntrinsicStartLoc = this.state.startLoc;\n // let the `loc` of Identifier starts from `%`\n const node = this.startNode();\n this.next(); // eat '%'\n if (tokenIsIdentifier(this.state.type)) {\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(v8IntrinsicStartLoc);\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\";\nimport type { PluginConfig } from \"./parser/base\";\n\nexport type Plugin = PluginConfig;\n\nexport type PluginList = $ReadOnlyArray<PluginConfig>;\n\nexport type MixinPlugin = (superClass: Class<Parser>) => Class<Parser>;\n\n// This function’s second parameter accepts either a string (plugin name) or an\n// array pair (plugin name and options object). If an options object is given,\n// then each value is non-recursively checked for identity with the actual\n// option value of each plugin in the first argument (which is an array of\n// plugin names or array pairs).\nexport function hasPlugin(\n plugins: PluginList,\n expectedConfig: PluginConfig,\n): boolean {\n // The expectedOptions object is by default an empty object if the given\n // expectedConfig argument does not give an options object (i.e., if it is a\n // string).\n const [expectedName, expectedOptions] =\n typeof expectedConfig === \"string\" ? [expectedConfig, {}] : expectedConfig;\n\n const expectedKeys = Object.keys(expectedOptions);\n\n const expectedOptionsIsEmpty = expectedKeys.length === 0;\n\n return plugins.some(p => {\n if (typeof p === \"string\") {\n return expectedOptionsIsEmpty && p === expectedName;\n } else {\n const [pluginName, pluginOptions] = p;\n if (pluginName !== expectedName) {\n return false;\n }\n for (const key of expectedKeys) {\n if (pluginOptions[key] !== expectedOptions[key]) {\n return false;\n }\n }\n return true;\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\", \"fsharp\", \"hack\", \"smart\"];\nconst TOPIC_TOKENS = [\"^^\", \"@@\", \"^\", \"%\", \"#\"];\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 (hasPlugin(plugins, \"pipelineOperator\")) {\n const proposal = getPluginOption(plugins, \"pipelineOperator\", \"proposal\");\n\n if (!PIPELINE_PROPOSALS.includes(proposal)) {\n const proposalList = PIPELINE_PROPOSALS.map(p => `\"${p}\"`).join(\", \");\n throw new Error(\n `\"pipelineOperator\" requires \"proposal\" option whose value must be one of: ${proposalList}.`,\n );\n }\n\n const tupleSyntaxIsHash = hasPlugin(plugins, [\n \"recordAndTuple\",\n { syntaxType: \"hash\" },\n ]);\n\n if (proposal === \"hack\") {\n if (hasPlugin(plugins, \"placeholders\")) {\n throw new Error(\n \"Cannot combine placeholders plugin and Hack-style pipes.\",\n );\n }\n\n if (hasPlugin(plugins, \"v8intrinsic\")) {\n throw new Error(\n \"Cannot combine v8intrinsic plugin and Hack-style pipes.\",\n );\n }\n\n const topicToken = getPluginOption(\n plugins,\n \"pipelineOperator\",\n \"topicToken\",\n );\n\n if (!TOPIC_TOKENS.includes(topicToken)) {\n const tokenList = TOPIC_TOKENS.map(t => `\"${t}\"`).join(\", \");\n\n throw new Error(\n `\"pipelineOperator\" in \"proposal\": \"hack\" mode also requires a \"topicToken\" option whose value must be one of: ${tokenList}.`,\n );\n }\n\n if (topicToken === \"#\" && tupleSyntaxIsHash) {\n throw new Error(\n 'Plugin conflict between `[\"pipelineOperator\", { proposal: \"hack\", topicToken: \"#\" }]` and `[\"recordAndtuple\", { syntaxType: \"hash\"}]`.',\n );\n }\n } else if (proposal === \"smart\" && tupleSyntaxIsHash) {\n throw new Error(\n 'Plugin conflict between `[\"pipelineOperator\", { proposal: \"smart\" }]` and `[\"recordAndtuple\", { syntaxType: \"hash\"}]`.',\n );\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 startColumn: number,\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 attachComment: 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 // Column (0-based) from which to start counting source. Useful for\n // integration with other tools.\n startColumn: 0,\n // Line (1-based) 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 // When enabled, comments will be attached to adjacent AST nodes as one of\n // `leadingComments`, `trailingComments` and `innerComments`. The comment attachment\n // is vital to preserve comments after transform. If you don't print AST back,\n // consider set this option to `false` for performance\n attachComment: true,\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; */\nimport * as charCodes from \"charcodes\";\nimport { tt, type TokenType } from \"../tokenizer/types\";\nimport type {\n TSParameterProperty,\n Decorator,\n Expression,\n Identifier,\n Node,\n Pattern,\n RestElement,\n SpreadElement,\n /*:: ObjectOrClassMember, */\n /*:: ClassMember, */\n ObjectMember,\n /*:: TsNamedTypeElementBase, */\n /*:: PrivateName, */\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 {\n type BindingTypes,\n BIND_NONE,\n BIND_SCOPE_LEXICAL,\n} from \"../util/scopeflags\";\nimport { ExpressionErrors } from \"./util\";\nimport { Errors, type LValAncestor } from \"../parse-error\";\n\nconst getOwn = (object, key) =>\n Object.hasOwnProperty.call(object, key) && object[key];\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 +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 +parsePropertyName: (\n prop: ObjectOrClassMember | ClassMember | TsNamedTypeElementBase,\n ) => Expression | Identifier;\n +parsePrivateName: () => PrivateName\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.\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({ at: node });\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(Errors.InvalidParenthesizedAssignment, { at: node });\n }\n } else {\n this.raise(Errors.InvalidParenthesizedAssignment, { at: node });\n }\n }\n\n switch (node.type) {\n case \"Identifier\":\n case \"ObjectPattern\":\n case \"ArrayPattern\":\n case \"AssignmentPattern\":\n case \"RestElement\":\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?.trailingCommaLoc\n ) {\n this.raise(Errors.RestTrailingComma, {\n at: node.extra.trailingCommaLoc,\n });\n }\n }\n break;\n\n case \"ObjectProperty\": {\n const { key, value } = node;\n if (this.isPrivateName(key)) {\n this.classScope.usePrivateName(\n this.getPrivateNameSV(key),\n key.loc.start,\n );\n }\n this.toAssignable(value, isLHS);\n break;\n }\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(\n node.elements,\n node.extra?.trailingCommaLoc,\n isLHS,\n );\n break;\n\n case \"AssignmentExpression\":\n if (node.operator !== \"=\") {\n this.raise(Errors.MissingEqInAssignment, { at: node.left.loc.end });\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 this.raise(\n prop.kind === \"get\" || prop.kind === \"set\"\n ? Errors.PatternHasAccessor\n : Errors.PatternHasMethod,\n { at: prop.key },\n );\n } else if (prop.type === \"SpreadElement\" && !isLast) {\n this.raise(Errors.RestTrailingComma, { at: prop });\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 trailingCommaLoc?: ?Position,\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 (trailingCommaLoc) {\n this.raise(Errors.RestTrailingComma, { at: trailingCommaLoc });\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.raise(Errors.RestTrailingComma, { at: elt });\n }\n }\n }\n return exprList;\n }\n\n isAssignable(node: Node, isBinding?: boolean): boolean {\n switch (node.type) {\n case \"Identifier\":\n case \"ObjectPattern\":\n case \"ArrayPattern\":\n case \"AssignmentPattern\":\n case \"RestElement\":\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(\n element => element === null || this.isAssignable(element),\n );\n\n case \"AssignmentExpression\":\n return node.operator === \"=\";\n\n case \"ParenthesizedExpression\":\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 // 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 if (!this.checkCommaAfterRest(closeCharCode)) {\n this.expect(close);\n break;\n }\n } else {\n const decorators = [];\n if (this.match(tt.at) && this.hasPlugin(\"decorators\")) {\n this.raise(Errors.UnsupportedParameterDecorator, {\n at: this.state.startLoc,\n });\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 // https://tc39.es/ecma262/#prod-BindingRestProperty\n parseBindingRestProperty(prop: RestElement): RestElement {\n this.next(); // eat '...'\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 // https://tc39.es/ecma262/#prod-BindingProperty\n parseBindingProperty(): ObjectMember | RestElement {\n const prop = this.startNode();\n const { type, start: startPos, startLoc } = this.state;\n if (type === tt.ellipsis) {\n return this.parseBindingRestProperty(prop);\n } else if (type === tt.privateName) {\n this.expectPlugin(\"destructuringPrivate\", startLoc);\n this.classScope.usePrivateName(this.state.value, startLoc);\n prop.key = this.parsePrivateName();\n } else {\n this.parsePropertyName(prop);\n }\n prop.method = false;\n this.parseObjPropValue(\n prop,\n startPos,\n startLoc,\n false /* isGenerator */,\n false /* isAsync */,\n true /* isPattern */,\n false /* isAccessor */,\n );\n\n return prop;\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 * Return information use in determining whether a Node of a given type is an LVal,\n * possibly given certain additional context information.\n *\n * Subclasser notes: This method has kind of a lot of mixed, but related,\n * responsibilities. If we can definitively determine with the information\n * provided that this either *is* or *isn't* a valid `LVal`, then the return\n * value is easy: just return `true` or `false`. However, if it is a valid\n * LVal *ancestor*, and thus it's descendents must be subsquently visited to\n * continue the \"investigation\", then this method should return the relevant\n * child key as a `string`. In some special cases, you additionally want to\n * convey that this node should be treated as if it were parenthesized. In\n * that case, a tuple of [key: string, parenthesized: boolean] is returned.\n * The `string`-only return option is actually just a shorthand for:\n * `[key: string, parenthesized: false]`.\n *\n * @param {NodeType} type A Node `type` string\n * @param {boolean} isParenthesized\n * Whether the node in question is parenthesized.\n * @param {BindingTypes} binding\n * The binding operation that is being considered for this potential\n * LVal.\n * @returns { boolean | string | [string, boolean] }\n * `true` or `false` if we can immediately determine whether the node\n * type in question can be treated as an `LVal`.\n * A `string` key to traverse if we must check this child.\n * A `[string, boolean]` tuple if we need to check this child and\n * treat is as parenthesized.\n */\n // eslint-disable-next-line no-unused-vars\n isValidLVal(type: string, isParenthesized: boolean, binding: BindingTypes) {\n return getOwn(\n {\n AssignmentPattern: \"left\",\n RestElement: \"argument\",\n ObjectProperty: \"value\",\n ParenthesizedExpression: \"expression\",\n ArrayPattern: \"elements\",\n ObjectPattern: \"properties\",\n },\n type,\n );\n }\n\n /**\n * Verify that a target expression is an lval (something that can be assigned to).\n *\n * @param {Expression} expression The expression in question to check.\n * @param {Object} options A set of options described below.\n * @param {LValAncestor} options.in\n * The relevant ancestor to provide context information for the error\n * if the check fails.\n * @param {BindingTypes} [options.binding=BIND_NONE]\n * The desired binding type. If the given expression is an identifier\n * and `binding` is not `BIND_NONE`, `checkLVal` will register binding\n * to the parser scope See also `src/util/scopeflags.js`\n * @param {Set<string>|false} [options.checkClashes=false]\n * An optional string set to check if an identifier name is included.\n * `checkLVal` will add checked identifier name to `checkClashes` It is\n * used in tracking duplicates in function parameter lists. If it is\n * false, `checkLVal` will skip duplicate checks\n * @param {boolean} [options.allowingSloppyLetBinding]\n * Whether an identifier named \"let\" should be allowed in sloppy mode.\n * Defaults to `true` unless lexical scope its being used. This property\n * is only relevant if the parser's state is in sloppy mode.\n * @param {boolean} [options.strictModeChanged=false]\n * Whether an identifier has been parsed in a sloppy context but should\n * be reinterpreted as strict-mode. e.g. `(arguments) => { \"use strict \"}`\n * @param {boolean} [options.hasParenthesizedAncestor=false]\n * This is only used internally during recursive calls, and you should\n * not have to set it yourself.\n * @memberof LValParser\n */\n\n checkLVal(\n expression: Expression | ObjectMember | RestElement,\n {\n in: ancestor,\n binding = BIND_NONE,\n checkClashes = false,\n strictModeChanged = false,\n allowingSloppyLetBinding = !(binding & BIND_SCOPE_LEXICAL),\n hasParenthesizedAncestor = false,\n }: {\n in: LValAncestor,\n binding?: BindingTypes,\n checkClashes?: Set<string> | false,\n strictModeChanged?: boolean,\n allowingSloppyLetBinding?: boolean,\n hasParenthesizedAncestor?: boolean,\n },\n ): void {\n const type = expression.type;\n\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 if (this.isObjectMethod(expression)) return;\n\n if (type === \"MemberExpression\") {\n if (binding !== BIND_NONE) {\n this.raise(Errors.InvalidPropertyBindingPattern, { at: expression });\n }\n return;\n }\n\n if (expression.type === \"Identifier\") {\n this.checkIdentifier(\n expression,\n binding,\n strictModeChanged,\n allowingSloppyLetBinding,\n );\n\n const { name } = expression;\n\n if (checkClashes) {\n if (checkClashes.has(name)) {\n this.raise(Errors.ParamDupe, { at: expression });\n } else {\n checkClashes.add(name);\n }\n }\n\n return;\n }\n\n const validity = this.isValidLVal(\n expression.type,\n hasParenthesizedAncestor || expression.extra?.parenthesized,\n binding,\n );\n\n if (validity === true) return;\n\n if (validity === false) {\n const ParseErrorClass =\n binding === BIND_NONE ? Errors.InvalidLhs : Errors.InvalidLhsBinding;\n\n this.raise(ParseErrorClass, {\n at: expression,\n ancestor:\n ancestor.type === \"UpdateExpression\"\n ? { type: \"UpdateExpression\", prefix: ancestor.prefix }\n : { type: ancestor.type },\n });\n return;\n }\n\n const [key, isParenthesizedExpression] = Array.isArray(validity)\n ? validity\n : [validity, type === \"ParenthesizedExpression\"];\n const nextAncestor =\n expression.type === \"ArrayPattern\" ||\n expression.type === \"ObjectPattern\" ||\n expression.type === \"ParenthesizedExpression\"\n ? expression\n : ancestor;\n\n // Flow has difficulty tracking `key` and `expression`, but only if we use\n // null-proto objects. If we use normal objects, everything works fine.\n // $FlowIgnore\n for (const child of [].concat(expression[key])) {\n if (child) {\n this.checkLVal(child, {\n in: nextAncestor,\n binding,\n checkClashes,\n allowingSloppyLetBinding,\n strictModeChanged,\n hasParenthesizedAncestor: isParenthesizedExpression,\n });\n }\n }\n }\n\n checkIdentifier(\n at: Identifier,\n bindingType: BindingTypes,\n strictModeChanged: boolean = false,\n allowLetBinding: boolean = !(bindingType & BIND_SCOPE_LEXICAL),\n ) {\n if (\n this.state.strict &&\n (strictModeChanged\n ? isStrictBindReservedWord(at.name, this.inModule)\n : isStrictBindOnlyReservedWord(at.name))\n ) {\n if (bindingType === BIND_NONE) {\n this.raise(Errors.StrictEvalArguments, { at, referenceName: at.name });\n } else {\n this.raise(Errors.StrictEvalArgumentsBinding, {\n at,\n bindingName: at.name,\n });\n }\n }\n\n if (!allowLetBinding && at.name === \"let\") {\n this.raise(Errors.LetInLexicalBinding, { at });\n }\n\n if (!(bindingType & BIND_NONE)) {\n this.declareNameFromIdentifier(at, bindingType);\n }\n }\n\n declareNameFromIdentifier(identifier: Identifier, binding: BindingTypes) {\n this.scope.declareName(identifier.name, binding, identifier.loc.start);\n }\n\n checkToRestConversion(node: SpreadElement): void {\n if (\n node.argument.type !== \"Identifier\" &&\n node.argument.type !== \"MemberExpression\"\n ) {\n this.raise(Errors.InvalidRestAssignmentPattern, {\n at: node.argument,\n });\n }\n }\n\n checkCommaAfterRest(close: $Values<typeof charCodes>): boolean {\n if (!this.match(tt.comma)) {\n return false;\n }\n\n this.raise(\n this.lookaheadCharCode() === close\n ? Errors.RestTrailingComma\n : Errors.ElementAfterRest,\n { at: this.state.startLoc },\n );\n\n return true;\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 {\n tokenCanStartExpression,\n tokenIsAssignment,\n tokenIsIdentifier,\n tokenIsKeywordOrIdentifier,\n tokenIsOperator,\n tokenIsPostfix,\n tokenIsPrefix,\n tokenIsRightAssociative,\n tokenIsTemplate,\n tokenKeywordOrIdentifierIsKeyword,\n tokenLabelName,\n tokenOperatorPrecedence,\n tt,\n type TokenType,\n} from \"../tokenizer/types\";\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 { Position, createPositionWithColumnOffset } 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} from \"../util/scopeflags\";\nimport { ExpressionErrors } from \"./util\";\nimport {\n PARAM_AWAIT,\n PARAM_IN,\n PARAM_RETURN,\n functionFlags,\n} from \"../util/production-parameter\";\nimport {\n newArrowHeadScope,\n newAsyncArrowScope,\n newExpressionScope,\n} from \"../util/expression-scope\";\nimport { Errors, type ParseError } from \"../parse-error\";\nimport { UnparenthesizedPipeBodyDescriptions } from \"../parse-error/pipeline-operator-errors\";\nimport { setInnerComments } from \"./comments\";\nimport { cloneIdentifier } from \"./node\";\n\n/*::\nimport type { SourceType } from \"../options\";\ndeclare var invariant;\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(Errors.RecordNoProto, { at: key });\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.doubleProtoLoc === null) {\n refExpressionErrors.doubleProtoLoc = key.loc.start;\n }\n } else {\n this.raise(Errors.DuplicateProto, { at: key });\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 this.enterInitialScopes();\n this.nextToken();\n const expr = this.parseExpression();\n if (!this.match(tt.eof)) {\n this.unexpected();\n }\n // Unlike parseTopLevel, we need to drain remaining commentStacks\n // because the top level node is _not_ Program.\n this.finalizeRemainingComments();\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 ) {\n return this.disallowInAnd(() =>\n this.parseMaybeAssign(refExpressionErrors, afterLeftParse),\n );\n }\n\n // Set [+In] parameter for assignment expression\n parseMaybeAssignAllowIn(\n refExpressionErrors?: ?ExpressionErrors,\n afterLeftParse?: Function,\n ) {\n return this.allowInAnd(() =>\n this.parseMaybeAssign(refExpressionErrors, afterLeftParse),\n );\n }\n\n // This method is only used by\n // the typescript and flow plugins.\n setOptionalParametersError(\n refExpressionErrors: ExpressionErrors,\n resultError?: ParseError<any>,\n ) {\n refExpressionErrors.optionalParametersLoc =\n resultError?.loc ?? this.state.startLoc;\n }\n\n // Parse an assignment expression. This includes applications of\n // operators like `+=`.\n // https://tc39.es/ecma262/#prod-AssignmentExpression\n parseMaybeAssign(\n refExpressionErrors?: ?ExpressionErrors,\n afterLeftParse?: Function,\n ): N.Expression {\n const startPos = this.state.start;\n const startLoc = this.state.startLoc;\n if (this.isContextual(tt._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 const { type } = this.state;\n\n if (type === tt.parenL || tokenIsIdentifier(type)) {\n this.state.potentialArrowAt = this.state.start;\n }\n\n let left = this.parseMaybeConditional(refExpressionErrors);\n if (afterLeftParse) {\n left = afterLeftParse.call(this, left, startPos, startLoc);\n }\n if (tokenIsAssignment(this.state.type)) {\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\n if (\n refExpressionErrors.doubleProtoLoc != null &&\n refExpressionErrors.doubleProtoLoc.index >= startPos\n ) {\n refExpressionErrors.doubleProtoLoc = null; // reset because double __proto__ is valid in assignment expression\n }\n if (\n refExpressionErrors.shorthandAssignLoc != null &&\n refExpressionErrors.shorthandAssignLoc.index >= startPos\n ) {\n refExpressionErrors.shorthandAssignLoc = null; // reset because shorthand default was used correctly\n }\n if (\n refExpressionErrors.privateKeyLoc != null &&\n refExpressionErrors.privateKeyLoc.index >= startPos\n ) {\n this.checkDestructuringPrivate(refExpressionErrors);\n refExpressionErrors.privateKeyLoc = null; // reset because `({ #x: x })` is an assignable pattern\n }\n } else {\n node.left = left;\n }\n\n this.next();\n node.right = this.parseMaybeAssign();\n this.checkLVal(left, {\n in: this.finishNode(node, \"AssignmentExpression\"),\n });\n return node;\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(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.parseExprOps(refExpressionErrors);\n\n if (this.shouldExitDescending(expr, potentialArrowAt)) {\n return expr;\n }\n\n return this.parseConditional(expr, startPos, startLoc, refExpressionErrors);\n }\n\n parseConditional(\n expr: N.Expression,\n startPos: number,\n startLoc: Position,\n // eslint-disable-next-line no-unused-vars\n refExpressionErrors?: ?ExpressionErrors,\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 parseMaybeUnaryOrPrivate(\n refExpressionErrors?: ExpressionErrors,\n ): N.Expression | N.PrivateName {\n return this.match(tt.privateName)\n ? this.parsePrivateName()\n : this.parseMaybeUnary(refExpressionErrors);\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.parseMaybeUnaryOrPrivate(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.PrivateName,\n leftStartPos: number,\n leftStartLoc: Position,\n minPrec: number,\n ): N.Expression {\n if (this.isPrivateName(left)) {\n // https://tc39.es/ecma262/#prod-RelationalExpression\n // RelationalExpression [In, Yield, Await]\n // [+In] PrivateIdentifier in ShiftExpression[?Yield, ?Await]\n\n const value = this.getPrivateNameSV(left);\n\n if (\n minPrec >= tokenOperatorPrecedence(tt._in) ||\n !this.prodParam.hasIn ||\n !this.match(tt._in)\n ) {\n this.raise(Errors.PrivateInExpectedIn, {\n at: left,\n identifierName: value,\n });\n }\n\n this.classScope.usePrivateName(value, left.loc.start);\n }\n\n const op = this.state.type;\n if (tokenIsOperator(op) && (this.prodParam.hasIn || !this.match(tt._in))) {\n let prec = tokenOperatorPrecedence(op);\n if (prec > minPrec) {\n if (op === tt.pipeline) {\n this.expectPlugin(\"pipelineOperator\");\n if (this.state.inFSharpPipelineDirectBody) {\n return left;\n }\n this.checkPipelineAtInfixOperator(left, leftStartLoc);\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 = tokenOperatorPrecedence(tt.logicalAND);\n }\n\n this.next();\n\n if (\n op === tt.pipeline &&\n this.hasPlugin([\"pipelineOperator\", { proposal: \"minimal\" }])\n ) {\n if (this.state.type === tt._await && this.prodParam.hasAwait) {\n throw this.raise(Errors.UnexpectedAwaitAfterPipelineBody, {\n at: this.state.startLoc,\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(Errors.MixingCoalesceWithLogical, {\n at: this.state.startLoc,\n });\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 \"hack\":\n return this.withTopicBindingContext(() => {\n return this.parseHackPipeBody();\n });\n\n case \"smart\":\n return this.withTopicBindingContext(() => {\n if (this.prodParam.hasYield && this.isContextual(tt._yield)) {\n throw this.raise(Errors.PipeBodyIsTighter, {\n at: this.state.startLoc,\n });\n }\n return this.parseSmartPipelineBodyInStyle(\n this.parseExprOpBaseRightExpr(op, prec),\n startPos,\n startLoc,\n );\n });\n\n case \"fsharp\":\n return this.withSoloAwaitPermittingContext(() => {\n return this.parseFSharpPipelineBody(prec);\n });\n }\n\n // Falls through.\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.parseMaybeUnaryOrPrivate(),\n startPos,\n startLoc,\n tokenIsRightAssociative(op) ? prec - 1 : prec,\n );\n }\n\n parseHackPipeBody(): N.Expression {\n const { startLoc } = this.state;\n const body = this.parseMaybeAssign();\n const requiredParentheses = UnparenthesizedPipeBodyDescriptions.has(\n body.type,\n );\n\n // TODO: Check how to handle type casts in Flow and TS once they are supported\n if (requiredParentheses && !body.extra?.parenthesized) {\n this.raise(Errors.PipeUnparenthesizedBody, {\n at: startLoc,\n type: body.type,\n });\n }\n if (!this.topicReferenceWasUsedInCurrentContext()) {\n // A Hack pipe body must use the topic reference at least once.\n this.raise(Errors.PipeTopicUnused, { at: startLoc });\n }\n\n return body;\n }\n\n checkExponentialAfterUnary(node: N.AwaitExpression | N.UnaryExpression) {\n if (this.match(tt.exponent)) {\n this.raise(Errors.UnexpectedTokenUnaryExponentiation, {\n at: node.argument,\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(tt._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 const update = this.match(tt.incDec);\n const node = this.startNode();\n if (tokenIsPrefix(this.state.type)) {\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(Errors.StrictDelete, { at: node });\n } else if (this.hasPropertyAsPrivateName(arg)) {\n this.raise(Errors.DeletePrivateField, { at: node });\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 { type } = this.state;\n const startsExpr = this.hasPlugin(\"v8intrinsic\")\n ? tokenCanStartExpression(type)\n : tokenCanStartExpression(type) && !this.match(tt.modulo);\n if (startsExpr && !this.isAmbiguousAwait()) {\n this.raiseOverwrite(Errors.AwaitNotInAsyncContext, { at: startLoc });\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, {\n in: this.finishNode(node, \"UpdateExpression\"),\n });\n return node;\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 (tokenIsPostfix(this.state.type) && !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.next();\n this.checkLVal(expr, {\n in: (expr = this.finishNode(node, \"UpdateExpression\")),\n });\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 const { type } = this.state;\n if (!noCalls && type === tt.doubleColon) {\n return this.parseBind(base, startPos, startLoc, noCalls, state);\n } else if (tokenIsTemplate(type)) {\n return this.parseTaggedTemplateExpression(\n base,\n startPos,\n startLoc,\n state,\n );\n }\n\n let optional = false;\n\n if (type === 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 {\n const computed = this.eat(tt.bracketL);\n if (computed || optional || this.eat(tt.dot)) {\n return this.parseMember(\n base,\n startPos,\n startLoc,\n state,\n computed,\n optional,\n );\n } else {\n state.stop = true;\n return base;\n }\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 computed: boolean,\n optional: boolean,\n ): N.OptionalMemberExpression | N.MemberExpression {\n const node = this.startNodeAt(startPos, startLoc);\n node.object = base;\n node.computed = computed;\n if (computed) {\n node.property = this.parseExpression();\n this.expect(tt.bracketR);\n } else if (this.match(tt.privateName)) {\n if (base.type === \"Super\") {\n this.raise(Errors.SuperPrivateField, { at: startLoc });\n }\n this.classScope.usePrivateName(this.state.value, this.state.startLoc);\n node.property = this.parsePrivateName();\n } else {\n node.property = this.parseIdentifier(true);\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 this.next(); // eat '::'\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 const { maybeAsyncArrow, optionalChainMember } = state;\n\n if (maybeAsyncArrow) {\n this.expressionScope.enter(newAsyncArrowScope());\n refExpressionErrors = new ExpressionErrors();\n }\n\n if (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, optionalChainMember);\n\n if (maybeAsyncArrow && this.shouldParseAsyncArrow() && !optional) {\n /*:: invariant(refExpressionErrors != null) */\n state.stop = true;\n this.checkDestructuringPrivate(refExpressionErrors);\n this.expressionScope.validateAsPattern();\n this.expressionScope.exit();\n node = this.parseAsyncArrowFromCallExpression(\n this.startNodeAt(startPos, startLoc),\n node,\n );\n } else {\n if (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(Errors.OptionalChainingNoTemplate, { at: startLoc });\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.lastTokEndLoc.index === 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(Errors.ImportCallArity, {\n at: node,\n maxArgumentCount:\n this.hasPlugin(\"importAssertions\") ||\n this.hasPlugin(\"moduleAttributes\")\n ? 2\n : 1,\n });\n } else {\n for (const arg of node.arguments) {\n if (arg.type === \"SpreadElement\") {\n this.raise(Errors.ImportCallSpreadArgument, { at: arg });\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(Errors.ImportCallArgumentTrailingComma, {\n at: this.state.lastTokStartLoc,\n });\n }\n if (nodeForExtra) {\n this.addTrailingCommaExtraToNode(nodeForExtra);\n }\n this.next();\n break;\n }\n }\n\n elts.push(\n this.parseExprListItem(false, refExpressionErrors, allowPlaceholder),\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.resetPreviousNodeTrailingComments(call);\n this.expect(tt.arrow);\n this.parseArrowExpression(\n node,\n call.arguments,\n true,\n call.extra?.trailingCommaLoc,\n );\n // mark inner comments of `async()` as inner comments of `async () =>`\n if (call.innerComments) {\n setInnerComments(node, call.innerComments);\n }\n // mark trailing comments of `async` to be inner comments\n if (call.callee.trailingComments) {\n setInnerComments(node, call.callee.trailingComments);\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 const { type } = this.state;\n switch (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(Errors.UnsupportedImport, {\n at: this.state.lastTokStartLoc,\n });\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._do: {\n return this.parseDo(this.startNode(), 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 );\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 );\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.templateNonTail:\n case tt.templateTail:\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(Errors.UnsupportedBind, { at: callee });\n }\n }\n\n case tt.privateName: {\n // Standalone private names are only allowed in \"#x in obj\"\n // expressions, and they are directly handled by callers of\n // parseExprOp. If we reach this, the input is always invalid.\n // We can throw a better error message and recover, rather than\n // just throwing \"Unexpected token\" (which is the default\n // behavior of this big switch statement).\n this.raise(Errors.PrivateInExpectedIn, {\n at: this.state.startLoc,\n identifierName: this.state.value,\n });\n return this.parsePrivateName();\n }\n\n case tt.moduloAssign: {\n return this.parseTopicReferenceThenEqualsSign(tt.modulo, \"%\");\n }\n\n case tt.xorAssign: {\n return this.parseTopicReferenceThenEqualsSign(tt.bitwiseXOR, \"^\");\n }\n\n case tt.doubleCaret:\n case tt.doubleAt: {\n return this.parseTopicReference(\"hack\");\n }\n\n case tt.bitwiseXOR:\n case tt.modulo:\n case tt.hash: {\n const pipeProposal = this.getPluginOption(\n \"pipelineOperator\",\n \"proposal\",\n );\n\n if (pipeProposal) {\n return this.parseTopicReference(pipeProposal);\n } else {\n throw this.unexpected();\n }\n }\n\n case tt.lt: {\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 break;\n } else {\n throw this.unexpected();\n }\n }\n\n default:\n if (tokenIsIdentifier(type)) {\n if (\n this.isContextual(tt._module) &&\n this.lookaheadCharCode() === charCodes.leftCurlyBrace &&\n !this.hasFollowingLineBreak()\n ) {\n return this.parseModuleExpression();\n }\n const canBeArrow = this.state.potentialArrowAt === this.state.start;\n const containsEsc = this.state.containsEsc;\n const id = this.parseIdentifier();\n\n if (\n !containsEsc &&\n id.name === \"async\" &&\n !this.canInsertSemicolon()\n ) {\n const { type } = this.state;\n if (type === tt._function) {\n this.resetPreviousNodeTrailingComments(id);\n this.next();\n return this.parseFunction(\n this.startNodeAtNode(id),\n undefined,\n true,\n );\n } else if (tokenIsIdentifier(type)) {\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 // although `id` is not used in async arrow unary function,\n // we don't need to reset `async`'s trailing comments because\n // it will be attached to the upcoming async arrow binding identifier\n return this.parseAsyncArrowUnaryFunction(\n this.startNodeAtNode(id),\n );\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 (type === tt._do) {\n this.resetPreviousNodeTrailingComments(id);\n return this.parseDo(this.startNodeAtNode(id), true);\n }\n }\n\n if (\n canBeArrow &&\n this.match(tt.arrow) &&\n !this.canInsertSemicolon()\n ) {\n this.next();\n return this.parseArrowExpression(\n this.startNodeAtNode(id),\n [id],\n false,\n );\n }\n\n return id;\n } else {\n throw this.unexpected();\n }\n }\n }\n\n // This helper method should only be called\n // when the parser has reached a potential Hack pipe topic token\n // that is followed by an equals sign.\n // See <https://github.com/js-choi/proposal-hack-pipes>.\n // If we find ^= or %= in an expression position\n // (i.e., the tt.moduloAssign or tt.xorAssign token types), and if the\n // Hack-pipes proposal is active with ^ or % as its topicToken, then the ^ or\n // % could be the topic token (e.g., in x |> ^==y or x |> ^===y), and so we\n // reparse the current token as ^ or %.\n // Otherwise, this throws an unexpected-token error.\n parseTopicReferenceThenEqualsSign(\n topicTokenType: TokenType,\n topicTokenValue: string,\n ): N.Expression {\n const pipeProposal = this.getPluginOption(\"pipelineOperator\", \"proposal\");\n\n if (pipeProposal) {\n // Set the most-recent token to be a topic token\n // given by the tokenType and tokenValue.\n // Now the next readToken() call (in parseTopicReference)\n // will consume that “topic token”.\n this.state.type = topicTokenType;\n this.state.value = topicTokenValue;\n // Rewind the tokenizer to the end of the “topic token”, so that the\n // following token starts at the equals sign after that topic token.\n this.state.pos--;\n this.state.end--;\n // This is safe to do since the preceding character was either ^ or %, and\n // thus not a newline.\n this.state.endLoc = createPositionWithColumnOffset(this.state.endLoc, -1);\n // Now actually consume the topic token.\n return this.parseTopicReference(pipeProposal);\n } else {\n throw this.unexpected();\n }\n }\n\n // This helper method should only be called\n // when the proposal-pipeline-operator plugin is active,\n // and when the parser has reached a potential Hack pipe topic token.\n // Although a pipe-operator proposal is assumed to be active,\n // its configuration might not match the current token’s type.\n // See <https://github.com/js-choi/proposal-hack-pipes>.\n parseTopicReference(pipeProposal: string): N.Expression {\n const node = this.startNode();\n const startLoc = this.state.startLoc;\n const tokenType = this.state.type;\n\n // Consume the current token.\n this.next();\n\n // If the pipe-operator plugin’s configuration matches the current token’s type,\n // then this will return `node`, will have been finished as a topic reference.\n // Otherwise, this will throw a `PipeTopicUnconfiguredToken` error.\n return this.finishTopicReference(node, startLoc, pipeProposal, tokenType);\n }\n\n // This helper method attempts to finish the given `node`\n // into a topic-reference node for the given `pipeProposal`.\n // See <https://github.com/js-choi/proposal-hack-pipes>.\n //\n // The method assumes that any topic token was consumed before it was called.\n //\n // If the `pipelineOperator` plugin is active,\n // and if the given `tokenType` matches the plugin’s configuration,\n // then this method will return the finished `node`.\n //\n // If the `pipelineOperator` plugin is active,\n // but if the given `tokenType` does not match the plugin’s configuration,\n // then this method will throw a `PipeTopicUnconfiguredToken` error.\n finishTopicReference(\n node: N.Node,\n startLoc: Position,\n pipeProposal: string,\n tokenType: TokenType,\n ): N.Expression {\n if (\n this.testTopicReferenceConfiguration(pipeProposal, startLoc, tokenType)\n ) {\n // The token matches the plugin’s configuration.\n // The token is therefore a topic reference.\n\n // Determine the node type for the topic reference\n // that is appropriate for the active pipe-operator proposal.\n const nodeType =\n pipeProposal === \"smart\"\n ? \"PipelinePrimaryTopicReference\"\n : // The proposal must otherwise be \"hack\",\n // as enforced by testTopicReferenceConfiguration.\n \"TopicReference\";\n\n if (!this.topicReferenceIsAllowedInCurrentContext()) {\n this.raise(\n // The topic reference is not allowed in the current context:\n // it is outside of a pipe body.\n // Raise recoverable errors.\n pipeProposal === \"smart\"\n ? Errors.PrimaryTopicNotAllowed\n : // In this case, `pipeProposal === \"hack\"` is true.\n Errors.PipeTopicUnbound,\n { at: startLoc },\n );\n }\n\n // Register the topic reference so that its pipe body knows\n // that its topic was used at least once.\n this.registerTopicReference();\n\n return this.finishNode(node, nodeType);\n } else {\n // The token does not match the plugin’s configuration.\n throw this.raise(Errors.PipeTopicUnconfiguredToken, {\n at: startLoc,\n token: tokenLabelName(tokenType),\n });\n }\n }\n\n // This helper method tests whether the given token type\n // matches the pipelineOperator parser plugin’s configuration.\n // If the active pipe proposal is Hack style,\n // and if the given token is the same as the plugin configuration’s `topicToken`,\n // then this is a valid topic reference.\n // If the active pipe proposal is smart mix,\n // then the topic token must always be `#`.\n // If the active pipe proposal is neither (e.g., \"minimal\" or \"fsharp\"),\n // then an error is thrown.\n testTopicReferenceConfiguration(\n pipeProposal: string,\n startLoc: Position,\n tokenType: TokenType,\n ): boolean {\n switch (pipeProposal) {\n case \"hack\": {\n return this.hasPlugin([\n \"pipelineOperator\",\n {\n topicToken: tokenLabelName(tokenType),\n },\n ]);\n }\n case \"smart\":\n return tokenType === tt.hash;\n default:\n throw this.raise(Errors.PipeTopicRequiresHackPipes, { at: startLoc });\n }\n }\n\n // async [no LineTerminator here] AsyncArrowBindingIdentifier[?Yield] [no LineTerminator here] => AsyncConciseBody[?In]\n parseAsyncArrowUnaryFunction(node: N.Node): N.ArrowFunctionExpression {\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(Errors.LineTerminatorBeforeArrow, {\n at: this.state.curPosition(),\n });\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(node: N.Node, isAsync: boolean): N.DoExpression {\n this.expectPlugin(\"doExpressions\");\n if (isAsync) {\n this.expectPlugin(\"asyncDoExpressions\");\n }\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(Errors.SuperNotAllowed, { at: node });\n } else if (\n !this.scope.allowSuper &&\n !this.options.allowSuperOutsideMethod\n ) {\n this.raise(Errors.UnexpectedSuper, { at: node });\n }\n\n if (\n !this.match(tt.parenL) &&\n !this.match(tt.bracketL) &&\n !this.match(tt.dot)\n ) {\n this.raise(Errors.UnsupportedSuper, { at: node });\n }\n\n return this.finishNode(node, \"Super\");\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 this.state.start + 1,\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 // https://github.com/tc39/proposal-function.sent#syntax-1\n if (this.match(tt._sent)) {\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 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 const containsEsc = this.state.containsEsc;\n\n node.property = this.parseIdentifier(true);\n\n if (node.property.name !== propertyName || containsEsc) {\n this.raise(Errors.UnsupportedMetaProperty, {\n at: node.property,\n target: meta.name,\n onlyValidPropertyName: 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(tt._meta)) {\n if (!this.inModule) {\n this.raise(Errors.ImportMetaOutsideModule, { at: id });\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 let first = true;\n let spreadStartLoc;\n let optionalCommaStartLoc;\n\n while (!this.match(tt.parenR)) {\n if (first) {\n first = false;\n } else {\n this.expect(\n tt.comma,\n refExpressionErrors.optionalParametersLoc === null\n ? null\n : refExpressionErrors.optionalParametersLoc,\n );\n if (this.match(tt.parenR)) {\n optionalCommaStartLoc = this.state.startLoc;\n break;\n }\n }\n\n if (this.match(tt.ellipsis)) {\n const spreadNodeStartPos = this.state.start;\n const spreadNodeStartLoc = this.state.startLoc;\n spreadStartLoc = this.state.startLoc;\n exprList.push(\n this.parseParenItem(\n this.parseRestBinding(),\n spreadNodeStartPos,\n spreadNodeStartLoc,\n ),\n );\n\n if (!this.checkCommaAfterRest(charCodes.rightParenthesis)) {\n break;\n }\n } else {\n exprList.push(\n this.parseMaybeAssignAllowIn(\n refExpressionErrors,\n this.parseParenItem,\n ),\n );\n }\n }\n\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(exprList) &&\n (arrowNode = this.parseArrow(arrowNode))\n ) {\n this.checkDestructuringPrivate(refExpressionErrors);\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.lastTokStartLoc);\n }\n if (optionalCommaStartLoc) this.unexpected(optionalCommaStartLoc);\n if (spreadStartLoc) this.unexpected(spreadStartLoc);\n this.checkExpressionErrors(refExpressionErrors, true);\n\n this.toReferencedListDeep(exprList, /* isParenthesizedExpr */ true);\n if (exprList.length > 1) {\n val = this.startNodeAt(innerStartPos, innerStartLoc);\n val.expressions = exprList;\n // finish node at current location so it can pick up comments after `)`\n this.finishNode(val, \"SequenceExpression\");\n this.resetEndLocation(val, innerEndLoc);\n } else {\n val = exprList[0];\n }\n\n return this.wrapParenthesis(startPos, startLoc, val);\n }\n\n wrapParenthesis(\n startPos: number,\n startLoc: Position,\n expression: N.Expression,\n ): N.Expression {\n if (!this.options.createParenthesizedExpressions) {\n this.addExtra(expression, \"parenthesized\", true);\n this.addExtra(expression, \"parenStart\", startPos);\n\n this.takeSurroundingComments(\n expression,\n startPos,\n this.state.lastTokEndLoc.index,\n );\n\n return expression;\n }\n\n const parenExpression = this.startNodeAt(startPos, startLoc);\n parenExpression.expression = expression;\n this.finishNode(parenExpression, \"ParenthesizedExpression\");\n return parenExpression;\n }\n\n // eslint-disable-next-line no-unused-vars -- `params` is used in typescript plugin\n shouldParseArrow(params: Array<N.Node>): 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(Errors.UnexpectedNewTarget, { at: metaProp });\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(Errors.ImportCallNotNewExpression, { at: node.callee });\n } else if (this.isOptionalChain(node.callee)) {\n this.raise(Errors.OptionalChainingNoNew, {\n at: this.state.lastTokEndLoc,\n });\n } else if (this.eat(tt.questionDot)) {\n this.raise(Errors.OptionalChainingNoNew, {\n at: this.state.startLoc,\n });\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 { start, startLoc, end, value } = this.state;\n const elemStart = start + 1;\n const elem = this.startNodeAt(\n elemStart,\n createPositionWithColumnOffset(startLoc, 1),\n );\n if (value === null) {\n if (!isTagged) {\n this.raise(Errors.InvalidEscapeSequenceTemplate, {\n // FIXME: explain\n at: createPositionWithColumnOffset(startLoc, 2),\n });\n }\n }\n\n const isTail = this.match(tt.templateTail);\n const endOffset = isTail ? -1 : -2;\n const elemEnd = end + endOffset;\n elem.value = {\n raw: this.input.slice(elemStart, elemEnd).replace(/\\r\\n?/g, \"\\n\"),\n cooked: value === null ? null : value.slice(1, endOffset),\n };\n elem.tail = isTail;\n this.next();\n this.finishNode(elem, \"TemplateElement\");\n this.resetEndLocation(\n elem,\n createPositionWithColumnOffset(this.state.lastTokEndLoc, endOffset),\n );\n return elem;\n }\n\n // https://tc39.es/ecma262/#prod-TemplateLiteral\n parseTemplate(isTagged: boolean): N.TemplateLiteral {\n const node = this.startNode();\n node.expressions = [];\n let curElt = this.parseTemplateElement(isTagged);\n node.quasis = [curElt];\n while (!curElt.tail) {\n node.expressions.push(this.parseTemplateSubstitution());\n this.readTemplateContinuation();\n node.quasis.push((curElt = this.parseTemplateElement(isTagged)));\n }\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.addTrailingCommaExtraToNode(node);\n break;\n }\n }\n\n let prop;\n if (isPattern) {\n prop = this.parseBindingProperty();\n } else {\n prop = this.parsePropertyDefinition(refExpressionErrors);\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(Errors.InvalidRecordProperty, { at: prop });\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 addTrailingCommaExtraToNode(node: N.Node): void {\n this.addExtra(node, \"trailingComma\", this.state.lastTokStart);\n this.addExtra(node, \"trailingCommaLoc\", this.state.lastTokStartLoc, false);\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 refExpressionErrors?: ?ExpressionErrors,\n ): N.ObjectMember | N.SpreadElement {\n let decorators = [];\n if (this.match(tt.at)) {\n if (this.hasPlugin(\"decorators\")) {\n this.raise(Errors.UnsupportedPropertyDecorator, {\n at: this.state.startLoc,\n });\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 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 return this.parseSpread();\n }\n\n if (decorators.length) {\n prop.decorators = decorators;\n decorators = [];\n }\n\n prop.method = false;\n\n if (refExpressionErrors) {\n startPos = this.state.start;\n startLoc = this.state.startLoc;\n }\n\n let isGenerator = this.eat(tt.star);\n this.parsePropertyNamePrefixOperator(prop);\n const containsEsc = this.state.containsEsc;\n const key = this.parsePropertyName(prop, refExpressionErrors);\n\n if (!isGenerator && !containsEsc && this.maybeAsyncOrAccessorProp(prop)) {\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 this.resetPreviousNodeTrailingComments(key);\n isGenerator = this.eat(tt.star);\n this.parsePropertyName(prop);\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 this.resetPreviousNodeTrailingComments(key);\n prop.kind = keyName;\n if (this.match(tt.star)) {\n isGenerator = true;\n this.raise(Errors.AccessorIsGenerator, {\n at: this.state.curPosition(),\n kind: keyName,\n });\n this.next();\n }\n this.parsePropertyName(prop);\n }\n }\n\n this.parseObjPropValue(\n prop,\n startPos,\n startLoc,\n isGenerator,\n isAsync,\n false /* 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 if (params.length !== paramCount) {\n this.raise(\n method.kind === \"get\" ? Errors.BadGetterArity : Errors.BadSetterArity,\n { at: method },\n );\n }\n\n if (\n method.kind === \"set\" &&\n params[params.length - 1]?.type === \"RestElement\"\n ) {\n this.raise(Errors.BadSetterRestParameter, { at: method });\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 // CoverInitializedName\n // Note: `{ eval } = {}` will be checked in `checkLVal` later.\n this.checkReservedWord(prop.key.name, prop.key.loc.start, true, false);\n\n if (isPattern) {\n prop.value = this.parseMaybeDefault(\n startPos,\n startLoc,\n cloneIdentifier(prop.key),\n );\n } else if (this.match(tt.eq)) {\n const shorthandAssignLoc = this.state.startLoc;\n if (refExpressionErrors != null) {\n if (refExpressionErrors.shorthandAssignLoc === null) {\n refExpressionErrors.shorthandAssignLoc = shorthandAssignLoc;\n }\n } else {\n this.raise(Errors.InvalidCoverInitializedName, {\n at: shorthandAssignLoc,\n });\n }\n prop.value = this.parseMaybeDefault(\n startPos,\n startLoc,\n cloneIdentifier(prop.key),\n );\n } else {\n prop.value = cloneIdentifier(prop.key);\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 // https://tc39.es/ecma262/#prod-PropertyName\n // when refExpressionErrors presents, it will parse private name\n // and record the position of the first private name\n parsePropertyName(\n prop: N.ObjectOrClassMember | N.ClassMember | N.TsNamedTypeElementBase,\n refExpressionErrors?: ?ExpressionErrors,\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 // We check if it's valid for it to be a private name when we push it.\n const { type, value } = this.state;\n let key;\n // most un-computed property names are identifiers\n if (tokenIsKeywordOrIdentifier(type)) {\n key = this.parseIdentifier(true);\n } else {\n switch (type) {\n case tt.num:\n key = this.parseNumericLiteral(value);\n break;\n case tt.string:\n key = this.parseStringLiteral(value);\n break;\n case tt.bigint:\n key = this.parseBigIntLiteral(value);\n break;\n case tt.decimal:\n key = this.parseDecimalLiteral(value);\n break;\n case tt.privateName: {\n // the class private key has been handled in parseClassElementName\n const privateKeyLoc = this.state.startLoc;\n if (refExpressionErrors != null) {\n if (refExpressionErrors.privateKeyLoc === null) {\n refExpressionErrors.privateKeyLoc = privateKeyLoc;\n }\n } else {\n this.raise(Errors.UnexpectedPrivateField, {\n at: privateKeyLoc,\n });\n }\n key = this.parsePrivateName();\n break;\n }\n default:\n throw this.unexpected();\n }\n }\n (prop: $FlowFixMe).key = key;\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\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 trailingCommaLoc: ?Position,\n ): N.ArrowFunctionExpression {\n this.scope.enter(SCOPE_FUNCTION | SCOPE_ARROW);\n let flags = functionFlags(isAsync, false);\n // ConciseBody[In] :\n // [lookahead ≠ {] ExpressionBody[?In, ~Await]\n // { FunctionBody[~Yield, ~Await] }\n if (!this.match(tt.braceL) && 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, trailingCommaLoc);\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 trailingCommaLoc: ?Position,\n ): void {\n node.params = this.toAssignableList(params, trailingCommaLoc, 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 this.raise(Errors.IllegalLanguageModeDirective, {\n at:\n // $FlowIgnore\n (node.kind === \"method\" || node.kind === \"constructor\") &&\n // $FlowIgnore\n !!node.key\n ? node.key.loc.end\n : node,\n });\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.checkIdentifier(node.id, BIND_OUTSIDE, strictModeChanged);\n }\n },\n );\n this.prodParam.exit();\n this.state.labels = oldLabels;\n }\n this.expressionScope.exit();\n }\n\n isSimpleParameter(node: N.Pattern | N.TSParameterProperty) {\n return node.type === \"Identifier\";\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 (!this.isSimpleParameter(params[i])) 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 = !allowDuplicates && new Set();\n // We create a fake node with the \"ephemeral\" type `FormalParameters`[1]\n // since we just store an array of parameters. Perhaps someday we can have\n // something like class FormalParameters extends Array { ... }, which would\n // also be helpful when traversing this node.\n //\n // 1. https://tc39.es/ecma262/#prod-FormalParameters\n const formalParameters = { type: \"FormalParameters\" };\n for (const param of node.params) {\n this.checkLVal(param, {\n in: formalParameters,\n binding: BIND_VAR,\n checkClashes,\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.addTrailingCommaExtraToNode(nodeForExtra);\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 allowPlaceholder: ?boolean,\n ): ?N.Expression {\n let elt;\n if (this.match(tt.comma)) {\n if (!allowEmpty) {\n this.raise(Errors.UnexpectedToken, {\n at: this.state.curPosition(),\n unexpected: \",\",\n });\n }\n elt = null;\n } else if (this.match(tt.ellipsis)) {\n const spreadNodeStartPos = this.state.start;\n const spreadNodeStartLoc = this.state.startLoc;\n\n elt = this.parseParenItem(\n this.parseSpread(refExpressionErrors),\n spreadNodeStartPos,\n spreadNodeStartLoc,\n );\n } else if (this.match(tt.question)) {\n this.expectPlugin(\"partialApplication\");\n if (!allowPlaceholder) {\n this.raise(Errors.UnexpectedArgumentPlaceholder, {\n at: this.state.startLoc,\n });\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 );\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 { startLoc, type } = this.state;\n\n if (tokenIsKeywordOrIdentifier(type)) {\n name = this.state.value;\n } else {\n throw this.unexpected();\n }\n\n const tokenIsKeyword = tokenKeywordOrIdentifierIsKeyword(type);\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 if (tokenIsKeyword) {\n this.replaceToken(tt.name);\n }\n } else {\n this.checkReservedWord(name, startLoc, tokenIsKeyword, false);\n }\n\n this.next();\n\n return name;\n }\n\n checkReservedWord(\n word: string,\n startLoc: Position,\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(Errors.YieldBindingIdentifier, { at: startLoc });\n return;\n }\n } else if (word === \"await\") {\n if (this.prodParam.hasAwait) {\n this.raise(Errors.AwaitBindingIdentifier, { at: startLoc });\n return;\n }\n\n if (this.scope.inStaticBlock) {\n this.raise(Errors.AwaitBindingIdentifierInStaticBlock, {\n at: startLoc,\n });\n return;\n }\n\n this.expressionScope.recordAsyncArrowParametersError({ at: startLoc });\n } else if (word === \"arguments\") {\n if (this.scope.inClassAndNotInNonArrowFunction) {\n this.raise(Errors.ArgumentsInClass, { at: startLoc });\n return;\n }\n }\n\n if (checkKeywords && isKeyword(word)) {\n this.raise(Errors.UnexpectedKeyword, {\n at: startLoc,\n keyword: word,\n });\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(Errors.UnexpectedReservedWord, {\n at: startLoc,\n reservedWord: word,\n });\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 Errors.AwaitExpressionFormalParameter,\n { at: node },\n );\n\n if (this.eat(tt.star)) {\n this.raise(Errors.ObsoleteAwaitStar, { at: node });\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 if (this.hasPrecedingLineBreak()) return true;\n const { type } = this.state;\n return (\n // All the following expressions are ambiguous:\n // await + 0, await - 0, await ( 0 ), await [ 0 ], await / 0 /u, await ``\n type === tt.plusMin ||\n type === tt.parenL ||\n type === tt.bracketL ||\n tokenIsTemplate(type) ||\n // Sometimes the tokenizer generates tt.slash for regexps, and this is\n // handler by parseExprAtom\n type === tt.regexp ||\n type === 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\") && type === 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 Errors.YieldInParameter,\n { at: node },\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, leftStartLoc: Position) {\n if (this.hasPlugin([\"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(Errors.PipelineHeadSequenceExpression, {\n at: leftStartLoc,\n });\n }\n }\n }\n\n parseSmartPipelineBodyInStyle(\n childExpr: N.Expression,\n startPos: number,\n startLoc: Position,\n ): N.PipelineBody {\n const bodyNode = this.startNodeAt(startPos, startLoc);\n if (this.isSimpleReference(childExpr)) {\n bodyNode.callee = childExpr;\n return this.finishNode(bodyNode, \"PipelineBareFunction\");\n } else {\n this.checkSmartPipeTopicBodyEarlyErrors(startLoc);\n bodyNode.expression = childExpr;\n return this.finishNode(bodyNode, \"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 // This helper method is to be called immediately\n // after a topic-style smart-mix pipe body is parsed.\n // The `startLoc` is the starting position of the pipe body.\n\n checkSmartPipeTopicBodyEarlyErrors(startLoc: Position): void {\n // If the following token is invalidly `=>`, then throw a human-friendly error\n // instead of something like 'Unexpected token, expected \";\"'.\n // For example, `x => x |> y => #` (assuming `#` is the topic reference)\n // groups into `x => (x |> y) => #`,\n // and `(x |> y) => #` is an invalid arrow function.\n // This is because smart-mix `|>` has tighter precedence than `=>`.\n if (this.match(tt.arrow)) {\n throw this.raise(Errors.PipelineBodyNoArrow, { at: this.state.startLoc });\n }\n\n // A topic-style smart-mix pipe body must use the topic reference at least once.\n if (!this.topicReferenceWasUsedInCurrentContext()) {\n this.raise(Errors.PipelineTopicUnused, { at: startLoc });\n }\n }\n\n // Enable topic references from outer contexts within Hack-style pipe bodies.\n // The function modifies the parser's topic-context state to enable or disable\n // the use of topic references.\n // The function then calls a callback, then resets the parser\n // to the old topic-context state that it had before the function was called.\n\n withTopicBindingContext<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 // This helper method is used only with the deprecated smart-mix pipe proposal.\n // Disables 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 withSmartMixTopicForbiddingContext<T>(callback: () => T): T {\n if (this.hasPlugin([\"pipelineOperator\", { proposal: \"smart\" }])) {\n // Reset the parser’s topic context only if the smart-mix pipe proposal is active.\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 } else {\n // If the pipe proposal is \"minimal\", \"fsharp\", or \"hack\",\n // or if no pipe proposal is active,\n // then the callback result is returned\n // without touching any extra parser state.\n return callback();\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 topic reference within the current\n // topic-binding context.\n registerTopicReference(): void {\n this.state.topicContext.maxTopicIndex = 0;\n }\n\n topicReferenceIsAllowedInCurrentContext(): boolean {\n return this.state.topicContext.maxNumOfResolvableTopics >= 1;\n }\n\n topicReferenceWasUsedInCurrentContext(): 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.parseMaybeUnaryOrPrivate(),\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 // Used in Flow plugin\n parsePropertyNamePrefixOperator(\n // eslint-disable-next-line no-unused-vars\n prop: N.ObjectOrClassMember | N.ClassMember,\n ): void {}\n}\n","// @flow\n\nimport * as N from \"../types\";\nimport {\n tokenIsIdentifier,\n tokenIsLoop,\n tokenIsTemplate,\n tt,\n type TokenType,\n getExportedToken,\n} from \"../tokenizer/types\";\nimport ExpressionParser from \"./expression\";\nimport { Errors } from \"../parse-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, createPositionWithColumnOffset } from \"../util/location\";\nimport { cloneStringLiteral, cloneIdentifier } from \"./node\";\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 tokens for backward Babel 7 compat.\n * tt.privateName => tt.hash + tt.name\n * tt.templateTail => tt.backquote/tt.braceR + tt.template + tt.backquote\n * tt.templateNonTail => tt.backquote/tt.braceR + tt.template + tt.dollarBraceL\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, input) {\n for (let i = 0; i < tokens.length; i++) {\n const token = tokens[i];\n const { type } = token;\n if (typeof type === \"number\") {\n if (!process.env.BABEL_8_BREAKING) {\n if (type === tt.privateName) {\n const { loc, start, value, end } = token;\n const hashEndPos = start + 1;\n const hashEndLoc = createPositionWithColumnOffset(loc.start, 1);\n tokens.splice(\n i,\n 1,\n // $FlowIgnore: hacky way to create token\n new Token({\n type: getExportedToken(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: getExportedToken(tt.name),\n value: value,\n start: hashEndPos,\n end: end,\n startLoc: hashEndLoc,\n endLoc: loc.end,\n }),\n );\n i++;\n continue;\n }\n\n if (tokenIsTemplate(type)) {\n const { loc, start, value, end } = token;\n const backquoteEnd = start + 1;\n const backquoteEndLoc = createPositionWithColumnOffset(loc.start, 1);\n let startToken;\n if (input.charCodeAt(start) === charCodes.graveAccent) {\n // $FlowIgnore: hacky way to create token\n startToken = new Token({\n type: getExportedToken(tt.backQuote),\n value: \"`\",\n start: start,\n end: backquoteEnd,\n startLoc: loc.start,\n endLoc: backquoteEndLoc,\n });\n } else {\n // $FlowIgnore: hacky way to create token\n startToken = new Token({\n type: getExportedToken(tt.braceR),\n value: \"}\",\n start: start,\n end: backquoteEnd,\n startLoc: loc.start,\n endLoc: backquoteEndLoc,\n });\n }\n let templateValue,\n templateElementEnd,\n templateElementEndLoc,\n endToken;\n if (type === tt.templateTail) {\n // ends with '`'\n templateElementEnd = end - 1;\n templateElementEndLoc = createPositionWithColumnOffset(loc.end, -1);\n templateValue = value === null ? null : value.slice(1, -1);\n // $FlowIgnore: hacky way to create token\n endToken = new Token({\n type: getExportedToken(tt.backQuote),\n value: \"`\",\n start: templateElementEnd,\n end: end,\n startLoc: templateElementEndLoc,\n endLoc: loc.end,\n });\n } else {\n // ends with `${`\n templateElementEnd = end - 2;\n templateElementEndLoc = createPositionWithColumnOffset(loc.end, -2);\n templateValue = value === null ? null : value.slice(1, -2);\n // $FlowIgnore: hacky way to create token\n endToken = new Token({\n type: getExportedToken(tt.dollarBraceL),\n value: \"${\",\n start: templateElementEnd,\n end: end,\n startLoc: templateElementEndLoc,\n endLoc: loc.end,\n });\n }\n tokens.splice(\n i,\n 1,\n startToken,\n // $FlowIgnore: hacky way to create token\n new Token({\n type: getExportedToken(tt.template),\n value: templateValue,\n start: backquoteEnd,\n end: templateElementEnd,\n startLoc: backquoteEndLoc,\n endLoc: templateElementEndLoc,\n }),\n endToken,\n );\n i += 2;\n continue;\n }\n }\n // $FlowIgnore: we manipulate `token` for performance reasons\n token.type = getExportedToken(type);\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) {\n file.tokens = babel7CompatTokens(this.tokens, this.input);\n }\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 [localName, at] of Array.from(this.scope.undefinedExports)) {\n this.raise(Errors.ModuleExportUndefined, { at, localName });\n }\n }\n return this.finishNode<N.Program>(program, \"Program\");\n }\n\n // TODO\n\n /**\n * cast a Statement to a Directive. This method mutates input statement.\n *\n * @param {N.Statement} stmt\n * @returns {N.Directive}\n * @memberof StatementParser\n */\n stmtToDirective(stmt: N.Statement): N.Directive {\n const directive = (stmt: any);\n directive.type = \"Directive\";\n directive.value = directive.expression;\n delete directive.expression;\n\n const directiveLiteral = directive.value;\n const expressionValue = directiveLiteral.value;\n const raw = this.input.slice(directiveLiteral.start, directiveLiteral.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 this.addExtra(directiveLiteral, \"expressionValue\", expressionValue);\n\n directiveLiteral.type = \"DirectiveLiteral\";\n\n return directive;\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(tt._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 if (keywordRelationalOperator.test(this.input)) {\n // We have seen `in` or `instanceof` so far, now check if the identfier\n // ends here\n const endCh = this.codePointAtPos(keywordRelationalOperator.lastIndex);\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 return this.parseBreakContinueStatement(node, /* isBreak */ true);\n case tt._continue:\n return this.parseBreakContinueStatement(node, /* isBreak */ false);\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(Errors.StrictFunction, { at: this.state.startLoc });\n } else if (context !== \"if\" && context !== \"label\") {\n this.raise(Errors.SloppyFunction, { at: this.state.startLoc });\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(Errors.UnexpectedLexicalDeclaration, {\n at: this.state.startLoc,\n });\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(Errors.UnexpectedImportExport, {\n at: this.state.startLoc,\n });\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(Errors.AsyncFunctionInSingleStatementContext, {\n at: this.state.startLoc,\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 tokenIsIdentifier(starttype) &&\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(Errors.ImportOutsideModule, { at: node });\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(Errors.DecoratorExportClass, { at: this.state.startLoc });\n }\n } else if (!this.canHaveLeadingDecorator()) {\n throw this.raise(Errors.UnexpectedLeadingDecorator, {\n at: this.state.startLoc,\n });\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.match(tt.parenL)) {\n const startPos = this.state.start;\n const startLoc = this.state.startLoc;\n this.next(); // eat '('\n expr = this.parseExpression();\n this.expect(tt.parenR);\n expr = this.wrapParenthesis(startPos, startLoc, expr);\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 isBreak: boolean,\n ): N.BreakStatement | N.ContinueStatement {\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, isBreak);\n\n return this.finishNode(\n node,\n isBreak ? \"BreakStatement\" : \"ContinueStatement\",\n );\n }\n\n verifyBreakContinue(\n node: N.BreakStatement | N.ContinueStatement,\n isBreak: boolean,\n ) {\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 const type = isBreak ? \"BreakStatement\" : \"ContinueStatement\";\n this.raise(Errors.IllegalBreakContinue, { at: node, type });\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 // Parse the loop body's body.\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.withSmartMixTopicForbiddingContext(() =>\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 = null;\n\n if (this.isAwaitAllowed() && this.eatContextual(tt._await)) {\n awaitAt = this.state.lastTokStartLoc;\n }\n this.scope.enter(SCOPE_OTHER);\n this.expect(tt.parenL);\n\n if (this.match(tt.semi)) {\n if (awaitAt !== null) {\n this.unexpected(awaitAt);\n }\n return this.parseFor(node, null);\n }\n\n const startsWithLet = this.isContextual(tt._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(tt._of)) &&\n init.declarations.length === 1\n ) {\n return this.parseForIn(node, init, awaitAt);\n }\n if (awaitAt !== null) {\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 startsWithAsync = this.isContextual(tt._async);\n\n const refExpressionErrors = new ExpressionErrors();\n const init = this.parseExpression(true, refExpressionErrors);\n const isForOf = this.isContextual(tt._of);\n if (isForOf) {\n // Check for leading tokens that are forbidden in for-of loops:\n if (startsWithLet) {\n this.raise(Errors.ForOfLet, { at: init });\n }\n\n if (\n // `for await (async of []);` is allowed.\n awaitAt === null &&\n startsWithAsync &&\n init.type === \"Identifier\"\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(Errors.ForOfAsync, { at: init });\n }\n }\n if (isForOf || this.match(tt._in)) {\n this.checkDestructuringPrivate(refExpressionErrors);\n this.toAssignable(init, /* isLHS */ true);\n const type = isForOf ? \"ForOfStatement\" : \"ForInStatement\";\n this.checkLVal(init, { in: { type } });\n return this.parseForIn(node, init, awaitAt);\n } else {\n this.checkExpressionErrors(refExpressionErrors, true);\n }\n if (awaitAt !== null) {\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(Errors.IllegalReturn, { at: this.state.startLoc });\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(Errors.MultipleDefaultsInSwitch, {\n at: this.state.lastTokStartLoc,\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(Errors.NewlineAfterThrow, { at: this.state.lastTokEndLoc });\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, {\n in: { type: \"CatchClause\" },\n binding: BIND_LEXICAL,\n allowingSloppyLetBinding: true,\n });\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 // Parse the catch clause's body.\n clause.body =\n // For the smartPipelines plugin: Disable topic references from outer\n // contexts within the catch clause's body.\n this.withSmartMixTopicForbiddingContext(() =>\n // Parse the catch clause's body.\n this.parseBlock(false, false),\n );\n\n this.scope.exit();\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(Errors.NoCatchOrFinally, { at: node });\n }\n\n return this.finishNode(node, \"TryStatement\");\n }\n\n parseVarStatement(\n node: N.VariableDeclaration,\n kind: \"var\" | \"let\" | \"const\",\n allowMissingInitializer: boolean = false,\n ): N.VariableDeclaration {\n this.next();\n this.parseVar(node, false, kind, allowMissingInitializer);\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 // Parse the loop body.\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.withSmartMixTopicForbiddingContext(() =>\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(Errors.StrictWith, { at: this.state.startLoc });\n }\n this.next();\n node.object = this.parseHeaderExpression();\n\n // Parse the statement body.\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.withSmartMixTopicForbiddingContext(() =>\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(Errors.LabelRedeclaration, {\n at: expr,\n labelName: maybeName,\n });\n }\n }\n\n const kind = tokenIsLoop(this.state.type)\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 // Parse the loop body.\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.withSmartMixTopicForbiddingContext(() =>\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: ?Position,\n ): N.ForInOf {\n const isForIn = this.match(tt._in);\n this.next();\n\n if (isForIn) {\n if (awaitAt !== null) this.unexpected(awaitAt);\n } else {\n node.await = awaitAt !== null;\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(Errors.ForInOfLoopInitializer, {\n at: init,\n type: isForIn ? \"ForInStatement\" : \"ForOfStatement\",\n });\n }\n\n if (init.type === \"AssignmentPattern\") {\n this.raise(Errors.InvalidLhs, {\n at: init,\n ancestor: { type: \"ForStatement\" },\n });\n }\n\n node.left = init;\n node.right = isForIn\n ? this.parseExpression()\n : this.parseMaybeAssignAllowIn();\n this.expect(tt.parenR);\n\n // Parse the loop body.\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.withSmartMixTopicForbiddingContext(() =>\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 allowMissingInitializer: boolean = false,\n ): N.VariableDeclaration {\n const declarations = (node.declarations = []);\n node.kind = kind;\n for (;;) {\n const decl = this.startNode();\n this.parseVarId(decl, kind);\n decl.init = !this.eat(tt.eq)\n ? null\n : isFor\n ? this.parseMaybeAssignDisallowIn()\n : this.parseMaybeAssignAllowIn();\n\n if (decl.init === null && !allowMissingInitializer) {\n if (\n decl.id.type !== \"Identifier\" &&\n !(isFor && (this.match(tt._in) || this.isContextual(tt._of)))\n ) {\n this.raise(Errors.DeclarationMissingInitializer, {\n at: this.state.lastTokEndLoc,\n kind: \"destructuring\",\n });\n } else if (\n kind === \"const\" &&\n !(this.match(tt._in) || this.isContextual(tt._of))\n ) {\n this.raise(Errors.DeclarationMissingInitializer, {\n at: this.state.lastTokEndLoc,\n kind: \"const\",\n });\n }\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(decl.id, {\n in: { type: \"VariableDeclarator\" },\n binding: kind === \"var\" ? BIND_VAR : BIND_LEXICAL,\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(Errors.GeneratorInSingleStatementContext, {\n at: this.state.startLoc,\n });\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.withSmartMixTopicForbiddingContext(() => {\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 || tokenIsIdentifier(this.state.type)\n ? this.parseIdentifier()\n : 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.loc.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.withSmartMixTopicForbiddingContext(() => {\n // Parse the contents within the braces.\n while (!this.match(tt.braceR)) {\n if (this.eat(tt.semi)) {\n if (decorators.length > 0) {\n throw this.raise(Errors.DecoratorSemicolon, {\n at: this.state.lastTokEndLoc,\n });\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(Errors.DecoratorConstructor, { at: member });\n }\n }\n });\n\n this.state.strict = oldStrict;\n\n this.next(); // eat `}`\n\n if (decorators.length) {\n throw this.raise(Errors.TrailingDecorator, { at: this.state.startLoc });\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 this.resetPreviousNodeTrailingComments(key);\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(tt._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.ClassProperty> = member;\n const privateProp: $FlowSubtype<N.ClassPrivateProperty> = member;\n const accessorProp: $FlowSubtype<N.ClassAccessorProperty> = member;\n\n const method: typeof publicMethod | typeof privateMethod = publicMethod;\n const publicMember: typeof publicMethod | typeof publicProp = publicMethod;\n\n member.static = isStatic;\n this.parsePropertyNamePrefixOperator(member);\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(Errors.ConstructorIsGenerator, {\n at: publicMethod.key,\n });\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 isContextual =\n tokenIsIdentifier(this.state.type) && !this.state.containsEsc;\n const isPrivate = this.match(tt.privateName);\n const key = this.parseClassElementName(member);\n const maybeQuestionTokenStartLoc = this.state.startLoc;\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(Errors.DuplicateConstructor, { at: key });\n }\n if (isConstructor && this.hasPlugin(\"typescript\") && member.override) {\n this.raise(Errors.OverrideOnConstructor, { at: key });\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 isContextual &&\n key.name === \"async\" &&\n !this.isLineTerminator()\n ) {\n // an async method\n this.resetPreviousNodeTrailingComments(key);\n const isGenerator = this.eat(tt.star);\n\n if (publicMember.optional) {\n this.unexpected(maybeQuestionTokenStartLoc);\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(Errors.ConstructorIsAsync, { at: publicMethod.key });\n }\n\n this.pushClassMethod(\n classBody,\n publicMethod,\n isGenerator,\n true,\n /* isConstructor */ false,\n false,\n );\n }\n } else if (\n isContextual &&\n (key.name === \"get\" || key.name === \"set\") &&\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 this.resetPreviousNodeTrailingComments(key);\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(Errors.ConstructorIsAccessor, { at: publicMethod.key });\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 (\n isContextual &&\n key.name === \"accessor\" &&\n !this.isLineTerminator()\n ) {\n this.expectPlugin(\"decoratorAutoAccessors\");\n this.resetPreviousNodeTrailingComments(key);\n\n // The so-called parsed name would have been \"accessor\": get the real name.\n const isPrivate = this.match(tt.privateName);\n this.parseClassElementName(publicProp);\n this.pushClassAccessorProperty(classBody, accessorProp, isPrivate);\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/ecma262/#prod-ClassElementName\n parseClassElementName(member: N.ClassMember): N.Expression | N.Identifier {\n const { type, value } = this.state;\n if (\n (type === tt.name || type === tt.string) &&\n member.static &&\n value === \"prototype\"\n ) {\n this.raise(Errors.StaticPrototype, { at: this.state.startLoc });\n }\n\n if (type === tt.privateName) {\n if (value === \"constructor\") {\n this.raise(Errors.ConstructorClassPrivateField, {\n at: this.state.startLoc,\n });\n }\n const key = this.parsePrivateName();\n member.key = key;\n return key;\n }\n\n return this.parsePropertyName(member);\n }\n\n parseClassStaticBlock(\n classBody: N.ClassBody,\n member: N.StaticBlock & { decorators?: Array<N.Decorator> },\n ) {\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(Errors.DecoratorStaticBlock, { at: member });\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(Errors.ConstructorClassField, { at: prop.key });\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.loc.start,\n );\n }\n\n pushClassAccessorProperty(\n classBody: N.ClassBody,\n prop: N.ClassAccessorProperty,\n isPrivate: boolean,\n ) {\n if (!isPrivate && !prop.computed) {\n // Not private, so not node is not a PrivateName and we can safely cast\n const key = (prop.key: N.Expression);\n\n if (key.name === \"constructor\" || key.value === \"constructor\") {\n // Non-computed field, which is either an identifier named \"constructor\"\n // or a string literal named \"constructor\"\n this.raise(Errors.ConstructorClassField, { at: key });\n }\n }\n\n const node = this.parseClassAccessorProperty(prop);\n classBody.body.push(node);\n\n if (isPrivate) {\n this.classScope.declarePrivateName(\n this.getPrivateNameSV(node.key),\n CLASS_ELEMENT_OTHER,\n node.key.loc.start,\n );\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.declareClassPrivateMethodInScope(node, kind);\n }\n\n declareClassPrivateMethodInScope(\n node: N.ClassPrivateMethod | N.EstreeMethodDefinition | N.TSDeclareMethod,\n kind: number,\n ) {\n this.classScope.declarePrivateName(\n this.getPrivateNameSV(node.key),\n kind,\n node.key.loc.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/ecma262/#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/ecma262/#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 parseClassAccessorProperty(\n node: N.ClassAccessorProperty,\n ): N.ClassAccessorProperty {\n this.parseInitializer(node);\n this.semicolon();\n return this.finishNode(node, \"ClassAccessorProperty\");\n }\n\n // https://tc39.es/ecma262/#prod-Initializer\n parseInitializer(\n node: N.ClassProperty | N.ClassPrivateProperty | N.ClassAccessorProperty,\n ): 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 (tokenIsIdentifier(this.state.type)) {\n node.id = this.parseIdentifier();\n if (isStatement) {\n this.declareNameFromIdentifier(node.id, bindingType);\n }\n } else {\n if (optionalId || !isStatement) {\n node.id = null;\n } else {\n throw this.raise(Errors.MissingClassName, { at: this.state.startLoc });\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(tt._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 const isTypeExport = node.exportKind === \"type\";\n node.specifiers.push(...this.parseExportSpecifiers(isTypeExport));\n\n node.source = null;\n node.declaration = null;\n if (this.hasPlugin(\"importAssertions\")) {\n node.assertions = [];\n }\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 if (this.hasPlugin(\"importAssertions\")) {\n node.assertions = [];\n }\n node.declaration = this.parseExportDeclaration(node);\n return true;\n }\n return false;\n }\n\n isAsyncFunction(): boolean {\n if (!this.isContextual(tt._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 }\n\n if (this.match(tt._class)) {\n return this.parseClass(expr, true, true);\n }\n\n if (this.match(tt.at)) {\n if (\n this.hasPlugin(\"decorators\") &&\n this.getPluginOption(\"decorators\", \"decoratorsBeforeExport\")\n ) {\n this.raise(Errors.DecoratorBeforeExport, { at: this.state.startLoc });\n }\n this.parseDecorators(false);\n return this.parseClass(expr, true, true);\n }\n\n if (this.match(tt._const) || this.match(tt._var) || this.isLet()) {\n throw this.raise(Errors.UnsupportedDefaultExport, {\n at: this.state.startLoc,\n });\n }\n\n const res = this.parseMaybeAssignAllowIn();\n this.semicolon();\n return res;\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 const { type } = this.state;\n if (tokenIsIdentifier(type)) {\n if ((type === tt._async && !this.state.containsEsc) || type === tt._let) {\n return false;\n }\n if (\n (type === tt._type || type === tt._interface) &&\n !this.state.containsEsc\n ) {\n const { type: nextType } = 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 (tokenIsIdentifier(nextType) && nextType !== tt._from) ||\n nextType === 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 (tokenIsIdentifier(this.state.type) && 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(tt._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 if (expect) {\n this.unexpected();\n }\n\n this.semicolon();\n }\n\n shouldParseExportDeclaration(): boolean {\n const { type } = this.state;\n if (type === tt.at) {\n this.expectOnePlugin([\"decorators\", \"decorators-legacy\"]);\n if (this.hasPlugin(\"decorators\")) {\n if (this.getPluginOption(\"decorators\", \"decoratorsBeforeExport\")) {\n throw this.raise(Errors.DecoratorBeforeExport, {\n at: this.state.startLoc,\n });\n }\n\n return true;\n }\n }\n\n return (\n type === tt._var ||\n type === tt._const ||\n type === tt._function ||\n type === tt._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(Errors.ExportDefaultFromAsIdentifier, {\n at: declaration,\n });\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 exportName =\n exported.type === \"Identifier\" ? exported.name : exported.value;\n this.checkDuplicateExports(specifier, exportName);\n // $FlowIgnore\n if (!isFrom && specifier.local) {\n const { local } = specifier;\n if (local.type !== \"Identifier\") {\n this.raise(Errors.ExportBindingIsString, {\n at: specifier,\n localName: local.value,\n exportName,\n });\n } else {\n // check for keywords used as local names\n this.checkReservedWord(local.name, local.loc.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(Errors.UnsupportedDecoratorExport, { at: node });\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 exportName: string,\n ): void {\n if (this.exportedIdentifiers.has(exportName)) {\n if (exportName === \"default\") {\n this.raise(Errors.DuplicateDefaultExport, { at: node });\n } else {\n this.raise(Errors.DuplicateExport, { at: node, exportName });\n }\n }\n this.exportedIdentifiers.add(exportName);\n }\n\n // Parses a comma-separated list of module exports.\n\n parseExportSpecifiers(isInTypeExport: boolean): 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 const isMaybeTypeOnly = this.isContextual(tt._type);\n const isString = this.match(tt.string);\n const node = this.startNode();\n node.local = this.parseModuleExportName();\n nodes.push(\n this.parseExportSpecifier(\n node,\n isString,\n isInTypeExport,\n isMaybeTypeOnly,\n ),\n );\n }\n\n return nodes;\n }\n\n parseExportSpecifier(\n node: any,\n isString: boolean,\n /* eslint-disable no-unused-vars -- used in TypeScript parser */\n isInTypeExport: boolean,\n isMaybeTypeOnly: boolean,\n /* eslint-enable no-unused-vars */\n ): N.ExportSpecifier {\n if (this.eatContextual(tt._as)) {\n node.exported = this.parseModuleExportName();\n } else if (isString) {\n node.exported = cloneStringLiteral(node.local);\n } else if (!node.exported) {\n node.exported = cloneIdentifier(node.local);\n }\n return this.finishNode<N.ExportSpecifier>(node, \"ExportSpecifier\");\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(Errors.ModuleExportNameHasLoneSurrogate, {\n at: result,\n surrogateCharCode: surrogate[0].charCodeAt(0),\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(tt._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 tokenIsIdentifier(this.state.type);\n }\n\n parseImportSpecifierLocal(\n node: N.ImportDeclaration,\n specifier: N.Node,\n type: string,\n ): void {\n specifier.local = this.parseIdentifier();\n node.specifiers.push(this.finishImportSpecifier(specifier, type));\n }\n\n finishImportSpecifier(specifier: N.Node, type: string) {\n this.checkLVal(specifier.local, {\n in: specifier,\n binding: BIND_LEXICAL,\n });\n return 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(Errors.ModuleAttributesWithDuplicateKeys, {\n at: this.state.startLoc,\n key: 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.raise(Errors.ModuleAttributeInvalidValue, {\n at: this.state.startLoc,\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(Errors.ModuleAttributeDifferentFromType, {\n at: node.key,\n });\n }\n\n if (attributes.has(node.key.name)) {\n this.raise(Errors.ModuleAttributesWithDuplicateKeys, {\n at: node.key,\n key: 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.raise(Errors.ModuleAttributeInvalidValue, {\n at: this.state.startLoc,\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(tt._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 );\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(tt._as);\n\n this.parseImportSpecifierLocal(\n node,\n specifier,\n \"ImportNamespaceSpecifier\",\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(Errors.DestructureNamedImport, {\n at: this.state.startLoc,\n });\n }\n\n this.expect(tt.comma);\n if (this.eat(tt.braceR)) break;\n }\n\n const specifier = this.startNode();\n const importedIsString = this.match(tt.string);\n const isMaybeTypeOnly = this.isContextual(tt._type);\n specifier.imported = this.parseModuleExportName();\n const importSpecifier = this.parseImportSpecifier(\n specifier,\n importedIsString,\n node.importKind === \"type\" || node.importKind === \"typeof\",\n isMaybeTypeOnly,\n );\n node.specifiers.push(importSpecifier);\n }\n }\n\n // https://tc39.es/ecma262/#prod-ImportSpecifier\n parseImportSpecifier(\n specifier: any,\n importedIsString: boolean,\n /* eslint-disable no-unused-vars -- used in TypeScript and Flow parser */\n isInTypeOnlyImport: boolean,\n isMaybeTypeOnly: boolean,\n /* eslint-enable no-unused-vars */\n ): N.ImportSpecifier {\n if (this.eatContextual(tt._as)) {\n specifier.local = this.parseIdentifier();\n } else {\n const { imported } = specifier;\n if (importedIsString) {\n throw this.raise(Errors.ImportBindingIsString, {\n at: specifier,\n importName: imported.value,\n });\n }\n this.checkReservedWord(imported.name, specifier.loc.start, true, true);\n if (!specifier.local) {\n specifier.local = cloneIdentifier(imported);\n }\n }\n return this.finishImportSpecifier(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 { getExportedToken, tt as internalTokenTypes } 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\nfunction generateExportedTokenTypes(internalTokenTypes) {\n const tokenTypes = {};\n for (const typeName of Object.keys(internalTokenTypes)) {\n tokenTypes[typeName] = getExportedToken(internalTokenTypes[typeName]);\n }\n return tokenTypes;\n}\n\nexport const tokTypes = generateExportedTokenTypes(internalTokenTypes);\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":["Position","constructor","line","col","index","column","SourceLocation","start","end","filename","identifierName","createPositionWithColumnOffset","position","columnOffset","ParseErrorCodes","Object","freeze","SyntaxError","SourceTypeModuleError","reflect","keys","last","length","get","reduce","object","key","set","value","item","i","instantiate","properties","descriptors","map","filter","descriptor","enumerable","split","instance","defineProperty","configurable","assign","_","ImportMetaOutsideModule","code","ImportOutsideModule","NodeDescriptions","ArrayPattern","AssignmentExpression","AssignmentPattern","ArrowFunctionExpression","ConditionalExpression","ForOfStatement","ForInStatement","ForStatement","FormalParameters","Identifier","ObjectPattern","ParenthesizedExpression","RestElement","UpdateExpression","true","false","VariableDeclarator","YieldExpression","toNodeDescription","type","prefix","String","AccessorIsGenerator","kind","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","exportName","DuplicateProto","DuplicateRegExpFlags","ElementAfterRest","EscapedCharNotAnIdentifier","ExportBindingIsString","localName","ExportDefaultFromAsIdentifier","ForInOfLoopInitializer","ForOfAsync","ForOfLet","GeneratorInSingleStatementContext","IllegalBreakContinue","IllegalLanguageModeDirective","IllegalReturn","ImportBindingIsString","importName","ImportCallArgumentTrailingComma","ImportCallArity","maxArgumentCount","ImportCallNotNewExpression","ImportCallSpreadArgument","IncompatibleRegExpUVFlags","InvalidBigIntLiteral","InvalidCodePoint","InvalidCoverInitializedName","InvalidDecimal","InvalidDigit","radix","InvalidEscapeSequence","InvalidEscapeSequenceTemplate","InvalidEscapedReservedWord","reservedWord","InvalidIdentifier","InvalidLhs","ancestor","InvalidLhsBinding","InvalidNumber","InvalidOrMissingExponent","InvalidOrUnexpectedToken","unexpected","InvalidParenthesizedAssignment","InvalidPrivateFieldResolution","InvalidPropertyBindingPattern","InvalidRecordProperty","InvalidRestAssignmentPattern","LabelRedeclaration","labelName","LetInLexicalBinding","LineTerminatorBeforeArrow","MalformedRegExpFlags","MissingClassName","MissingEqInAssignment","MissingSemicolon","MissingPlugin","missingPlugin","name","JSON","stringify","join","MissingOneOfPlugins","MissingUnicodeEscape","MixingCoalesceWithLogical","ModuleAttributeDifferentFromType","ModuleAttributeInvalidValue","ModuleAttributesWithDuplicateKeys","ModuleExportNameHasLoneSurrogate","surrogateCharCode","toString","ModuleExportUndefined","MultipleDefaultsInSwitch","NewlineAfterThrow","NoCatchOrFinally","NumberIdentifier","NumericSeparatorInEscapeSequence","ObsoleteAwaitStar","OptionalChainingNoNew","OptionalChainingNoTemplate","OverrideOnConstructor","ParamDupe","PatternHasAccessor","PatternHasMethod","PrivateInExpectedIn","PrivateNameRedeclaration","RecordExpressionBarIncorrectEndSyntaxType","RecordExpressionBarIncorrectStartSyntaxType","RecordExpressionHashIncorrectStartSyntaxType","RecordNoProto","RestTrailingComma","SloppyFunction","StaticPrototype","SuperNotAllowed","SuperPrivateField","TrailingDecorator","TupleExpressionBarIncorrectEndSyntaxType","TupleExpressionBarIncorrectStartSyntaxType","TupleExpressionHashIncorrectStartSyntaxType","UnexpectedArgumentPlaceholder","UnexpectedAwaitAfterPipelineBody","UnexpectedDigitAfterHash","UnexpectedImportExport","UnexpectedKeyword","keyword","UnexpectedLeadingDecorator","UnexpectedLexicalDeclaration","UnexpectedNewTarget","UnexpectedNumericSeparator","UnexpectedPrivateField","UnexpectedReservedWord","UnexpectedSuper","UnexpectedToken","expected","UnexpectedTokenUnaryExponentiation","UnsupportedBind","UnsupportedDecoratorExport","UnsupportedDefaultExport","UnsupportedImport","UnsupportedMetaProperty","target","onlyValidPropertyName","UnsupportedParameterDecorator","UnsupportedPropertyDecorator","UnsupportedSuper","UnterminatedComment","UnterminatedRegExp","UnterminatedString","UnterminatedTemplate","VarRedeclaration","YieldBindingIdentifier","YieldInParameter","ZeroDigitNumericSeparator","StrictDelete","StrictEvalArguments","referenceName","StrictEvalArgumentsBinding","bindingName","StrictFunction","StrictNumericEscape","StrictOctalLiteral","StrictWith","UnparenthesizedPipeBodyDescriptions","Set","PipeBodyIsTighter","PipeTopicRequiresHackPipes","PipeTopicUnbound","PipeTopicUnconfiguredToken","token","PipeTopicUnused","PipeUnparenthesizedBody","PipelineBodyNoArrow","PipelineBodySequenceExpression","PipelineHeadSequenceExpression","PipelineTopicUnused","PrimaryTopicNotAllowed","PrimaryTopicRequiresSmartPipeline","toParseErrorConstructor","toMessage","loc","details","clone","overrides","message","pos","toParseErrorCredentials","toMessageOrMessage","credentials","ParseErrorEnum","argument","syntaxPlugin","Array","isArray","toParseErrorCredentialsMap","partialCredentials","ParseErrorConstructors","reasonCode","Errors","ModuleErrors","StandardErrors","StrictModeErrors","PipelineOperatorErrors","toUnenumerable","toESTreeLocation","node","superClass","parse","file","options","tokens","parseRegExpLiteral","pattern","flags","regex","RegExp","e","estreeParseLiteral","parseBigIntLiteral","bigInt","BigInt","bigint","parseDecimalLiteral","decimal","parseLiteral","parseStringLiteral","parseNumericLiteral","parseNullLiteral","parseBooleanLiteral","directiveToStmt","directive","directiveLiteral","stmt","startNodeAt","expression","extra","expressionValue","raw","finishNodeAt","slice","initFunction","isAsync","checkDeclaration","isObjectProperty","getObjectOrClassMethodParams","method","params","isValidDirective","parenthesized","parseBlockBody","args","directiveStatements","directives","d","body","concat","pushClassMethod","classBody","isGenerator","isConstructor","allowsDirectSuper","parseMethod","typeParameters","push","parsePrivateName","getPluginOption","convertPrivateNameToPrivateIdentifier","getPrivateNameSV","id","isPrivateName","parseFunctionBody","allowExpression","isMethod","allowDirectSuper","inClassScope","funcNode","startNode","computed","finishNode","parseClassProperty","propertyNode","parseClassPrivateProperty","parseObjectMethod","prop","isPattern","isAccessor","shorthand","parseObjectProperty","startPos","startLoc","refExpressionErrors","isValidLVal","rest","isAssignable","isBinding","toAssignable","isLHS","classScope","usePrivateName","toAssignableObjectExpressionProp","raise","at","finishCallExpression","optional","callee","source","arguments","hasPlugin","attributes","toReferencedArguments","parseExport","exported","specifiers","parseSubscript","base","noCalls","state","optionalChainMember","substring","stop","chain","startNodeAtNode","hasPropertyAsPrivateName","isOptionalChain","isObjectMethod","endLoc","resetEndLocation","lastTokEndLoc","TokContext","preserveSpace","types","brace","j_oTag","j_cTag","j_expr","template","beforeExpr","startsExpr","isLoop","isAssign","postfix","ExportedTokenType","label","conf","rightAssociative","binop","updateContext","keywords","Map","createKeyword","createToken","createBinop","tokenTypeCounter","tokenTypes","tokenLabels","tokenBinops","tokenBeforeExprs","tokenStartsExprs","tokenPrefixes","createKeywordLike","tt","bracketL","bracketHashL","bracketBarL","bracketR","bracketBarR","braceL","braceBarL","braceHashL","braceR","braceBarR","parenL","parenR","comma","semi","colon","doubleColon","dot","question","questionDot","arrow","ellipsis","backQuote","dollarBraceL","templateTail","templateNonTail","hash","interpreterDirective","eq","slashAssign","xorAssign","moduloAssign","incDec","bang","tilde","doubleCaret","doubleAt","pipeline","nullishCoalescing","logicalOR","logicalAND","bitwiseOR","bitwiseXOR","bitwiseAND","equality","lt","gt","relational","bitShift","bitShiftL","bitShiftR","plusMin","modulo","star","slash","exponent","_in","_instanceof","_break","_case","_catch","_continue","_debugger","_default","_else","_finally","_function","_if","_return","_switch","_throw","_try","_var","_const","_with","_new","_this","_super","_class","_extends","_export","_import","_null","_true","_false","_typeof","_void","_delete","_do","_for","_while","_as","_assert","_async","_await","_from","_get","_let","_meta","_of","_sent","_set","_static","_yield","_asserts","_checks","_exports","_global","_implements","_intrinsic","_infer","_is","_mixins","_proto","_require","_keyof","_readonly","_unique","_abstract","_declare","_enum","_module","_namespace","_interface","_type","_opaque","string","num","regexp","privateName","eof","jsxName","jsxText","jsxTagStart","jsxTagEnd","placeholder","tokenIsIdentifier","tokenKeywordOrIdentifierIsKeyword","tokenIsKeywordOrIdentifier","tokenIsLiteralPropertyName","tokenComesBeforeExpression","tokenCanStartExpression","tokenIsAssignment","tokenIsFlowInterfaceOrTypeOrOpaque","tokenIsLoop","tokenIsKeyword","tokenIsOperator","tokenIsPostfix","tokenIsPrefix","tokenIsTSTypeOperator","tokenIsTSDeclarationStart","tokenLabelName","tokenOperatorPrecedence","tokenIsRightAssociative","tokenIsTemplate","getExportedToken","context","pop","tc","nonASCIIidentifierStartChars","nonASCIIidentifierChars","nonASCIIidentifierStart","nonASCIIidentifier","astralIdentifierStartCodes","astralIdentifierCodes","isInAstralSet","isIdentifierStart","test","fromCharCode","isIdentifierChar","reservedWords","strict","strictBind","reservedWordsStrictSet","reservedWordsStrictBindSet","isReservedWord","word","inModule","isStrictReservedWord","has","isStrictBindOnlyReservedWord","isStrictBindReservedWord","isKeyword","isIteratorStart","current","next","next2","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","BaseParser","sawUnambiguousESM","ambiguousScriptDifferentAst","pluginConfig","plugins","pluginName","pluginOptions","actualOptions","plugin","setTrailingComments","comments","trailingComments","undefined","unshift","setLeadingComments","leadingComments","setInnerComments","innerComments","adjustInnerComments","elements","commentWS","lastElement","CommentsParser","addComment","comment","processComment","commentStack","commentStackLength","lastCommentWS","leadingNode","nodeStart","commentEnd","containingNode","finalizeComment","splice","trailingNode","commentStart","input","charCodeAt","finalizeRemainingComments","resetPreviousNodeTrailingComments","takeSurroundingComments","lineBreak","lineBreakG","isNewLine","skipWhiteSpace","skipWhiteSpaceInLine","skipWhiteSpaceToLineBreak","isWhitespace","State","curLine","lineStart","errors","potentialArrowAt","noArrowAt","noArrowParamsConversionAt","maybeInArrowParameters","inType","noAnonFunctionType","hasFlowComment","isAmbientContext","inAbstractClass","topicContext","maxNumOfResolvableTopics","maxTopicIndex","soloAwait","inFSharpPipelineDirectBody","labels","decoratorStack","lastTokStartLoc","lastTokStart","ct","canStartJSXElement","containsEsc","strictErrors","tokensLength","init","strictMode","sourceType","startLine","startColumn","curPosition","skipArrays","val","isDigit","VALID_REGEX_FLAGS","forbiddenNumericSeparatorSiblings","decBinOct","hex","isAllowedNumericSeparatorSibling","bin","ch","oct","dec","Token","Tokenizer","isLookahead","pushToken","checkKeywordEscapes","nextToken","eat","match","createLookaheadState","curContext","lookahead","old","curr","nextTokenStart","nextTokenStartSince","lastIndex","lookaheadCharCode","codePointAtPos","cp","trail","setStrict","forEach","toParseError","clear","skipSpace","finishToken","getTokenFromCode","skipBlockComment","indexOf","skipLineComment","startSkip","spaceStart","loop","attachComment","CommentWhitespace","prevType","replaceToken","readToken_numberSign","readToken_interpreter","nextPos","expectPlugin","readWord1","finishOp","readToken_dot","readNumber","readToken_slash","readToken_mult_modulo","width","readToken_pipe_amp","readToken_caret","proposal","topicToken","lookaheadCh","codePointAt","readToken_atSign","readToken_plus_min","readToken_lt","readToken_gt","size","readToken_eq_excl","readToken_question","readTemplateToken","readRadixNumber","readString","readWord","fromCodePoint","str","readRegexp","escaped","inClass","content","mods","char","includes","readInt","len","forceLen","allowNumSeparator","forbiddenSiblings","isAllowedSibling","invalid","total","Infinity","prev","Number","isNaN","errorRecovery","isBigInt","replace","startsWithDot","isFloat","isDecimal","hasExponent","isOctal","hasLeadingZero","integer","recordStrictModeErrors","underscorePos","parseInt","parseFloat","readCodePoint","throwOnInvalid","readHexChar","quote","out","chunkStart","readEscapedChar","readTemplateContinuation","containsInvalid","inTemplate","codePos","octalStr","octal","codeLoc","n","firstCode","escStart","identifierCheck","esc","keywordTypes","raiseProperties","error","raiseOverwrite","expectOnePlugin","pluginNames","some","Scope","var","lexical","functions","ScopeHandler","parser","scopeStack","undefinedExports","inFunction","currentVarScopeFlags","allowSuper","currentThisScopeFlags","inClassAndNotInNonArrowFunction","inStaticBlock","inNonArrowFunction","treatFunctionsAsVar","treatFunctionsAsVarInScope","currentScope","createScope","enter","exit","scope","declareName","bindingType","checkRedeclarationInScope","add","maybeExportDefined","delete","isRedeclaredInScope","values","checkLocalExport","topLevelScope","FlowScope","declareFunctions","FlowScopeHandler","ClassScope","privateNames","loneAccessors","undefinedPrivateNames","ClassScopeHandler","stack","oldClassScope","from","declarePrivateName","elementType","redefined","accessor","oldStatic","newStatic","oldKind","newKind","kExpression","kMaybeArrowParameterDeclaration","kMaybeAsyncArrowParameterDeclaration","kParameterDeclaration","ExpressionScope","canBeArrowParameterDeclaration","isCertainlyParameterDeclaration","ArrowHeadParsingScope","declarationErrors","recordDeclarationError","ParsingErrorClass","clearDeclarationError","iterateErrors","iterator","ExpressionScopeHandler","recordParameterInitializerError","origin","recordParenthesizedIdentifierError","recordAsyncArrowParametersError","validateAsPattern","newParameterDeclarationScope","newArrowHeadScope","newAsyncArrowScope","newExpressionScope","PARAM","PARAM_YIELD","PARAM_AWAIT","PARAM_RETURN","PARAM_IN","ProductionParameterHandler","stacks","currentFlags","hasAwait","hasYield","hasReturn","hasIn","functionFlags","UtilParser","addExtra","isContextual","isUnparsedContextual","nameStart","nameEnd","nextCh","isLookaheadContextual","eatContextual","expectContextual","canInsertSemicolon","hasPrecedingLineBreak","hasFollowingLineBreak","isLineTerminator","semicolon","allowAsi","expect","tryParse","fn","oldState","abortSignal","failState","thrown","aborted","checkExpressionErrors","andThrow","shorthandAssignLoc","doubleProtoLoc","privateKeyLoc","optionalParametersLoc","hasErrors","isLiteralPropertyName","property","initializeScopes","oldLabels","oldExportedIdentifiers","exportedIdentifiers","oldInModule","oldScope","getScopeHandler","oldProdParam","prodParam","oldExpressionScope","expressionScope","enterInitialScopes","paramFlags","checkDestructuringPrivate","ExpressionErrors","Node","ranges","range","NodePrototype","prototype","__clone","newNode","clonePlaceholder","cloneIdentifier","cloned","create","expectedNode","cloneStringLiteral","NodeUtils","resetStartLocation","resetStartLocationFromNode","locationNode","reservedTypes","FlowErrors","AmbiguousConditionalArrow","AmbiguousDeclareModuleKind","AssignReservedType","reservedType","DeclareClassElement","DeclareClassFieldInitializer","DuplicateDeclareModuleExports","EnumBooleanMemberNotInitialized","memberName","enumName","EnumDuplicateMemberName","EnumInconsistentMemberValues","EnumInvalidExplicitType","invalidEnumType","EnumInvalidExplicitTypeUnknownSupplied","EnumInvalidMemberInitializerPrimaryType","explicitType","EnumInvalidMemberInitializerSymbolType","EnumInvalidMemberInitializerUnknownType","EnumInvalidMemberName","suggestion","EnumNumberMemberNotInitialized","EnumStringMemberInconsistentlyInitailized","GetterMayNotHaveThisParam","ImportTypeShorthandOnlyInPureImport","InexactInsideExact","InexactInsideNonObject","InexactVariance","InvalidNonTypeImportInDeclareModule","MissingTypeParamDefault","NestedDeclareModule","NestedFlowComment","PatternIsOptional","SetterMayNotHaveThisParam","SpreadVariance","ThisParamAnnotationRequired","ThisParamBannedInConstructor","ThisParamMayNotBeOptional","ThisParamMustBeFirst","ThisParamNoDefault","TypeBeforeInitializer","TypeCastInPattern","UnexpectedExplicitInexactInObject","UnexpectedReservedType","UnexpectedReservedUnderscore","UnexpectedSpaceBetweenModuloChecks","UnexpectedSpreadType","UnexpectedSubtractionOperand","UnexpectedTokenAfterTypeParameter","UnexpectedTypeParameterBeforeAsyncArrowFunction","UnsupportedDeclareExportKind","unsupportedExportKind","UnsupportedStatementInDeclareModule","UnterminatedFlowComment","isEsModuleType","bodyElement","declaration","hasTypeImportKind","importKind","isMaybeDefaultImport","exportSuggestions","const","let","interface","partition","list","list1","list2","FLOW_PRAGMA_REGEX","flowPragma","shouldParseTypes","shouldParseEnums","matches","exec","Error","flowParseTypeInitialiser","tok","oldInType","flowParseType","flowParsePredicate","moduloLoc","parseExpression","flowParseTypeAndPredicateInitialiser","predicate","flowParseDeclareClass","flowParseInterfaceish","flowParseDeclareFunction","parseIdentifier","typeNode","typeContainer","flowParseTypeParameterDeclaration","tmp","flowParseFunctionTypeParams","this","returnType","typeAnnotation","flowParseDeclare","insideModule","flowParseDeclareVariable","flowParseDeclareModuleExports","flowParseDeclareModule","flowParseDeclareTypeAlias","flowParseDeclareOpaqueType","flowParseDeclareInterface","flowParseDeclareExportDeclaration","flowParseTypeAnnotatableIdentifier","parseExprAtom","bodyNode","parseImport","hasModuleExport","default","isLet","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","nodeStartLoc","variance","flowParseVariance","ident","bound","defaultRequired","typeParameter","oldNoAnonFunctionType","flowParseTypeParameterInstantiationCallOrNew","flowParseTypeOrImplicitInstantiation","flowParseInterfaceType","flowParseObjectPropertyKey","flowParseObjectTypeIndexer","isStatic","static","flowParseObjectTypeInternalSlot","flowParseObjectTypeMethodish","flowParseFunctionTypeParam","flowParseObjectTypeCallProperty","valueNode","callProperties","indexers","internalSlots","endDelim","exact","inexact","protoStartLoc","inexactStartLoc","propOrInexact","flowParseObjectTypeProperty","flowObjectTypeSemicolon","isInexactToken","proto","flowCheckGetterSetterParams","paramCount","node2","qualification","flowParseGenericType","flowParseTypeofType","flowParsePrimaryType","flowParseTupleType","first","lh","isThis","reinterpretTypeAsFunctionTypeParam","flowIdentToTypeAnnotation","isGroupedType","parseLiteralAtNode","createIdentifier","flowParsePostfixType","seenOptionalIndexedAccess","objectType","indexType","flowParsePrefixType","flowParseAnonFunctionWithoutParens","param","flowParseIntersectionType","flowParseUnionType","allowPrimitiveOverride","typeCastToParameter","allowExpressionBody","forwardNoArrowParamsConversionAt","parseFunctionBodyAndFinish","parseStatement","topLevel","flowParseEnumDeclaration","parseExpressionStatement","expr","shouldParseExportDeclaration","isExportDefaultSpecifier","parseExportDefaultExpression","parseConditional","setOptionalParametersError","originalNoArrowAt","consequent","failed","tryParseConditionalConsequent","valid","getArrowLikeExpressions","alternate","parseMaybeAssign","parseMaybeAssignAllowIn","disallowInvalid","arrows","finishArrowValidation","every","toAssignableList","trailingCommaLoc","checkParams","result","parseParenItem","typeCastNode","assertModuleNodeAllowed","decl","parseExportDeclaration","declarationNode","parseExportSpecifiers","parseExportFrom","eatExportStar","maybeParseExportNamespaceSpecifier","hasNamespace","parseClassId","isStatement","optionalId","parseClassMember","member","parseClassMemberFromModifier","isIterator","readIterator","fullWord","exprList","toReferencedList","isParenthesizedExpr","parseArrayLike","close","canBePattern","isTuple","isClassMethod","isClassProperty","isNonstaticConstructor","isThisParam","pushClassPrivateMethod","parseClassSuper","superTypeParameters","implemented","checkGetterSetterParams","parsePropertyNamePrefixOperator","parseObjPropValue","parseAssignableListItemTypes","parseMaybeDefault","left","shouldParseDefaultImport","parseImportSpecifierLocal","specifier","local","finishImportSpecifier","maybeParseDefaultImportSpecifier","parseImportSpecifier","importedIsString","isInTypeOnlyImport","isMaybeTypeOnly","firstIdent","imported","specifierTypeKind","as_ident","specifierIsTypeImport","checkReservedWord","parseBindingAtom","parseFunctionParams","allowModifiers","parseVarId","parseAsyncArrowFromCallExpression","call","shouldParseAsyncArrow","afterLeftParse","jsx","currentContext","abort","arrowExpression","maybeUnwrapTypeCastExpression","async","parseArrow","shouldParseArrow","setArrowFunctionParameters","allowDuplicates","isArrowFunction","parseParenAndDistinguishExpression","canBeArrow","parseSubscripts","parseCallExpressionArguments","parseAsyncArrowWithTypeParameters","subscriptState","isLookaheadToken_lt","typeArguments","parseNewArguments","targs","parseArrowExpression","parseTopLevel","program","fileNode","skipFlowComment","hasFlowCommentCompletion","shiftToFirstNonWhiteSpace","ch2","ch3","flowEnumErrorBooleanMemberNotInitialized","flowEnumErrorInvalidMemberInitializer","enumContext","flowEnumErrorNumberMemberNotInitialized","flowEnumErrorStringMemberInconsistentlyInitailized","flowEnumMemberInit","endOfInit","literal","flowEnumMemberRaw","flowEnumCheckExplicitTypeMismatch","expectedType","flowEnumMembers","seenNames","members","booleanMembers","numberMembers","stringMembers","defaultedMembers","hasUnknownMembers","memberNode","toUpperCase","flowEnumStringMembers","initializedMembers","flowEnumParseExplicitType","flowEnumBody","nameLoc","empty","boolsLen","numsLen","strsLen","defaultedLen","afterNext","entities","__proto__","quot","amp","apos","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","JsxErrors","AttributeIsEmpty","MissingClosingTagElement","openingTagName","MissingClosingTagFragment","UnexpectedSequenceExpression","HTMLEntity","UnsupportedJsxValue","UnterminatedJsxContent","UnwrappedAdjacentJSXElements","isFragment","getQualifiedJSXName","namespace","jsxReadToken","jsxReadEntity","jsxReadNewLine","normalizeCRLF","jsxReadString","codePoint","count","desc","entity","XHTMLEntities","jsxReadWord","jsxParseIdentifier","jsxParseNamespacedName","jsxParseElementName","jsxParseAttributeValue","setContext","jsxParseExpressionContainer","jsxParseEmptyExpression","jsxParseSpreadChild","previousContext","jsxParseAttribute","jsxParseOpeningElementAt","jsxParseOpeningElementAfterName","selfClosing","jsxParseClosingElementAt","jsxParseElementAt","children","openingElement","closingElement","contents","openingFragment","closingFragment","jsxParseElement","newContext","TypeScriptScope","enums","constEnums","classes","exportOnlyBindings","TypeScriptScopeHandler","isConst","wasConst","getOwn","hasOwnProperty","nonNull","x","assert","TSErrors","AbstractMethodHasImplementation","methodName","AbstractPropertyHasInitializer","propertyName","AccesorCannotDeclareThisParameter","AccesorCannotHaveTypeParameters","CannotFindName","ClassMethodHasDeclare","ClassMethodHasReadonly","ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumReference","ConstructorHasTypeParameters","DeclareAccessor","DeclareClassFieldHasInitializer","DeclareFunctionHasImplementation","DuplicateAccessibilityModifier","modifier","DuplicateModifier","EmptyHeritageClauseType","EmptyTypeArguments","EmptyTypeParameters","ExpectedAmbientAfterExportDeclare","ImportAliasHasImportType","IncompatibleModifiers","modifiers","IndexSignatureHasAbstract","IndexSignatureHasAccessibility","IndexSignatureHasDeclare","IndexSignatureHasOverride","IndexSignatureHasStatic","InitializerNotAllowedInAmbientContext","InvalidModifierOnTypeMember","InvalidModifiersOrder","orderedModifiers","InvalidTupleMemberLabel","MissingInterfaceName","MixedLabeledAndUnlabeledElements","NonAbstractClassHasAbstractMethod","NonClassMethodPropertyHasAbstractModifer","OptionalTypeBeforeRequired","OverrideNotInSubClass","PrivateElementHasAbstract","PrivateElementHasAccessibility","ReadonlyForMethodSignature","ReservedArrowTypeParam","ReservedTypeAssertion","SetAccesorCannotHaveOptionalParameter","SetAccesorCannotHaveRestParameter","SetAccesorCannotHaveReturnType","SingleTypeParameterWithoutTrailingComma","typeParameterName","StaticBlockCannotHaveModifier","TypeAnnotationAfterAssign","TypeImportCannotSpecifyDefaultAndNamed","TypeModifierIsUsedInTypeExports","TypeModifierIsUsedInTypeImports","UnexpectedParameterModifier","UnexpectedReadonly","UnexpectedTypeAnnotation","UnexpectedTypeCastInParameter","UnsupportedImportTypeArgument","UnsupportedParameterPropertyKind","UnsupportedSignatureParameterKind","keywordTypeFromName","tsIsAccessModifier","tsIsIdentifier","tsTokenCanFollowModifier","tsNextTokenCanFollowModifier","tsParseModifier","allowedModifiers","stopOnStartOfClassStaticBlock","tsIsStartOfStaticBlocks","tsTryParse","bind","tsParseModifiers","modified","disallowedModifiers","enforceOrder","before","after","incompatible","mod1","mod2","accessibility","tsIsListTerminator","tsParseList","parseElement","tsParseDelimitedList","refTrailingCommaPos","tsParseDelimitedListWorker","expectSuccess","trailingCommaPos","element","tsParseBracketedList","bracket","skipFirstToken","tsParseImportType","qualifier","tsParseEntityName","tsParseTypeArguments","allowReservedWords","tsParseTypeReference","typeName","tsParseThisTypePredicate","lhs","parameterName","tsParseTypeAnnotation","asserts","tsParseThisTypeNode","tsParseTypeQuery","exprName","tsParseTypeParameter","tsParseTypeParameterName","constraint","tsEatThenParseType","tsTryParseTypeParameters","tsParseTypeParameters","tsTryNextParseConstantContext","typeReference","tsFillSignature","returnToken","signature","returnTokenRequired","paramsKey","returnTypeKey","tsParseBindingListForSignature","tsParseTypeOrTypePredicateAnnotation","parseBindingList","tsParseTypeMemberSemicolon","tsParseSignatureMember","tsIsUnambiguouslyIndexSignature","tsTryParseIndexSignature","tsLookAhead","parameters","tsTryParseTypeAnnotation","tsParsePropertyOrMethodSignature","readonly","nodeAny","firstParameter","tsParseTypeMember","idx","parsePropertyName","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","parseMaybeUnary","nodeType","tsParseArrayTypeOrHigher","tsParseTypeOperator","operator","tsParseTypeOperatorOrHigher","tsCheckTypeAnnotationForReadOnly","tsParseInferType","isTypeOperator","tsParseUnionOrIntersectionType","parseConstituentType","hasLeadingOperator","tsParseIntersectionTypeOrHigher","tsParseUnionTypeOrHigher","tsIsStartOfFunctionType","tsIsUnambiguouslyStartOfFunctionType","tsSkipParameterStart","previousErrorCount","parseObjectLike","tsInType","t","tsParseTypePredicateAsserts","thisTypePredicate","typePredicateVariable","tsParseTypePredicatePrefix","tsTryParseTypeOrTypePredicateAnnotation","eatColon","tsParseNonConditionalType","checkType","extendsType","trueType","falseType","isAbstractConstructorSignature","tsParseTypeAssertion","tsNextThenParseType","tsParseHeritageClause","originalStartLoc","delimitedList","tsParseExpressionWithTypeArguments","tsParseInterfaceDeclaration","checkIdentifier","tsParseTypeAliasDeclaration","tsInNoContext","cb","oldContext","tsDoThenParseType","tsParseEnumMember","initializer","tsParseEnumDeclaration","tsParseModuleBlock","parseBlockOrModuleBlockBody","tsParseModuleOrNamespaceDeclaration","nested","inner","tsParseAmbientExternalModuleDeclaration","global","tsParseImportEqualsDeclaration","isExport","moduleReference","tsParseModuleReference","tsIsExternalModuleReference","tsParseExternalModuleReference","f","res","tsTryParseAndCatch","tsTryParseDeclare","nany","starttype","tsInAmbientContext","parseFunctionStatement","parseClass","parseVarStatement","tsParseDeclaration","tsTryParseExportDeclaration","tsParseExpressionStatement","mod","tsCheckLineTerminator","tsParseAbstractDeclaration","tsTryParseGenericAsyncArrowFunction","oldMaybeInArrowParameters","tsParseTypeArgumentsInExpression","reScan_lt","tsIsDeclarationStart","parseAssignableListItem","decorators","override","elt","pp","parameter","isSimpleParameter","bodilessType","registerFunctionStatementId","tsCheckForInvalidTypeCasts","items","isInParens","nonNullExpression","isOptionalCall","missingParenErrorLoc","atPossibleAsyncArrow","asyncArrowFn","parseTaggedTemplateExpression","parseExprOp","leftStartPos","leftStartLoc","minPrec","reScan_lt_gt","checkKeywords","checkDuplicateExports","ahead","importNode","isAbstractClass","cls","allowMissingInitializer","declarations","expressions","isPossiblyLiteralEnum","parseStatementContent","parseAccessModifier","tsHasSomeModifiers","callParseClassMemberWithIsStatic","parseClassStaticBlock","parseClassMemberWithIsStatic","hadSuperClass","parsePostMemberNameModifiers","methodOrProp","isDeclare","isIdentifier","parseClassPropertyAnnotation","definite","declareClassPrivateMethodInScope","typeCast","trailingComma","reportReservedArrowTypeParam","toAssignableParenthesizedExpression","isParenthesized","binding","TSTypeCastExpression","TSParameterProperty","TSNonNullExpression","TSAsExpression","TSTypeAssertion","parseMaybeDecoratorArguments","checkCommaAfterRest","canHaveLeadingDecorator","getGetterSetterExpectedParamCount","baseCount","firstParam","hasContextParam","parseCatchClauseParam","oldIsAmbientContext","oldInAbstractClass","hasBody","shouldParseAsAmbientContext","getExpression","parseExportSpecifier","isString","isInTypeExport","parseTypeOnlyImportExportSpecifier","isImport","isInTypeOnlyImportExport","leftOfAsKey","rightOfAsKey","leftOfAs","rightOfAs","hasTypeSpecifier","canParseAsKeyword","firstAs","secondAs","parseModuleExportName","kindKey","isUncomputedMemberExpressionChain","PlaceholderErrors","ClassNameIsRequired","UnexpectedSpace","parsePlaceholder","assertNoSpace","finishPlaceholder","isFinished","verifyBreakContinue","parseBlock","parseFunctionId","takeDecorators","oldStrict","parseClassBody","startsWith","maybeParseExportDefaultSpecifier","checkExport","hasStarImport","maybeParseStarImportSpecifier","parseNamedImportSpecifiers","parseImportSource","parseV8Intrinsic","v8IntrinsicStartLoc","parseIdentifierName","identifier","expectedConfig","expectedName","expectedOptions","expectedKeys","expectedOptionsIsEmpty","p","option","find","PIPELINE_PROPOSALS","TOPIC_TOKENS","RECORD_AND_TUPLE_SYNTAX_TYPES","validatePlugins","decoratorsBeforeExport","proposalList","tupleSyntaxIsHash","syntaxType","tokenList","moduleAttributesVerionPluginOption","missingPlugins","mixinPlugins","estree","flow","typescript","v8intrinsic","placeholders","mixinPluginNames","defaultOptions","sourceFilename","allowAwaitOutsideFunction","allowReturnOutsideFunction","allowImportExportEverywhere","allowSuperOutsideMethod","allowUndeclaredExports","createParenthesizedExpressions","getOptions","opts","unwrapParenthesizedExpression","LValParser","isLast","checkToRestConversion","arg","toReferencedListDeep","parseSpread","refNeedsArrowPos","parseRestBinding","closeCharCode","allowEmpty","elts","parseDecorator","parseBindingRestProperty","parseBindingProperty","ObjectProperty","checkLVal","in","checkClashes","strictModeChanged","allowingSloppyLetBinding","hasParenthesizedAncestor","validity","ParseErrorClass","isParenthesizedExpression","nextAncestor","child","allowLetBinding","declareNameFromIdentifier","ExpressionParser","checkProto","isRecord","protoRef","used","shouldExitDescending","disallowIn","disallowInAnd","parseExpressionBase","allowInAnd","parseMaybeAssignDisallowIn","resultError","parseYield","ownExpressionErrors","parseMaybeConditional","parseExprOps","parseMaybeUnaryOrPrivate","op","prec","checkPipelineAtInfixOperator","logical","coalesce","parseExprOpRightExpr","nextOp","withTopicBindingContext","parseHackPipeBody","parseSmartPipelineBodyInStyle","parseExprOpBaseRightExpr","withSoloAwaitPermittingContext","parseFSharpPipelineBody","requiredParentheses","topicReferenceWasUsedInCurrentContext","checkExponentialAfterUnary","sawUnary","isAwait","isAwaitAllowed","parseAwait","update","isDelete","parseUpdate","isAmbiguousAwait","parseExprSubscripts","maybeAsyncArrow","parseBind","parseCoverCallAndAsyncArrowHead","parseMember","parseNoCallExpr","tag","quasi","dynamicImport","allowPlaceholder","nodeForExtra","oldInFSharpPipelineDirectBody","addTrailingCommaExtraToNode","parseExprListItem","parseSuper","parseImportMetaProperty","parseDo","parseFunctionOrFunctionSent","parseDecorators","parseNewOrNewTarget","parseTopicReferenceThenEqualsSign","parseTopicReference","pipeProposal","parseModuleExpression","parseFunction","parseAsyncArrowUnaryFunction","topicTokenType","topicTokenValue","tokenType","finishTopicReference","testTopicReferenceConfiguration","topicReferenceIsAllowedInCurrentContext","registerTopicReference","meta","parseMetaProperty","innerStartPos","innerStartLoc","spreadStartLoc","optionalCommaStartLoc","spreadNodeStartPos","spreadNodeStartLoc","innerEndLoc","arrowNode","wrapParenthesis","parenExpression","metaProp","parseNew","parseExprList","parseTemplateElement","isTagged","elemStart","elem","isTail","endOffset","elemEnd","cooked","tail","curElt","quasis","propHash","parsePropertyDefinition","maybeAsyncOrAccessorProp","keyName","generator","isExpression","hasStrictModeDirective","nonSimple","isSimpleParamList","formalParameters","reservedTest","delegating","delegate","childExpr","isSimpleReference","checkSmartPipeTopicBodyEarlyErrors","callback","outerContextTopicState","withSmartMixTopicForbiddingContext","outerContextSoloAwaitState","prodParamToSet","prodParamToClear","ret","revertScopes","parseProgram","loopLabel","switchLabel","FUNC_NO_FLAGS","FUNC_STATEMENT","FUNC_HANGING_STATEMENT","FUNC_NULLABLE_ID","loneSurrogate","keywordRelationalOperator","babel7CompatTokens","hashEndPos","hashEndLoc","backquoteEnd","backquoteEndLoc","startToken","templateValue","templateElementEnd","templateElementEndLoc","endToken","StatementParser","interpreter","parseInterpreterDirective","stmtToDirective","isLetKeyword","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","parseForIn","startsWithAsync","isForOf","declarationPosition","discriminant","cases","cur","sawDefault","isCase","simple","block","handler","clause","finalizer","statementStart","allowDirectives","createNewLexicalScope","afterBlockParse","parsedNonDirective","isForIn","await","isFor","statement","isHangingStatement","requireId","hadConstructor","publicMethod","privateMethod","publicProp","privateProp","accessorProp","publicMember","parseClassElementName","isPrivate","maybeQuestionTokenStartLoc","pushClassPrivateProperty","pushClassProperty","pushClassAccessorProperty","parseClassAccessorProperty","parseInitializer","hasDefault","parseAfterDefault","hasStar","parseAfterNamespace","isFromRequired","hasSpecifiers","maybeParseExportNamedSpecifiers","hasDeclaration","maybeParseExportDeclaration","isTypeExport","assertions","nextType","hasFrom","nextAfterFrom","maybeParseImportAssertions","checkNames","isDefault","isFrom","nodes","surrogate","parseNext","maybeParseModuleAttributes","parseAssertEntries","attrs","attrNames","importSpecifier","Parser","pluginsMap","pluginMap","getParser","ast","moduleError","generateExportedTokenTypes","internalTokenTypes","tokTypes","getParserClass","parserClassCache","pluginsFromOptions","pluginList"],"mappings":";;;;;;;;;;;;;;;;;;;AASO,MAAMA,QAAN,CAAe;AAKpBC,EAAAA,WAAW,CAACC,IAAD,EAAeC,GAAf,EAA4BC,KAA5B,EAA2C;AAAA,SAJtDF,IAIsD;AAAA,SAHtDG,MAGsD;AAAA,SAFtDD,KAEsD;AACpD,SAAKF,IAAL,GAAYA,IAAZ;AACA,SAAKG,MAAL,GAAcF,GAAd;AACA,SAAKC,KAAL,GAAaA,KAAb;AACD;;AATmB;AAYf,MAAME,cAAN,CAAqB;AAM1BL,EAAAA,WAAW,CAACM,KAAD,EAAkBC,GAAlB,EAAkC;AAAA,SAL7CD,KAK6C;AAAA,SAJ7CC,GAI6C;AAAA,SAH7CC,QAG6C;AAAA,SAF7CC,cAE6C;AAC3C,SAAKH,KAAL,GAAaA,KAAb;AAEA,SAAKC,GAAL,GAAWA,GAAX;AACD;;AAVyB;AAwBrB,SAASG,8BAAT,CACLC,QADK,EAELC,YAFK,EAGL;AACA,QAAM;AAAEX,IAAAA,IAAF;AAAQG,IAAAA,MAAR;AAAgBD,IAAAA;AAAhB,MAA0BQ,QAAhC;AACA,SAAO,IAAIZ,QAAJ,CAAaE,IAAb,EAAmBG,MAAM,GAAGQ,YAA5B,EAA0CT,KAAK,GAAGS,YAAlD,CAAP;AACD;;ACjDM,MAAMC,eAAe,GAAGC,MAAM,CAACC,MAAP,CAAc;AAC3CC,EAAAA,WAAW,EAAE,2BAD8B;AAE3CC,EAAAA,qBAAqB,EAAE;AAF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