odin-js-fundamentals-part-4/node_modules/@babel/parser/lib/index.js.map

1 line
1.3 MiB
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{"version":3,"file":"index.js","sources":["../src/util/location.ts","../src/parse-error/credentials.ts","../src/parse-error/module-errors.ts","../src/parse-error/to-node-description.ts","../src/parse-error/standard-errors.ts","../src/parse-error/strict-mode-errors.ts","../src/parse-error/pipeline-operator-errors.ts","../src/parse-error.ts","../src/plugins/estree.ts","../src/tokenizer/context.ts","../src/tokenizer/types.ts","../../babel-helper-validator-identifier/src/identifier.ts","../../babel-helper-validator-identifier/src/keyword.ts","../src/util/identifier.ts","../src/util/scope.ts","../src/plugins/flow/scope.ts","../src/parser/base.ts","../src/parser/comments.ts","../src/util/whitespace.ts","../src/tokenizer/state.ts","../../babel-helper-string-parser/src/index.ts","../src/tokenizer/index.ts","../src/util/class-scope.ts","../src/util/expression-scope.ts","../src/util/production-parameter.ts","../src/parser/util.ts","../src/parser/node.ts","../src/plugins/flow/index.ts","../src/plugins/jsx/xhtml.ts","../src/plugins/jsx/index.ts","../src/plugins/typescript/scope.ts","../src/parser/lval.ts","../src/plugins/typescript/index.ts","../src/plugins/placeholders.ts","../src/plugins/v8intrinsic.ts","../src/plugin-utils.ts","../src/options.ts","../src/parser/expression.ts","../src/parser/statement.ts","../src/parser/index.ts","../src/index.ts"],"sourcesContent":["export 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 | undefined | null;\n\n constructor(start: Position, end?: Position) {\n this.start = start;\n // (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 */\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","export const enum ParseErrorCode {\n SyntaxError = \"BABEL_PARSER_SYNTAX_ERROR\",\n SourceTypeModuleError = \"BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED\",\n}\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 toMessage: ToMessage<ErrorDetails>;\n};\n\nconst reflect = (keys: string[], last = keys.length - 1) => ({\n get(this: unknown): unknown {\n return keys.reduce(\n (object, key) =>\n // @ts-expect-error key should index object\n object[key],\n this,\n );\n },\n set(this: unknown, value: unknown) {\n keys.reduce(\n // @ts-expect-error key should index item\n (item, key, i) => (i === last ? (item[key] = value) : item[key]),\n this,\n );\n },\n});\n\nconst instantiate = <T>(\n constructor: new () => T,\n properties: any,\n descriptors: any,\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(), properties),\n );\n\nexport { instantiate };\n","import { ParseErrorCode } from \"../parse-error\";\n\nexport default {\n ImportMetaOutsideModule: {\n message: `import.meta may appear only with 'sourceType: \"module\"'`,\n code: ParseErrorCode.SourceTypeModuleError,\n },\n ImportOutsideModule: {\n message: `'import' and 'export' may appear only with 'sourceType: \"module\"'`,\n code: ParseErrorCode.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 CatchClause: \"catch clause\",\n ForOfStatement: \"for-of statement\",\n ForInStatement: \"for-in statement\",\n ForStatement: \"for-loop\",\n FormalParameters: \"function parameter list\",\n Identifier: \"identifier\",\n ImportSpecifier: \"import specifier\",\n ImportDefaultSpecifier: \"import default specifier\",\n ImportNamespaceSpecifier: \"import namespace specifier\",\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 = keyof Omit<\n typeof NodeDescriptions,\n \"UpdateExpression\"\n>;\n\ntype NodeWithDescription =\n | {\n type: \"UpdateExpression\";\n prefix: boolean;\n }\n | {\n type: NodeTypesWithDescriptions;\n };\n\n// @ts-expect-error prefix is specified only when type is UpdateExpression\n// eslint-disable-next-line no-confusing-arrow\nconst toNodeDescription = ({ type, prefix }: NodeWithDescription) =>\n type === \"UpdateExpression\"\n ? NodeDescriptions.UpdateExpression[String(prefix) as \"true\" | \"false\"]\n : NodeDescriptions[type];\n\nexport default toNodeDescription;\n","import 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 | \"ImportSpecifier\"\n | \"ImportNamespaceSpecifier\"\n | \"ImportDefaultSpecifier\"\n | \"ParenthesizedExpression\"\n | \"ObjectPattern\"\n | \"RestElement\"\n | \"VariableDeclarator\";\n };\n\nexport default {\n AccessorIsGenerator: ({ kind }: { kind: \"get\" | \"set\" }) =>\n `A ${kind}ter cannot be a generator.`,\n ArgumentsInClass:\n \"'arguments' is only allowed in functions and class methods.\",\n AsyncFunctionInSingleStatementContext:\n \"Async functions can only be declared at the top level or inside a block.\",\n AwaitBindingIdentifier:\n \"Can not use 'await' as identifier inside an async function.\",\n AwaitBindingIdentifierInStaticBlock:\n \"Can not use 'await' as identifier inside a static block.\",\n AwaitExpressionFormalParameter:\n \"'await' is not allowed in async function parameters.\",\n AwaitUsingNotInAsyncContext:\n \"'await using' is only allowed within async functions and at the top levels of modules.\",\n AwaitNotInAsyncContext:\n \"'await' is only allowed within async functions and at the top levels of modules.\",\n AwaitNotInAsyncFunction: \"'await' is only allowed within async functions.\",\n BadGetterArity: \"A 'get' accessor must not have any formal parameters.\",\n BadSetterArity: \"A 'set' accessor must have exactly one formal parameter.\",\n BadSetterRestParameter:\n \"A 'set' accessor function argument must not be a rest parameter.\",\n ConstructorClassField: \"Classes may not have a field named 'constructor'.\",\n ConstructorClassPrivateField:\n \"Classes may not have a private field named '#constructor'.\",\n ConstructorIsAccessor: \"Class constructor may not be an accessor.\",\n ConstructorIsAsync: \"Constructor can't be an async function.\",\n ConstructorIsGenerator: \"Constructor can't be a generator.\",\n DeclarationMissingInitializer: ({\n kind,\n }: {\n kind: \"const\" | \"destructuring\";\n }) => `Missing initializer in ${kind} declaration.`,\n DecoratorArgumentsOutsideParentheses:\n \"Decorator arguments must be moved inside parentheses: use '@(decorator(args))' instead of '@(decorator)(args)'.\",\n DecoratorBeforeExport:\n \"Decorators must be placed *before* the 'export' keyword. Remove the 'decoratorsBeforeExport: true' option to use the 'export @decorator class {}' syntax.\",\n DecoratorsBeforeAfterExport:\n \"Decorators can be placed *either* before or after the 'export' keyword, but not in both locations at the same time.\",\n DecoratorConstructor:\n \"Decorators can't be used with a constructor. Did you mean '@dec class { ... }'?\",\n DecoratorExportClass:\n \"Decorators must be placed *after* the 'export' keyword. Remove the 'decoratorsBeforeExport: false' option to use the '@decorator export class {}' syntax.\",\n DecoratorSemicolon: \"Decorators must not be followed by a semicolon.\",\n DecoratorStaticBlock: \"Decorators can't be used with a static block.\",\n DeletePrivateField: \"Deleting a private field is not allowed.\",\n DestructureNamedImport:\n \"ES2015 named imports do not destructure. Use another statement for destructuring after the import.\",\n DuplicateConstructor: \"Duplicate constructor in the same class.\",\n DuplicateDefaultExport: \"Only one default export allowed per module.\",\n DuplicateExport: ({ exportName }: { exportName: string }) =>\n `\\`${exportName}\\` has already been exported. Exported identifiers must be unique.`,\n DuplicateProto: \"Redefinition of __proto__ property.\",\n DuplicateRegExpFlags: \"Duplicate regular expression flag.\",\n ElementAfterRest: \"Rest element must be last element.\",\n EscapedCharNotAnIdentifier: \"Invalid Unicode escape.\",\n ExportBindingIsString: ({\n localName,\n exportName,\n }: {\n localName: string;\n exportName: string;\n }) =>\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 ExportDefaultFromAsIdentifier:\n \"'from' is not allowed as an identifier after 'export default'.\",\n\n ForInOfLoopInitializer: ({\n type,\n }: {\n type: \"ForInStatement\" | \"ForOfStatement\";\n }) =>\n `'${\n type === \"ForInStatement\" ? \"for-in\" : \"for-of\"\n }' loop variable declaration may not have an initializer.`,\n ForInUsing: \"For-in loop may not start with 'using' declaration.\",\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 IllegalBreakContinue: ({\n type,\n }: {\n type: \"BreakStatement\" | \"ContinueStatement\";\n }) => `Unsyntactic ${type === \"BreakStatement\" ? \"break\" : \"continue\"}.`,\n\n IllegalLanguageModeDirective:\n \"Illegal 'use strict' directive in function with non-simple parameter list.\",\n IllegalReturn: \"'return' outside of function.\",\n ImportAttributesUseAssert:\n \"The `assert` keyword in import attributes is deprecated and it has been replaced by the `with` keyword. You can enable the `deprecatedAssertSyntax: true` option in the import attributes plugin to suppress this error.\",\n ImportBindingIsString: ({ importName }: { importName: string }) =>\n `A string literal cannot be used as an imported binding.\\n- Did you mean \\`import { \"${importName}\" as foo }\\`?`,\n ImportCallArgumentTrailingComma:\n \"Trailing comma is disallowed inside import(...) arguments.\",\n ImportCallArity: ({ maxArgumentCount }: { maxArgumentCount: 1 | 2 }) =>\n `\\`import()\\` requires exactly ${\n maxArgumentCount === 1 ? \"one argument\" : \"one or two arguments\"\n }.`,\n ImportCallNotNewExpression: \"Cannot use new with import(...).\",\n ImportCallSpreadArgument: \"`...` is not allowed in `import()`.\",\n ImportJSONBindingNotDefault:\n \"A JSON module can only be imported with `default`.\",\n ImportReflectionHasAssertion: \"`import module x` cannot have assertions.\",\n ImportReflectionNotBinding:\n 'Only `import module x from \"./module\"` is valid.',\n IncompatibleRegExpUVFlags:\n \"The 'u' and 'v' regular expression flags cannot be enabled at the same time.\",\n InvalidBigIntLiteral: \"Invalid BigIntLiteral.\",\n InvalidCodePoint: \"Code point out of bounds.\",\n InvalidCoverInitializedName: \"Invalid shorthand property initializer.\",\n InvalidDecimal: \"Invalid decimal.\",\n InvalidDigit: ({ radix }: { radix: number }) =>\n `Expected number in radix ${radix}.`,\n InvalidEscapeSequence: \"Bad character escape sequence.\",\n InvalidEscapeSequenceTemplate: \"Invalid escape sequence in template.\",\n InvalidEscapedReservedWord: ({ reservedWord }: { reservedWord: string }) =>\n `Escape sequence in keyword ${reservedWord}.`,\n InvalidIdentifier: ({ identifierName }: { identifierName: string }) =>\n `Invalid identifier ${identifierName}.`,\n InvalidLhs: ({ ancestor }: { ancestor: LValAncestor }) =>\n `Invalid left-hand side in ${toNodeDescription(ancestor)}.`,\n InvalidLhsBinding: ({ ancestor }: { ancestor: LValAncestor }) =>\n `Binding invalid left-hand side in ${toNodeDescription(ancestor)}.`,\n InvalidNumber: \"Invalid number.\",\n InvalidOrMissingExponent:\n \"Floating-point numbers require a valid exponent after the 'e'.\",\n InvalidOrUnexpectedToken: ({ unexpected }: { unexpected: string }) =>\n `Unexpected character '${unexpected}'.`,\n InvalidParenthesizedAssignment: \"Invalid parenthesized assignment pattern.\",\n InvalidPrivateFieldResolution: ({\n identifierName,\n }: {\n identifierName: string;\n }) => `Private name #${identifierName} is not defined.`,\n InvalidPropertyBindingPattern: \"Binding member expression.\",\n InvalidRecordProperty:\n \"Only properties and spread elements are allowed in record definitions.\",\n InvalidRestAssignmentPattern: \"Invalid rest operator's argument.\",\n LabelRedeclaration: ({ labelName }: { labelName: string }) =>\n `Label '${labelName}' is already declared.`,\n LetInLexicalBinding:\n \"'let' is not allowed to be used as a name in 'let' or 'const' declarations.\",\n LineTerminatorBeforeArrow: \"No line break is allowed before '=>'.\",\n MalformedRegExpFlags: \"Invalid regular expression flag.\",\n MissingClassName: \"A class name is required.\",\n MissingEqInAssignment:\n \"Only '=' operator can be used for specifying default value.\",\n MissingSemicolon: \"Missing semicolon.\",\n MissingPlugin: ({ missingPlugin }: { missingPlugin: [string] }) =>\n `This experimental syntax requires enabling the parser plugin: ${missingPlugin\n .map(name => JSON.stringify(name))\n .join(\", \")}.`,\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 }: { missingPlugin: string[] }) =>\n `This experimental syntax requires enabling one of the following parser plugin(s): ${missingPlugin\n .map(name => JSON.stringify(name))\n .join(\", \")}.`,\n MissingUnicodeEscape: \"Expecting Unicode escape sequence \\\\uXXXX.\",\n MixingCoalesceWithLogical:\n \"Nullish coalescing operator(??) requires parens when mixing with logical operators.\",\n ModuleAttributeDifferentFromType:\n \"The only accepted module attribute is `type`.\",\n ModuleAttributeInvalidValue:\n \"Only string literals are allowed as module attribute values.\",\n ModuleAttributesWithDuplicateKeys: ({ key }: { key: string }) =>\n `Duplicate key \"${key}\" is not allowed in module attributes.`,\n ModuleExportNameHasLoneSurrogate: ({\n surrogateCharCode,\n }: {\n surrogateCharCode: number;\n }) =>\n `An export name cannot include a lone surrogate, found '\\\\u${surrogateCharCode.toString(\n 16,\n )}'.`,\n ModuleExportUndefined: ({ localName }: { localName: string }) =>\n `Export '${localName}' is not defined.`,\n MultipleDefaultsInSwitch: \"Multiple default clauses.\",\n NewlineAfterThrow: \"Illegal newline after throw.\",\n NoCatchOrFinally: \"Missing catch or finally clause.\",\n NumberIdentifier: \"Identifier directly after number.\",\n NumericSeparatorInEscapeSequence:\n \"Numeric separators are not allowed inside unicode escape sequences or hex escape sequences.\",\n ObsoleteAwaitStar:\n \"'await*' has been removed from the async functions proposal. Use Promise.all() instead.\",\n OptionalChainingNoNew:\n \"Constructors in/after an Optional Chain are not allowed.\",\n OptionalChainingNoTemplate:\n \"Tagged Template Literals are not allowed in optionalChain.\",\n OverrideOnConstructor:\n \"'override' modifier cannot appear on a constructor declaration.\",\n ParamDupe: \"Argument name clash.\",\n PatternHasAccessor: \"Object pattern can't contain getter or setter.\",\n PatternHasMethod: \"Object pattern can't contain methods.\",\n PrivateInExpectedIn: ({ identifierName }: { identifierName: string }) =>\n `Private names are only allowed in property accesses (\\`obj.#${identifierName}\\`) or in \\`in\\` expressions (\\`#${identifierName} in obj\\`).`,\n PrivateNameRedeclaration: ({ identifierName }: { identifierName: string }) =>\n `Duplicate private name #${identifierName}.`,\n RecordExpressionBarIncorrectEndSyntaxType:\n \"Record expressions ending with '|}' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.\",\n RecordExpressionBarIncorrectStartSyntaxType:\n \"Record expressions starting with '{|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.\",\n RecordExpressionHashIncorrectStartSyntaxType:\n \"Record expressions starting with '#{' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.\",\n RecordNoProto: \"'__proto__' is not allowed in Record expressions.\",\n RestTrailingComma: \"Unexpected trailing comma after rest element.\",\n SloppyFunction:\n \"In non-strict mode code, functions can only be declared at top level or inside a block.\",\n SloppyFunctionAnnexB:\n \"In non-strict mode code, functions can only be declared at top level, inside a block, or as the body of an if statement.\",\n StaticPrototype: \"Classes may not have static property named prototype.\",\n SuperNotAllowed:\n \"`super()` is only valid inside a class constructor of a subclass. Maybe a typo in the method name ('constructor') or not extending another class?\",\n SuperPrivateField: \"Private fields can't be accessed on super.\",\n TrailingDecorator: \"Decorators must be attached to a class element.\",\n TupleExpressionBarIncorrectEndSyntaxType:\n \"Tuple expressions ending with '|]' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.\",\n TupleExpressionBarIncorrectStartSyntaxType:\n \"Tuple expressions starting with '[|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.\",\n TupleExpressionHashIncorrectStartSyntaxType:\n \"Tuple expressions starting with '#[' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.\",\n UnexpectedArgumentPlaceholder: \"Unexpected argument placeholder.\",\n UnexpectedAwaitAfterPipelineBody:\n 'Unexpected \"await\" after pipeline body; await must have parentheses in minimal proposal.',\n UnexpectedDigitAfterHash: \"Unexpected digit after hash token.\",\n UnexpectedImportExport:\n \"'import' and 'export' may only appear at the top level.\",\n UnexpectedKeyword: ({ keyword }: { keyword: string }) =>\n `Unexpected keyword '${keyword}'.`,\n UnexpectedLeadingDecorator:\n \"Leading decorators must be attached to a class declaration.\",\n UnexpectedLexicalDeclaration:\n \"Lexical declaration cannot appear in a single-statement context.\",\n UnexpectedNewTarget:\n \"`new.target` can only be used in functions or class properties.\",\n UnexpectedNumericSeparator:\n \"A numeric separator is only allowed between two digits.\",\n UnexpectedPrivateField: \"Unexpected private name.\",\n UnexpectedReservedWord: ({ reservedWord }: { reservedWord: string }) =>\n `Unexpected reserved word '${reservedWord}'.`,\n UnexpectedSuper: \"'super' is only allowed in object methods and classes.\",\n UnexpectedToken: ({\n expected,\n unexpected,\n }: {\n expected?: string | null;\n unexpected?: string | null;\n }) =>\n `Unexpected token${unexpected ? ` '${unexpected}'.` : \"\"}${\n expected ? `, expected \"${expected}\"` : \"\"\n }`,\n UnexpectedTokenUnaryExponentiation:\n \"Illegal expression. Wrap left hand side or entire exponentiation in parentheses.\",\n UnexpectedUsingDeclaration:\n \"Using declaration cannot appear in the top level when source type is `script`.\",\n UnsupportedBind: \"Binding should be performed on object property.\",\n UnsupportedDecoratorExport:\n \"A decorated export must export a class declaration.\",\n UnsupportedDefaultExport:\n \"Only expressions, functions or classes are allowed as the `default` export.\",\n UnsupportedImport:\n \"`import` can only be used in `import()` or `import.meta`.\",\n UnsupportedMetaProperty: ({\n target,\n onlyValidPropertyName,\n }: {\n target: string;\n onlyValidPropertyName: string;\n }) =>\n `The only valid meta property for ${target} is ${target}.${onlyValidPropertyName}.`,\n UnsupportedParameterDecorator:\n \"Decorators cannot be used to decorate parameters.\",\n UnsupportedPropertyDecorator:\n \"Decorators cannot be used to decorate object literal properties.\",\n UnsupportedSuper:\n \"'super' can only be used with function calls (i.e. super()) or in property accesses (i.e. super.prop or super[prop]).\",\n UnterminatedComment: \"Unterminated comment.\",\n UnterminatedRegExp: \"Unterminated regular expression.\",\n UnterminatedString: \"Unterminated string constant.\",\n UnterminatedTemplate: \"Unterminated template.\",\n UsingDeclarationHasBindingPattern:\n \"Using declaration cannot have destructuring patterns.\",\n VarRedeclaration: ({ identifierName }: { identifierName: string }) =>\n `Identifier '${identifierName}' has already been declared.`,\n YieldBindingIdentifier:\n \"Can not use 'yield' as identifier inside a generator.\",\n YieldInParameter: \"Yield expression is not allowed in formal parameters.\",\n ZeroDigitNumericSeparator:\n \"Numeric separator can not be used after leading 0.\",\n};\n","export default {\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 }: { referenceName: string }) =>\n `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 }: { bindingName: string }) =>\n `Binding '${bindingName}' in strict mode.`,\n\n StrictFunction:\n \"In strict mode code, functions can only be declared at top level or inside a block.\",\n\n StrictNumericEscape: \"The only valid numeric escape in strict mode is '\\\\0'.\",\n\n StrictOctalLiteral: \"Legacy octal literals are not allowed in strict mode.\",\n\n StrictWith: \"'with' in strict mode.\",\n};\n","import toNodeDescription from \"./to-node-description\";\n\nexport const UnparenthesizedPipeBodyDescriptions = new Set([\n \"ArrowFunctionExpression\",\n \"AssignmentExpression\",\n \"ConditionalExpression\",\n \"YieldExpression\",\n] as const);\n\ntype GetSetMemberType<T extends Set<any>> = T extends Set<infer M>\n ? M\n : unknown;\n\ntype UnparenthesizedPipeBodyTypes = GetSetMemberType<\n typeof UnparenthesizedPipeBodyDescriptions\n>;\n\nexport default {\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 PipeTopicRequiresHackPipes:\n 'Topic reference is used, but the pipelineOperator plugin was not passed a \"proposal\": \"hack\" or \"smart\" option.',\n PipeTopicUnbound:\n \"Topic reference is unbound; it must be inside a pipe body.\",\n PipeTopicUnconfiguredToken: ({ token }: { token: string }) =>\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 PipeTopicUnused:\n \"Hack-style pipe body does not contain a topic reference; Hack-style pipes must use topic at least once.\",\n PipeUnparenthesizedBody: ({ type }: { type: UnparenthesizedPipeBodyTypes }) =>\n `Hack-style pipe body cannot be an unparenthesized ${toNodeDescription({\n type,\n })}; please wrap it in parentheses.`,\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 PipelineBodySequenceExpression:\n \"Pipeline body may not be a comma-separated sequence expression.\",\n PipelineHeadSequenceExpression:\n \"Pipeline head should not be a comma-separated sequence expression.\",\n PipelineTopicUnused:\n \"Pipeline is in topic style but does not use topic reference.\",\n PrimaryTopicNotAllowed:\n \"Topic reference was used in a lexical context without topic binding.\",\n PrimaryTopicRequiresSmartPipeline:\n 'Topic reference is used, but the pipelineOperator plugin was not passed a \"proposal\": \"hack\" or \"smart\" option.',\n};\n","import { Position } from \"./util/location\";\nimport {\n instantiate,\n ParseErrorCode,\n type ParseErrorCredentials,\n type ToMessage,\n type SyntaxPlugin,\n} from \"./parse-error/credentials\";\nimport type { Undone } from \"./parser/node\";\nimport type { Node } from \"./types\";\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?: SyntaxPlugin;\n missingPlugin?: string | string[];\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> = (a: {\n loc: Position;\n details: ErrorDetails;\n}) => ParseError<ErrorDetails>;\n\nfunction toParseErrorConstructor<ErrorDetails extends object>({\n toMessage,\n ...properties\n}: ParseErrorCredentials<ErrorDetails>): ParseErrorConstructor<ErrorDetails> {\n type ConstructorArgument = {\n loc: Position;\n details: ErrorDetails;\n };\n\n return function constructor({ loc, details }: ConstructorArgument) {\n return instantiate(\n SyntaxError,\n { ...properties, loc },\n {\n clone(\n overrides: {\n loc?: Position;\n details?: ErrorDetails;\n } = {},\n ) {\n const loc = (overrides.loc || {}) as Partial<Position>;\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(this: ConstructorArgument): string {\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 ) as ParseError<ErrorDetails>;\n };\n}\n\ntype ParseErrorTemplate =\n | string\n | ToMessage<any>\n | { message: string | ToMessage<any> };\n\ntype ParseErrorTemplates = { [reasonCode: string]: ParseErrorTemplate };\n\n// This is the templated form of `ParseErrorEnum`.\n//\n// Note: We could factor out the return type calculation into something like\n// `ParseErrorConstructor<T extends ParseErrorTemplates>`, and then we could\n// reuse it in the non-templated form of `ParseErrorEnum`, but TypeScript\n// doesn't seem to drill down that far when showing you the computed type of\n// an object in an editor, so we'll leave it inlined for now.\nexport function ParseErrorEnum(a: TemplateStringsArray): <\n T extends ParseErrorTemplates,\n>(\n parseErrorTemplates: T,\n) => {\n [K in keyof T]: ParseErrorConstructor<\n T[K] extends { message: string | ToMessage<any> }\n ? T[K][\"message\"] extends ToMessage<any>\n ? Parameters<T[K][\"message\"]>[0]\n : {}\n : T[K] extends ToMessage<any>\n ? Parameters<T[K]>[0]\n : {}\n >;\n};\n\nexport function ParseErrorEnum<T extends ParseErrorTemplates>(\n parseErrorTemplates: T,\n syntaxPlugin?: SyntaxPlugin,\n): {\n [K in keyof T]: ParseErrorConstructor<\n T[K] extends { message: string | ToMessage<any> }\n ? T[K][\"message\"] extends ToMessage<any>\n ? Parameters<T[K][\"message\"]>[0]\n : {}\n : T[K] extends ToMessage<any>\n ? Parameters<T[K]>[0]\n : {}\n >;\n};\n\n// You call `ParseErrorEnum` with a mapping from `ReasonCode`'s to either:\n//\n// 1. a static error message,\n// 2. `toMessage` functions that define additional necessary `details` needed by\n// the `ParseError`, or\n// 3. Objects that contain a `message` of one of the above and overridden `code`\n// and/or `reasonCode`:\n//\n// ParseErrorEnum `optionalSyntaxPlugin` ({\n// ErrorWithStaticMessage: \"message\",\n// ErrorWithDynamicMessage: ({ type } : { type: string }) => `${type}`),\n// ErrorWithOverriddenCodeAndOrReasonCode: {\n// message: ({ type }: { type: string }) => `${type}`),\n// code: ParseErrorCode.SourceTypeModuleError,\n// ...(BABEL_8_BREAKING ? { } : { reasonCode: \"CustomErrorReasonCode\" })\n// }\n// });\n//\nexport function ParseErrorEnum(\n argument: TemplateStringsArray | ParseErrorTemplates,\n syntaxPlugin?: SyntaxPlugin,\n) {\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 (parseErrorTemplates: ParseErrorTemplates) =>\n ParseErrorEnum(parseErrorTemplates, argument[0]);\n }\n\n const ParseErrorConstructors = {} as Record<\n string,\n ParseErrorConstructor<unknown>\n >;\n\n for (const reasonCode of Object.keys(argument)) {\n const template = (argument as ParseErrorTemplates)[reasonCode];\n const { message, ...rest } =\n typeof template === \"string\"\n ? { message: () => template }\n : typeof template === \"function\"\n ? { message: template }\n : template;\n const toMessage = typeof message === \"string\" ? () => message : message;\n\n ParseErrorConstructors[reasonCode] = toParseErrorConstructor({\n code: ParseErrorCode.SyntaxError,\n reasonCode,\n toMessage,\n ...(syntaxPlugin ? { syntaxPlugin } : {}),\n ...rest,\n });\n }\n\n return ParseErrorConstructors;\n}\n\nexport type RaiseProperties<ErrorDetails> = {\n at: Position | Undone<Node>;\n} & ErrorDetails;\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","import type { TokenType } from \"../tokenizer/types\";\nimport type Parser from \"../parser\";\nimport type { ExpressionErrors } from \"../parser/util\";\nimport type * as N from \"../types\";\nimport type { Node as NodeType, NodeBase, File } from \"../types\";\nimport type { Position } from \"../util/location\";\nimport { Errors } from \"../parse-error\";\nimport type { Undone } from \"../parser/node\";\nimport type { BindingTypes } from \"../util/scopeflags\";\n\nconst { defineProperty } = Object;\nconst toUnenumerable = (object: any, key: string) =>\n defineProperty(object, key, { enumerable: false, value: object[key] });\n\nfunction toESTreeLocation(node: any) {\n node.loc.start && toUnenumerable(node.loc.start, \"index\");\n node.loc.end && toUnenumerable(node.loc.end, \"index\");\n\n return node;\n}\n\nexport default (superClass: typeof Parser) =>\n class ESTreeParserMixin extends superClass implements Parser {\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 // @ts-expect-error ESTree plugin changes node types\n parseRegExpLiteral({ pattern, flags }): N.EstreeRegExpLiteral {\n let regex: RegExp | null = 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 // @ts-expect-error ESTree plugin changes node types\n parseBigIntLiteral(value: any): N.Node {\n // https://github.com/estree/estree/blob/master/es2020.md#bigintliteral\n let bigInt: BigInt | null;\n try {\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 // @ts-expect-error ESTree plugin changes node types\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 = null;\n const node = this.estreeParseLiteral(decimal);\n node.decimal = String(node.value || value);\n\n return node;\n }\n\n estreeParseLiteral<T extends N.Node>(value: any) {\n // @ts-expect-error ESTree plugin changes node types\n return this.parseLiteral<T>(value, \"Literal\");\n }\n\n // @ts-expect-error ESTree plugin changes node types\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 // @ts-expect-error ESTree plugin changes node types\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 // Cast a Directive to an ExpressionStatement. Mutates the input Directive.\n directiveToStmt(directive: N.Directive): N.ExpressionStatement {\n const expression = directive.value as any as N.EstreeLiteral;\n delete directive.value;\n\n expression.type = \"Literal\";\n // @ts-expect-error N.EstreeLiteral.raw is not defined.\n expression.raw = expression.extra.raw;\n expression.value = expression.extra.expressionValue;\n\n const stmt = directive as any as N.ExpressionStatement;\n stmt.type = \"ExpressionStatement\";\n stmt.expression = expression;\n // @ts-expect-error N.ExpressionStatement.directive is not defined\n stmt.directive = expression.extra.rawValue;\n\n delete expression.extra;\n\n return stmt;\n }\n\n // ==================================\n // Overrides\n // ==================================\n\n initFunction(node: N.BodilessFunctionOrMethodBase, isAsync: boolean): 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 // @ts-expect-error plugin typings\n this.checkDeclaration((node as unknown as N.EstreeProperty).value);\n } else {\n super.checkDeclaration(node);\n }\n }\n\n getObjectOrClassMethodParams(method: N.ObjectMethod | N.ClassMethod) {\n return (method as any as N.EstreeProperty | N.EstreeMethodDefinition)\n .value.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 allowDirectives: boolean | undefined | null,\n topLevel: boolean,\n end: TokenType,\n afterBlockParse?: (hasStrictModeDirective: boolean) => void,\n ): void {\n super.parseBlockBody(\n node,\n allowDirectives,\n topLevel,\n end,\n afterBlockParse,\n );\n\n const directiveStatements = node.directives.map(d =>\n this.directiveToStmt(d),\n );\n // @ts-expect-error estree plugin typings\n node.body = directiveStatements.concat(node.body);\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 // @ts-expect-error mutate AST types\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 as any;\n delete node.id;\n // @ts-expect-error mutate AST types\n node.name = name;\n // @ts-expect-error mutate AST types\n node.type = \"PrivateIdentifier\";\n return node as unknown as N.EstreePrivateIdentifier;\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 // @ts-expect-error plugin may override interfaces\n parseLiteral<T extends N.Literal>(value: any, type: T[\"type\"]): T {\n const node = super.parseLiteral<T>(value, type);\n // @ts-expect-error mutating AST types\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 | null,\n isMethod: boolean = false,\n ): void {\n super.parseFunctionBody(node, allowExpression, isMethod);\n node.expression = node.body.type !== \"BlockStatement\";\n }\n\n // @ts-expect-error plugin may override interfaces\n parseMethod<\n T extends N.ClassPrivateMethod | N.ObjectMethod | N.ClassMethod,\n >(\n node: Undone<T>,\n isGenerator: boolean,\n isAsync: boolean,\n isConstructor: boolean,\n allowDirectSuper: boolean,\n type: T[\"type\"],\n inClassScope: boolean = false,\n ): N.EstreeMethodDefinition {\n let funcNode = this.startNode<N.MethodLike>();\n funcNode.kind = node.kind; // provide kind, so super method correctly sets state\n funcNode = super.parseMethod(\n // @ts-expect-error todo(flow->ts)\n funcNode,\n isGenerator,\n isAsync,\n isConstructor,\n allowDirectSuper,\n type,\n inClassScope,\n );\n // @ts-expect-error mutate AST types\n funcNode.type = \"FunctionExpression\";\n delete funcNode.kind;\n // @ts-expect-error mutate AST types\n node.value = funcNode;\n if (type === \"ClassPrivateMethod\") {\n node.computed = false;\n }\n return this.finishNode(\n // @ts-expect-error cast methods to estree types\n node as Undone<N.EstreeMethodDefinition>,\n \"MethodDefinition\",\n );\n }\n\n parseClassProperty(...args: [N.ClassProperty]): any {\n const propertyNode = super.parseClassProperty(...args) as any;\n if (!process.env.BABEL_8_BREAKING) {\n if (!this.getPluginOption(\"estree\", \"classFeatures\")) {\n return propertyNode as N.EstreePropertyDefinition;\n }\n }\n propertyNode.type = \"PropertyDefinition\";\n return propertyNode as N.EstreePropertyDefinition;\n }\n\n parseClassPrivateProperty(...args: [N.ClassPrivateProperty]): any {\n const propertyNode = super.parseClassPrivateProperty(...args) as any;\n if (!process.env.BABEL_8_BREAKING) {\n if (!this.getPluginOption(\"estree\", \"classFeatures\")) {\n return propertyNode as N.EstreePropertyDefinition;\n }\n }\n propertyNode.type = \"PropertyDefinition\";\n propertyNode.computed = false;\n return propertyNode as 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 | undefined | null {\n const node: N.EstreeProperty = super.parseObjectMethod(\n prop,\n isGenerator,\n isAsync,\n isPattern,\n isAccessor,\n ) as any;\n\n if (node) {\n node.type = \"Property\";\n if ((node as any as N.ClassMethod).kind === \"method\") {\n node.kind = \"init\";\n }\n node.shorthand = false;\n }\n\n return node as any;\n }\n\n parseObjectProperty(\n prop: N.ObjectProperty,\n startLoc: Position | undefined | null,\n isPattern: boolean,\n refExpressionErrors?: ExpressionErrors | null,\n ): N.ObjectProperty | undefined | null {\n const node: N.EstreeProperty = super.parseObjectProperty(\n prop,\n startLoc,\n isPattern,\n refExpressionErrors,\n ) as any;\n\n if (node) {\n node.kind = \"init\";\n node.type = \"Property\";\n }\n\n return node as any;\n }\n\n isValidLVal(\n type: string,\n isUnparenthesizedInAssign: boolean,\n binding: BindingTypes,\n ) {\n return type === \"Property\"\n ? \"value\"\n : super.isValidLVal(type, isUnparenthesizedInAssign, binding);\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): void {\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 } else {\n super.toAssignable(node, isLHS);\n }\n }\n\n toAssignableObjectExpressionProp(\n prop: N.Node,\n isLast: boolean,\n isLHS: boolean,\n ) {\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, isLast, isLHS);\n }\n }\n\n finishCallExpression<T extends N.CallExpression | N.OptionalCallExpression>(\n unfinished: Undone<T>,\n optional: boolean,\n ): T {\n const node = super.finishCallExpression(unfinished, optional);\n\n if (node.callee.type === \"Import\") {\n (node as N.Node as N.EstreeImportExpression).type = \"ImportExpression\";\n (node as N.Node as N.EstreeImportExpression).source = node.arguments[0];\n if (\n this.hasPlugin(\"importAttributes\") ||\n this.hasPlugin(\"importAssertions\")\n ) {\n (node as N.Node as N.EstreeImportExpression).attributes =\n node.arguments[1] ?? null;\n }\n // arguments isn't optional in the type definition\n delete node.arguments;\n // 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(\n unfinished: Undone<N.AnyExport>,\n decorators: N.Decorator[] | null,\n ) {\n const exportStartLoc = this.state.lastTokStartLoc;\n const node = super.parseExport(unfinished, decorators);\n\n switch (node.type) {\n case \"ExportAllDeclaration\":\n // @ts-expect-error mutating AST types\n node.exported = null;\n break;\n\n case \"ExportNamedDeclaration\":\n if (\n node.specifiers.length === 1 &&\n // @ts-expect-error mutating AST types\n node.specifiers[0].type === \"ExportNamespaceSpecifier\"\n ) {\n // @ts-expect-error mutating AST types\n node.type = \"ExportAllDeclaration\";\n // @ts-expect-error mutating AST types\n node.exported = node.specifiers[0].exported;\n delete node.specifiers;\n }\n\n // fallthrough\n case \"ExportDefaultDeclaration\":\n {\n const { declaration } = node;\n if (\n declaration?.type === \"ClassDeclaration\" &&\n declaration.decorators?.length > 0 &&\n // decorator comes before export\n declaration.start === node.start\n ) {\n this.resetStartLocation(\n node,\n // For compatibility with ESLint's keyword-spacing rule, which assumes that an\n // export declaration must start with export.\n // https://github.com/babel/babel/issues/15085\n // Here we reset export declaration's start to be the start of the export token\n exportStartLoc,\n );\n }\n }\n\n break;\n }\n\n return node;\n }\n\n parseSubscript(\n base: N.Expression,\n startLoc: Position,\n noCalls: boolean | undefined | null,\n state: N.ParseSubscriptState,\n ) {\n const node = super.parseSubscript(base, startLoc, noCalls, state);\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 // @ts-expect-error override interfaces\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 extends NodeType>(\n node: Undone<T>,\n type: T[\"type\"],\n endLoc: Position,\n ): T {\n return toESTreeLocation(super.finishNodeAt(node, type, endLoc));\n }\n\n resetStartLocation(node: N.Node, startLoc: Position) {\n super.resetStartLocation(node, startLoc);\n toESTreeLocation(node);\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","// 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 opening 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","import { 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 | null;\n};\n\n// Internally the tokenizer stores token as a number\nexport 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 | undefined | null;\n beforeExpr: boolean;\n startsExpr: boolean;\n rightAssociative: boolean;\n isLoop: boolean;\n isAssign: boolean;\n prefix: boolean;\n postfix: boolean;\n binop: number | undefined | null;\n // todo(Babel 8): remove updateContext from exposed token layout\n declare updateContext:\n | ((context: Array<TokContext>) => void)\n | undefined\n | null;\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 type InternalTokenTypes = typeof tt;\n\nexport const tt = {\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(\"}\"),\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 _using: createKeywordLike(\"using\", { 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 _satisfies: createKeywordLike(\"satisfies\", { 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} as const;\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 tokenIsBinaryOperator(token: TokenType): boolean {\n return tokenBinops[token] !== -1;\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\\u0cf3\\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-\\u0ece\\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,20,1,64,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,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,4026,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,16,0,30,2,3,0,15,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,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,757,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,4153,7,221,3,5761,15,7472,3104,541,1507,4938,6,4191];\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,81,2,71,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,3,0,158,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,10,1,2,0,49,6,4,4,14,9,5351,0,7,14,13835,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,101,0,161,6,10,9,357,0,62,13,499,13,983,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\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","import { ScopeFlag, BindingFlag, type BindingTypes } from \"./scopeflags\";\nimport type { Position } from \"./location\";\nimport type * as N from \"../types\";\nimport { Errors } from \"../parse-error\";\nimport type Tokenizer from \"../tokenizer\";\n\n// Start an AST node, attaching a start offset.\nexport class Scope {\n declare flags: ScopeFlag;\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: ScopeFlag) {\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 extends 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 inTopLevel() {\n return (this.currentScope().flags & ScopeFlag.PROGRAM) > 0;\n }\n get inFunction() {\n return (this.currentVarScopeFlags() & ScopeFlag.FUNCTION) > 0;\n }\n get allowSuper() {\n return (this.currentThisScopeFlags() & ScopeFlag.SUPER) > 0;\n }\n get allowDirectSuper() {\n return (this.currentThisScopeFlags() & ScopeFlag.DIRECT_SUPER) > 0;\n }\n get inClass() {\n return (this.currentThisScopeFlags() & ScopeFlag.CLASS) > 0;\n }\n get inClassAndNotInNonArrowFunction() {\n const flags = this.currentThisScopeFlags();\n return (flags & ScopeFlag.CLASS) > 0 && (flags & ScopeFlag.FUNCTION) === 0;\n }\n get inStaticBlock() {\n for (let i = this.scopeStack.length - 1; ; i--) {\n const { flags } = this.scopeStack[i];\n if (flags & ScopeFlag.STATIC_BLOCK) {\n return true;\n }\n if (flags & (ScopeFlag.VAR | ScopeFlag.CLASS)) {\n // function body, module body, class property initializers\n return false;\n }\n }\n }\n get inNonArrowFunction() {\n return (this.currentThisScopeFlags() & ScopeFlag.FUNCTION) > 0;\n }\n get treatFunctionsAsVar() {\n return this.treatFunctionsAsVarInScope(this.currentScope());\n }\n\n createScope(flags: ScopeFlag): Scope {\n return new Scope(flags);\n }\n\n enter(flags: ScopeFlag) {\n /*:: +createScope: (flags:ScopeFlag) => IScope; */\n // @ts-expect-error This method will be overwritten by subclasses\n this.scopeStack.push(this.createScope(flags));\n }\n\n exit(): ScopeFlag {\n const scope = this.scopeStack.pop();\n return scope.flags;\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 & (ScopeFlag.FUNCTION | ScopeFlag.STATIC_BLOCK) ||\n (!this.parser.inModule && scope.flags & ScopeFlag.PROGRAM)\n );\n }\n\n declareName(name: string, bindingType: BindingTypes, loc: Position) {\n let scope = this.currentScope();\n if (\n bindingType & BindingFlag.SCOPE_LEXICAL ||\n bindingType & BindingFlag.SCOPE_FUNCTION\n ) {\n this.checkRedeclarationInScope(scope, name, bindingType, loc);\n\n if (bindingType & BindingFlag.SCOPE_FUNCTION) {\n scope.functions.add(name);\n } else {\n scope.lexical.add(name);\n }\n\n if (bindingType & BindingFlag.SCOPE_LEXICAL) {\n this.maybeExportDefined(scope, name);\n }\n } else if (bindingType & BindingFlag.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 & ScopeFlag.VAR) break;\n }\n }\n if (this.parser.inModule && scope.flags & ScopeFlag.PROGRAM) {\n this.undefinedExports.delete(name);\n }\n }\n\n maybeExportDefined(scope: IScope, name: string) {\n if (this.parser.inModule && scope.flags & ScopeFlag.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 & BindingFlag.KIND_VALUE)) return false;\n\n if (bindingType & BindingFlag.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 & BindingFlag.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 // Annex B.3.4\n // https://tc39.es/ecma262/#sec-variablestatements-in-catch-blocks\n !(\n scope.flags & ScopeFlag.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 currentVarScopeFlags(): ScopeFlag {\n for (let i = this.scopeStack.length - 1; ; i--) {\n const { flags } = this.scopeStack[i];\n if (flags & ScopeFlag.VAR) {\n return flags;\n }\n }\n }\n\n // Could be useful for `arguments`, `this`, `new.target`, `super()`, `super.property`, and `super[property]`.\n currentThisScopeFlags(): ScopeFlag {\n for (let i = this.scopeStack.length - 1; ; i--) {\n const { flags } = this.scopeStack[i];\n if (\n flags & (ScopeFlag.VAR | ScopeFlag.CLASS) &&\n !(flags & ScopeFlag.ARROW)\n ) {\n return flags;\n }\n }\n }\n}\n","import type { Position } from \"../../util/location\";\nimport ScopeHandler, { Scope } from \"../../util/scope\";\nimport {\n BindingFlag,\n type ScopeFlag,\n type BindingTypes,\n} from \"../../util/scopeflags\";\nimport type * 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: ScopeFlag): FlowScope {\n return new FlowScope(flags);\n }\n\n declareName(name: string, bindingType: BindingTypes, loc: Position) {\n const scope = this.currentScope();\n if (bindingType & BindingFlag.FLAG_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(name, bindingType, loc);\n }\n\n isRedeclaredInScope(\n scope: FlowScope,\n name: string,\n bindingType: BindingTypes,\n ): boolean {\n if (super.isRedeclaredInScope(scope, name, bindingType)) return true;\n\n if (bindingType & BindingFlag.FLAG_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","import 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\";\nimport type {\n ParserPluginWithOptions,\n PluginConfig,\n PluginOptions,\n} from \"../typings\";\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<any>;\n declare classScope: ClassScopeHandler;\n declare prodParam: ProductionParameterHandler;\n declare expressionScope: ExpressionScopeHandler;\n declare plugins: PluginsMap;\n declare filename: string | undefined | null;\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 // plugins 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(\n pluginOptions,\n ) as (keyof typeof pluginOptions)[]) {\n if (actualOptions?.[key] !== pluginOptions[key]) {\n return false;\n }\n }\n return true;\n }\n }\n\n getPluginOption<\n PluginName extends ParserPluginWithOptions[0],\n OptionName extends keyof PluginOptions<PluginName>,\n >(plugin: PluginName, name: OptionName) {\n return (this.plugins.get(plugin) as null | PluginOptions<PluginName>)?.[\n name\n ];\n }\n}\n","/*:: declare var invariant; */\n\nimport BaseParser from \"./base\";\nimport type { Comment, Node, Identifier } from \"../types\";\nimport * as charCodes from \"charcodes\";\nimport type { Undone } from \"./node\";\n\n/**\n * A whitespace token containing comments\n */\nexport type CommentWhitespace = {\n /**\n * the start of the whitespace token.\n */\n start: number;\n /**\n * the end of the whitespace token.\n */\n end: number;\n /**\n * the containing comments\n */\n comments: Array<Comment>;\n /**\n * the immediately preceding AST node of the whitespace token\n */\n leadingNode: Node | null;\n /**\n * the immediately following AST node of the whitespace token\n */\n trailingNode: Node | null;\n /**\n * the innermost AST node containing the whitespace with minimal size (|end - start|)\n */\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 */\nfunction setTrailingComments(node: Undone<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 */\nfunction setLeadingComments(node: Undone<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 */\nexport function setInnerComments(\n node: Undone<Node>,\n comments?: Array<Comment>,\n) {\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 */\nfunction adjustInnerComments(\n node: Undone<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\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 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 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 remaining 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 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 /* eslint-disable no-irregular-whitespace */\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 reinterpret 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 * ```\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 node the last finished AST node _before_ current token\n */\n /* eslint-enable no-irregular-whitespace */\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 /* eslint-disable no-irregular-whitespace */\n /**\n * Reset previous node leading comments, assuming that `node` is a\n * single-token node. Used in import phase modifiers parsing. We parse\n * `module` in `import module foo from ...` as an identifier but may\n * reinterpret it into a phase modifier later. In this case the identifier is\n * not part of the AST and we should sync the knowledge to commentStacks\n *\n * For example, when parsing\n * ```\n * import /* 1 */ module a from \"a\";\n * ```\n * the comment whitespace `/* 1 */` has trailing node Identifier(module). When\n * we see that `module` is not a default import binding, we mark `/* 1 */` as\n * inner comments of the ImportDeclaration. So `/* 1 */` should be detached from\n * the Identifier node.\n *\n * @param node the last finished AST node _before_ current token\n */\n /* eslint-enable no-irregular-whitespace */\n resetPreviousIdentifierLeadingComments(node: Identifier) {\n const { commentStack } = this.state;\n const { length } = commentStack;\n if (length === 0) return;\n\n if (commentStack[length - 1].trailingNode === node) {\n commentStack[length - 1].trailingNode = null;\n } else if (length >= 2 && commentStack[length - 2].trailingNode === node) {\n commentStack[length - 2].trailingNode = 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 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","import * 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]|\\/\\/.*|\\/\\*.*?\\*\\/)*/g;\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","import type { Options } from \"../options\";\nimport type * 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 type { Errors } from \"../parse-error\";\nimport 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 // 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 inDisallowConditionalTypesContext: 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\" | undefined | null;\n name?: string | null;\n statementStart?: number;\n }> = [];\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 // this is initialized when generating the second token.\n lastTokEndLoc: Position = null;\n // 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 // Used to track invalid escape sequences in template literals,\n // that must be reported if the template is not tagged.\n firstInvalidTemplateEscapePos: null | Position = null;\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) as (keyof State)[];\n for (let i = 0, length = keys.length; i < length; i++) {\n const key = keys[i];\n let val = this[key];\n\n if (!skipArrays && Array.isArray(val)) {\n val = val.slice();\n }\n\n // @ts-expect-error val must conform to S[key]\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 context: TokContext[];\n startLoc: Position;\n lastTokEndLoc: Position;\n curLine: number;\n lineStart: number;\n curPosition: () => Position;\n /* Used only in readToken_mult_modulo */\n inType: boolean;\n // These boolean properties are not initialized in createLookaheadState()\n // instead they will only be set by the tokenizer\n containsEsc?: boolean;\n};\n","import * as charCodes from \"charcodes\";\n\n// The following character codes are forbidden from being\n// an immediate sibling of NumericLiteralSeparator _\nconst forbiddenNumericSeparatorSiblings = {\n decBinOct: new Set<number>([\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<number>([\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: number) => ch === charCodes.digit0 || ch === charCodes.digit1,\n\n // 0 - 7\n oct: (ch: number) => ch >= charCodes.digit0 && ch <= charCodes.digit7,\n\n // 0 - 9\n dec: (ch: number) => ch >= charCodes.digit0 && ch <= charCodes.digit9,\n\n // 0 - 9, A - F, a - f,\n hex: (ch: number) =>\n (ch >= charCodes.digit0 && ch <= charCodes.digit9) ||\n (ch >= charCodes.uppercaseA && ch <= charCodes.uppercaseF) ||\n (ch >= charCodes.lowercaseA && ch <= charCodes.lowercaseF),\n};\n\nexport type StringContentsErrorHandlers = EscapedCharErrorHandlers & {\n unterminated(\n initialPos: number,\n initialLineStart: number,\n initialCurLine: number,\n ): void;\n};\n\nexport function readStringContents(\n type: \"single\" | \"double\" | \"template\",\n input: string,\n pos: number,\n lineStart: number,\n curLine: number,\n errors: StringContentsErrorHandlers,\n) {\n const initialPos = pos;\n const initialLineStart = lineStart;\n const initialCurLine = curLine;\n\n let out = \"\";\n let firstInvalidLoc = null;\n let chunkStart = pos;\n const { length } = input;\n for (;;) {\n if (pos >= length) {\n errors.unterminated(initialPos, initialLineStart, initialCurLine);\n out += input.slice(chunkStart, pos);\n break;\n }\n const ch = input.charCodeAt(pos);\n if (isStringEnd(type, ch, input, pos)) {\n out += input.slice(chunkStart, pos);\n break;\n }\n if (ch === charCodes.backslash) {\n out += input.slice(chunkStart, pos);\n const res = readEscapedChar(\n input,\n pos,\n lineStart,\n curLine,\n type === \"template\",\n errors,\n );\n if (res.ch === null && !firstInvalidLoc) {\n firstInvalidLoc = { pos, lineStart, curLine };\n } else {\n out += res.ch;\n }\n ({ pos, lineStart, curLine } = res);\n chunkStart = pos;\n } else if (\n ch === charCodes.lineSeparator ||\n ch === charCodes.paragraphSeparator\n ) {\n ++pos;\n ++curLine;\n lineStart = pos;\n } else if (ch === charCodes.lineFeed || ch === charCodes.carriageReturn) {\n if (type === \"template\") {\n out += input.slice(chunkStart, pos) + \"\\n\";\n ++pos;\n if (\n ch === charCodes.carriageReturn &&\n input.charCodeAt(pos) === charCodes.lineFeed\n ) {\n ++pos;\n }\n ++curLine;\n chunkStart = lineStart = pos;\n } else {\n errors.unterminated(initialPos, initialLineStart, initialCurLine);\n }\n } else {\n ++pos;\n }\n }\n return process.env.BABEL_8_BREAKING\n ? { pos, str: out, firstInvalidLoc, lineStart, curLine }\n : {\n pos,\n str: out,\n firstInvalidLoc,\n lineStart,\n curLine,\n containsInvalid: !!firstInvalidLoc,\n };\n}\n\nfunction isStringEnd(\n type: \"single\" | \"double\" | \"template\",\n ch: number,\n input: string,\n pos: number,\n) {\n if (type === \"template\") {\n return (\n ch === charCodes.graveAccent ||\n (ch === charCodes.dollarSign &&\n input.charCodeAt(pos + 1) === charCodes.leftCurlyBrace)\n );\n }\n return (\n ch === (type === \"double\" ? charCodes.quotationMark : charCodes.apostrophe)\n );\n}\n\ntype EscapedCharErrorHandlers = HexCharErrorHandlers &\n CodePointErrorHandlers & {\n strictNumericEscape(pos: number, lineStart: number, curLine: number): void;\n };\n\nfunction readEscapedChar(\n input: string,\n pos: number,\n lineStart: number,\n curLine: number,\n inTemplate: boolean,\n errors: EscapedCharErrorHandlers,\n) {\n const throwOnInvalid = !inTemplate;\n pos++; // skip '\\'\n\n const res = (ch: string | null) => ({ pos, ch, lineStart, curLine });\n\n const ch = input.charCodeAt(pos++);\n switch (ch) {\n case charCodes.lowercaseN:\n return res(\"\\n\");\n case charCodes.lowercaseR:\n return res(\"\\r\");\n case charCodes.lowercaseX: {\n let code;\n ({ code, pos } = readHexChar(\n input,\n pos,\n lineStart,\n curLine,\n 2,\n false,\n throwOnInvalid,\n errors,\n ));\n return res(code === null ? null : String.fromCharCode(code));\n }\n case charCodes.lowercaseU: {\n let code;\n ({ code, pos } = readCodePoint(\n input,\n pos,\n lineStart,\n curLine,\n throwOnInvalid,\n errors,\n ));\n return res(code === null ? null : String.fromCodePoint(code));\n }\n case charCodes.lowercaseT:\n return res(\"\\t\");\n case charCodes.lowercaseB:\n return res(\"\\b\");\n case charCodes.lowercaseV:\n return res(\"\\u000b\");\n case charCodes.lowercaseF:\n return res(\"\\f\");\n case charCodes.carriageReturn:\n if (input.charCodeAt(pos) === charCodes.lineFeed) {\n ++pos;\n }\n // fall through\n case charCodes.lineFeed:\n lineStart = pos;\n ++curLine;\n // fall through\n case charCodes.lineSeparator:\n case charCodes.paragraphSeparator:\n return res(\"\");\n case charCodes.digit8:\n case charCodes.digit9:\n if (inTemplate) {\n return res(null);\n } else {\n errors.strictNumericEscape(pos - 1, lineStart, curLine);\n }\n // fall through\n default:\n if (ch >= charCodes.digit0 && ch <= charCodes.digit7) {\n const startPos = pos - 1;\n const match = input.slice(startPos, pos + 2).match(/^[0-7]+/)!;\n\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 pos += octalStr.length - 1;\n const next = input.charCodeAt(pos);\n if (\n octalStr !== \"0\" ||\n next === charCodes.digit8 ||\n next === charCodes.digit9\n ) {\n if (inTemplate) {\n return res(null);\n } else {\n errors.strictNumericEscape(startPos, lineStart, curLine);\n }\n }\n\n return res(String.fromCharCode(octal));\n }\n\n return res(String.fromCharCode(ch));\n }\n}\n\ntype HexCharErrorHandlers = IntErrorHandlers & {\n invalidEscapeSequence(pos: number, lineStart: number, curLine: number): void;\n};\n\n// Used to read character escape sequences ('\\x', '\\u').\nfunction readHexChar(\n input: string,\n pos: number,\n lineStart: number,\n curLine: number,\n len: number,\n forceLen: boolean,\n throwOnInvalid: boolean,\n errors: HexCharErrorHandlers,\n) {\n const initialPos = pos;\n let n;\n ({ n, pos } = readInt(\n input,\n pos,\n lineStart,\n curLine,\n 16,\n len,\n forceLen,\n false,\n errors,\n /* bailOnError */ !throwOnInvalid,\n ));\n if (n === null) {\n if (throwOnInvalid) {\n errors.invalidEscapeSequence(initialPos, lineStart, curLine);\n } else {\n pos = initialPos - 1;\n }\n }\n return { code: n, pos };\n}\n\nexport type IntErrorHandlers = {\n numericSeparatorInEscapeSequence(\n pos: number,\n lineStart: number,\n curLine: number,\n ): void;\n unexpectedNumericSeparator(\n pos: number,\n lineStart: number,\n curLine: number,\n ): void;\n // It can return \"true\" to indicate that the error was handled\n // and the int parsing should continue.\n invalidDigit(\n pos: number,\n lineStart: number,\n curLine: number,\n radix: number,\n ): boolean;\n};\n\nexport function readInt(\n input: string,\n pos: number,\n lineStart: number,\n curLine: number,\n radix: number,\n len: number | undefined,\n forceLen: boolean,\n allowNumSeparator: boolean | \"bail\",\n errors: IntErrorHandlers,\n bailOnError: boolean,\n) {\n const start = 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 = input.charCodeAt(pos);\n let val;\n\n if (code === charCodes.underscore && allowNumSeparator !== \"bail\") {\n const prev = input.charCodeAt(pos - 1);\n const next = input.charCodeAt(pos + 1);\n\n if (!allowNumSeparator) {\n if (bailOnError) return { n: null, pos };\n errors.numericSeparatorInEscapeSequence(pos, lineStart, curLine);\n } else if (\n Number.isNaN(next) ||\n !isAllowedSibling(next) ||\n forbiddenSiblings.has(prev) ||\n forbiddenSiblings.has(next)\n ) {\n if (bailOnError) return { n: null, pos };\n errors.unexpectedNumericSeparator(pos, lineStart, curLine);\n }\n\n // Ignore this _ character\n ++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 found a digit which is too big, errors.invalidDigit can return true to avoid\n // breaking the loop (this is used for error recovery).\n if (val <= 9 && bailOnError) {\n return { n: null, pos };\n } else if (\n val <= 9 &&\n errors.invalidDigit(pos, lineStart, curLine, radix)\n ) {\n val = 0;\n } else if (forceLen) {\n val = 0;\n invalid = true;\n } else {\n break;\n }\n }\n ++pos;\n total = total * radix + val;\n }\n if (pos === start || (len != null && pos - start !== len) || invalid) {\n return { n: null, pos };\n }\n\n return { n: total, pos };\n}\n\nexport type CodePointErrorHandlers = HexCharErrorHandlers & {\n invalidCodePoint(pos: number, lineStart: number, curLine: number): void;\n};\n\nexport function readCodePoint(\n input: string,\n pos: number,\n lineStart: number,\n curLine: number,\n throwOnInvalid: boolean,\n errors: CodePointErrorHandlers,\n) {\n const ch = input.charCodeAt(pos);\n let code;\n\n if (ch === charCodes.leftCurlyBrace) {\n ++pos;\n ({ code, pos } = readHexChar(\n input,\n pos,\n lineStart,\n curLine,\n input.indexOf(\"}\", pos) - pos,\n true,\n throwOnInvalid,\n errors,\n ));\n ++pos;\n if (code !== null && code > 0x10ffff) {\n if (throwOnInvalid) {\n errors.invalidCodePoint(pos, lineStart, curLine);\n } else {\n return { code: null, pos };\n }\n }\n } else {\n ({ code, pos } = readHexChar(\n input,\n pos,\n lineStart,\n curLine,\n 4,\n false,\n throwOnInvalid,\n errors,\n ));\n }\n return { code, pos };\n}\n","/*:: declare var invariant; */\n\nimport type { Options } from \"../options\";\nimport {\n Position,\n SourceLocation,\n createPositionWithColumnOffset,\n} from \"../util/location\";\nimport CommentsParser, { type CommentWhitespace } from \"../parser/comments\";\nimport type * 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 skipWhiteSpaceInLine,\n} from \"../util/whitespace\";\nimport State from \"./state\";\nimport type { LookaheadState, DeferredStrictError } from \"./state\";\n\nimport {\n readInt,\n readCodePoint,\n readStringContents,\n type IntErrorHandlers,\n type CodePointErrorHandlers,\n type StringContentsErrorHandlers,\n} from \"@babel/helper-string-parser\";\n\nimport type { Plugin } from \"../typings\";\n\nfunction buildPosition(pos: number, lineStart: number, curLine: number) {\n return new Position(curLine, pos - lineStart, pos);\n}\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 charCodes.lowercaseV,\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 abstract 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 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 match(type: TokenType): boolean {\n return this.state.type === type;\n }\n\n /**\n * Create a LookaheadState from current parser state\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 lookahead(): LookaheadState {\n const old = this.state;\n // @ts-expect-error For performance we use a simplified tokenizer state structure\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 /**\n * Similar to nextToken, but it will stop at line break when it is seen before the next token\n *\n * @returns {number} position of the next token start or line break, whichever is seen first.\n * @memberof Tokenizer\n */\n nextTokenInLineStart(): number {\n return this.nextTokenInLineStartSince(this.state.pos);\n }\n\n nextTokenInLineStartSince(pos: number): number {\n skipWhiteSpaceInLine.lastIndex = pos;\n return skipWhiteSpaceInLine.test(this.input)\n ? skipWhiteSpaceInLine.lastIndex\n : pos;\n }\n\n /**\n * Similar to lookaheadCharCode, but it will return the char code of line break if it is\n * seen before the next token\n *\n * @returns {number} char code of the next token start or line break, whichever is seen first.\n * @memberof Tokenizer\n */\n lookaheadInLineCharCode(): number {\n return this.input.charCodeAt(this.nextTokenInLineStart());\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 properties.\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 // Skips a block comment, whose end is marked by commentEnd.\n // *-/ is used by the Flow plugin, when parsing block comments nested\n // inside Flow comments.\n skipBlockComment(commentEnd: \"*/\" | \"*-/\"): N.CommentBlock | undefined {\n let startLoc;\n if (!this.isLookahead) startLoc = this.state.curPosition();\n const start = this.state.pos;\n const end = this.input.indexOf(commentEnd, 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 + commentEnd.length;\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.CommentBlock = {\n type: \"CommentBlock\",\n value: this.input.slice(start + 2, end),\n start,\n end: end + commentEnd.length,\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 | undefined {\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.CommentLine = {\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 (\n ch === charCodes.dash &&\n !this.inModule &&\n this.options.annexB\n ) {\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 (\n ch === charCodes.lessThan &&\n !this.inModule &&\n this.options.annexB\n ) {\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: 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 // @ts-expect-error the prevType of updateContext is required\n // only when the new type is tt.slash/tt.jsxTagEnd\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\") === \"bar\") {\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 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 // 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 // @ts-expect-error VALID_REGEX_FLAGS.has should accept expanded type: number\n if (VALID_REGEX_FLAGS.has(cp)) {\n if (cp === charCodes.lowercaseV) {\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 = false,\n allowNumSeparator: boolean | \"bail\" = true,\n ): number | null {\n const { n, pos } = readInt(\n this.input,\n this.state.pos,\n this.state.lineStart,\n this.state.curLine,\n radix,\n len,\n forceLen,\n allowNumSeparator,\n this.errorHandlers_readInt,\n /* bailOnError */ false,\n );\n this.state.pos = pos;\n return n;\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 { code, pos } = readCodePoint(\n this.input,\n this.state.pos,\n this.state.lineStart,\n this.state.curLine,\n throwOnInvalid,\n this.errorHandlers_readCodePoint,\n );\n this.state.pos = pos;\n return code;\n }\n\n readString(quote: number): void {\n const { str, pos, curLine, lineStart } = readStringContents(\n quote === charCodes.quotationMark ? \"double\" : \"single\",\n this.input,\n this.state.pos + 1, // skip the quote\n this.state.lineStart,\n this.state.curLine,\n this.errorHandlers_readStringContents_string,\n );\n this.state.pos = pos + 1; // skip the quote\n this.state.lineStart = lineStart;\n this.state.curLine = curLine;\n this.finishToken(tt.string, str);\n }\n\n // Reads template 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 const opening = this.input[this.state.pos];\n const { str, firstInvalidLoc, pos, curLine, lineStart } =\n readStringContents(\n \"template\",\n this.input,\n this.state.pos + 1, // skip '`' or `}`\n this.state.lineStart,\n this.state.curLine,\n this.errorHandlers_readStringContents_template,\n );\n this.state.pos = pos + 1; // skip '`' or `$`\n this.state.lineStart = lineStart;\n this.state.curLine = curLine;\n\n if (firstInvalidLoc) {\n this.state.firstInvalidTemplateEscapePos = new Position(\n firstInvalidLoc.curLine,\n firstInvalidLoc.pos - firstInvalidLoc.lineStart,\n firstInvalidLoc.pos,\n );\n }\n\n if (this.input.codePointAt(pos) === charCodes.graveAccent) {\n this.finishToken(\n tt.templateTail,\n firstInvalidLoc ? null : opening + str + \"`\",\n );\n } else {\n this.state.pos++; // skip '{'\n this.finishToken(\n tt.templateNonTail,\n firstInvalidLoc ? null : opening + str + \"${\",\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 // 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): 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 {\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 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 // @ts-expect-error: refine details typing\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 raiseOverwrite<ErrorDetails>(\n toParseError: ParseErrorConstructor<ErrorDetails>,\n raiseProperties: RaiseProperties<ErrorDetails>,\n ): ParseError<ErrorDetails> | never {\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 // @ts-expect-error: refine details typing\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 @typescript-eslint/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: Plugin, 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: Plugin[]): 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 errorBuilder(error: ParseErrorConstructor<{}>) {\n return (pos: number, lineStart: number, curLine: number) => {\n this.raise(error, {\n at: buildPosition(pos, lineStart, curLine),\n });\n };\n }\n\n errorHandlers_readInt: IntErrorHandlers = {\n invalidDigit: (pos, lineStart, curLine, radix) => {\n if (!this.options.errorRecovery) return false;\n\n this.raise(Errors.InvalidDigit, {\n at: buildPosition(pos, lineStart, curLine),\n radix,\n });\n // Continue parsing the number as if there was no invalid digit.\n return true;\n },\n numericSeparatorInEscapeSequence: this.errorBuilder(\n Errors.NumericSeparatorInEscapeSequence,\n ),\n unexpectedNumericSeparator: this.errorBuilder(\n Errors.UnexpectedNumericSeparator,\n ),\n };\n\n errorHandlers_readCodePoint: CodePointErrorHandlers = {\n ...this.errorHandlers_readInt,\n invalidEscapeSequence: this.errorBuilder(Errors.InvalidEscapeSequence),\n invalidCodePoint: this.errorBuilder(Errors.InvalidCodePoint),\n };\n\n errorHandlers_readStringContents_string: StringContentsErrorHandlers = {\n ...this.errorHandlers_readCodePoint,\n strictNumericEscape: (pos, lineStart, curLine) => {\n this.recordStrictModeErrors(Errors.StrictNumericEscape, {\n at: buildPosition(pos, lineStart, curLine),\n });\n },\n unterminated: (pos, lineStart, curLine) => {\n throw this.raise(Errors.UnterminatedString, {\n // Report the error at the string quote\n at: buildPosition(pos - 1, lineStart, curLine),\n });\n },\n };\n\n errorHandlers_readStringContents_template: StringContentsErrorHandlers = {\n ...this.errorHandlers_readCodePoint,\n strictNumericEscape: this.errorBuilder(Errors.StrictNumericEscape),\n unterminated: (pos, lineStart, curLine) => {\n throw this.raise(Errors.UnterminatedTemplate, {\n at: buildPosition(pos, lineStart, curLine),\n });\n },\n };\n}\n","import { ClassElementType } from \"./scopeflags\";\nimport type { Position } from \"./location\";\nimport { Errors } from \"../parse-error\";\nimport type 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, ClassElementType> = 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: ClassElementType,\n loc: Position,\n ) {\n const { privateNames, loneAccessors, undefinedPrivateNames } =\n this.current();\n let redefined = privateNames.has(name);\n\n if (elementType & ClassElementType.KIND_ACCESSOR) {\n const accessor = redefined && loneAccessors.get(name);\n if (accessor) {\n const oldStatic = accessor & ClassElementType.FLAG_STATIC;\n const newStatic = elementType & ClassElementType.FLAG_STATIC;\n\n const oldKind = accessor & ClassElementType.KIND_ACCESSOR;\n const newKind = elementType & ClassElementType.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","import { Errors, type ParseErrorConstructor } from \"../parse-error\";\nimport type { Position } from \"./location\";\nimport type { Node } from \"../types\";\nimport type Tokenizer from \"../tokenizer\";\n\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 ambiguous 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 enum ExpressionScopeType {\n kExpression = 0,\n kMaybeArrowParameterDeclaration = 1,\n kMaybeAsyncArrowParameterDeclaration = 2,\n kParameterDeclaration = 3,\n}\n\nclass ExpressionScope {\n declare type: ExpressionScopeType;\n\n constructor(type: ExpressionScopeType = ExpressionScopeType.kExpression) {\n this.type = type;\n }\n\n canBeArrowParameterDeclaration(): this is ArrowHeadParsingScope {\n return (\n this.type === ExpressionScopeType.kMaybeAsyncArrowParameterDeclaration ||\n this.type === ExpressionScopeType.kMaybeArrowParameterDeclaration\n );\n }\n\n isCertainlyParameterDeclaration() {\n return this.type === ExpressionScopeType.kParameterDeclaration;\n }\n}\n\ntype ArrowHeadParsingParameterInitializerError =\n | typeof Errors.AwaitExpressionFormalParameter\n | typeof Errors.YieldInParameter;\ntype ArrowHeadParsingDeclarationError =\n | ArrowHeadParsingParameterInitializerError\n | typeof Errors.InvalidParenthesizedAssignment\n | typeof Errors.AwaitBindingIdentifier;\n\nclass ArrowHeadParsingScope extends ExpressionScope {\n declarationErrors: Map<number, [ParseErrorConstructor<{}>, Position]> =\n new Map();\n constructor(\n type:\n | ExpressionScopeType.kMaybeArrowParameterDeclaration\n | ExpressionScopeType.kMaybeAsyncArrowParameterDeclaration,\n ) {\n super(type);\n }\n recordDeclarationError(\n ParsingErrorClass: ParseErrorConstructor<{}>,\n {\n at,\n }: {\n at: Position;\n },\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: (a: [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 */\n recordParameterInitializerError(\n toParseError: ArrowHeadParsingParameterInitializerError,\n {\n at: node,\n }: {\n at: Node;\n },\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 scope.recordDeclarationError(toParseError, origin);\n } else {\n /*:: invariant(scope.type == ExpressionScopeType.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 errors that must be thrown if the current pattern ends up being an arrow\n * function parameter. This is used to record parenthesized identifiers, and to record\n * \"a as T\" and \"<T> a\" type assertions when parsing typescript.\n *\n * A parenthesized identifier (or type assertion) 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 */\n recordArrowParameterBindingError(\n error: ParseErrorConstructor<{}>,\n {\n at: node,\n }: {\n at: Node;\n },\n ): 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(error, origin);\n } else if (scope.canBeArrowParameterDeclaration()) {\n scope.recordDeclarationError(error, origin);\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 */\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 (\n scope.type === ExpressionScopeType.kMaybeAsyncArrowParameterDeclaration\n ) {\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 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 scope.clearDeclarationError(loc.index);\n scope = stack[--i];\n }\n });\n }\n}\n\nexport function newParameterDeclarationScope() {\n return new ExpressionScope(ExpressionScopeType.kParameterDeclaration);\n}\n\nexport function newArrowHeadScope() {\n return new ArrowHeadParsingScope(\n ExpressionScopeType.kMaybeArrowParameterDeclaration,\n );\n}\n\nexport function newAsyncArrowScope() {\n return new ArrowHeadParsingScope(\n ExpressionScopeType.kMaybeAsyncArrowParameterDeclaration,\n );\n}\n\nexport function newExpressionScope() {\n return new ExpressionScope();\n}\n","export const // Initial Parameter flags\n PARAM = 0b0000,\n // track [Yield] production parameter\n PARAM_YIELD = 0b0001,\n // track [Await] production parameter\n PARAM_AWAIT = 0b0010,\n // track [Return] production parameter\n PARAM_RETURN = 0b0100,\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 = number;\n\n// todo(flow->ts) - check if more granular type can be used,\n// type below is not good because things like PARAM_AWAIT|PARAM_YIELD are not included\n// export 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<number> = [];\n enter(flags: number) {\n this.stacks.push(flags);\n }\n\n exit() {\n this.stacks.pop();\n }\n\n currentFlags(): number {\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","import type { Position } from \"../util/location\";\nimport {\n tokenIsLiteralPropertyName,\n tt,\n type TokenType,\n} from \"../tokenizer/types\";\nimport Tokenizer from \"../tokenizer\";\nimport type State from \"../tokenizer/state\";\nimport type { EstreePropertyDefinition, Node, ObjectProperty } 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 { ScopeFlag } 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\";\nimport type Parser from \".\";\n\nimport type ScopeHandler from \"../util/scope\";\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 abstract class UtilParser extends Tokenizer {\n // Forward-declaration: defined in parser/index.js\n abstract getScopeHandler(): { new (...args: any): ScopeHandler };\n\n addExtra(\n node: Partial<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 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 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 | null): 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 extends Node | ReadonlyArray<Node>>(\n fn: (abort: (node?: T) => never) => 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: {\n node: T | null;\n } = { 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],\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 // @ts-expect-error casting general syntax error to parse error\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 | undefined | null,\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 isObjectProperty(\n node: Node,\n ): node is ObjectProperty | EstreePropertyDefinition {\n return node.type === \"ObjectProperty\";\n }\n\n isObjectMethod(node: Node): boolean {\n return node.type === \"ObjectMethod\";\n }\n\n initializeScopes(\n this: Parser,\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(ScopeFlag.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 parameter (`?`).\n * It's only used by typescript and flow plugins\n */\nexport class ExpressionErrors {\n shorthandAssignLoc: Position | undefined | null = null;\n doubleProtoLoc: Position | undefined | null = null;\n privateKeyLoc: Position | undefined | null = null;\n optionalParametersLoc: Position | undefined | null = null;\n}\n","import 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: {\n [key: string]: any;\n };\n}\nconst NodePrototype = Node.prototype;\n\nif (!process.env.BABEL_8_BREAKING) {\n // @ts-expect-error __clone is not defined in Node prototype\n NodePrototype.__clone = function (): Node {\n const newNode = new Node(undefined, this.start, this.loc.start);\n const keys = Object.keys(this) as (keyof Node)[];\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 // @ts-expect-error cloning this to newNode\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 type Undone<T extends NodeType> = Omit<T, \"type\">;\n\nexport abstract class NodeUtils extends UtilParser {\n startNode<T extends NodeType>(): Undone<T> {\n // @ts-expect-error cast Node as Undone<T>\n return new Node(this, this.state.start, this.state.startLoc);\n }\n\n startNodeAt<T extends NodeType>(loc: Position): Undone<T> {\n // @ts-expect-error cast Node as Undone<T>\n return new Node(this, loc.index, loc);\n }\n\n /** Start a new node with a previous node's location. */\n startNodeAtNode<T extends NodeType>(type: Undone<NodeType>): Undone<T> {\n return this.startNodeAt(type.loc.start);\n }\n\n // Finish an AST node, adding `type` and `end` properties.\n\n finishNode<T extends NodeType>(node: Undone<T>, type: T[\"type\"]): T {\n return this.finishNodeAt(node, type, this.state.lastTokEndLoc);\n }\n\n // Finish node at given position\n\n finishNodeAt<T extends NodeType>(\n node: Omit<T, \"type\">,\n type: T[\"type\"],\n endLoc: Position,\n ): T {\n if (process.env.NODE_ENV !== \"production\" && node.end > 0) {\n throw new Error(\n \"Do not call finishNode*() twice on the same node.\" +\n \" Instead use resetEndLocation() or change type directly.\",\n );\n }\n // @ts-expect-error migrate to Babel types AST typings\n node.type = type;\n // @ts-expect-error migrate to Babel types AST typings\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 as T);\n return node as T;\n }\n\n resetStartLocation(node: NodeBase, startLoc: Position): void {\n node.start = startLoc.index;\n node.loc.start = startLoc;\n if (this.options.ranges) node.range[0] = startLoc.index;\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.loc.start);\n }\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 type * as N from \"../../types\";\nimport type { 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 BindingFlag,\n ScopeFlag,\n type BindingTypes,\n} from \"../../util/scopeflags\";\nimport type { ExpressionErrors } from \"../../parser/util\";\nimport type { ParseStatementFlag } from \"../../parser/statement\";\nimport { Errors, ParseErrorEnum } from \"../../parse-error\";\nimport { cloneIdentifier, type Undone } 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 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 // 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 }: { reservedType: string }) =>\n `Cannot overwrite reserved type ${reservedType}.`,\n DeclareClassElement:\n \"The `declare` modifier can only appear on class fields.\",\n DeclareClassFieldInitializer:\n \"Initializers are not allowed in fields with the `declare` modifier.\",\n DuplicateDeclareModuleExports:\n \"Duplicate `declare module.exports` statement.\",\n EnumBooleanMemberNotInitialized: ({\n memberName,\n enumName,\n }: {\n memberName: string;\n enumName: string;\n }) =>\n `Boolean enum members need to be initialized. Use either \\`${memberName} = true,\\` or \\`${memberName} = false,\\` in enum \\`${enumName}\\`.`,\n EnumDuplicateMemberName: ({\n memberName,\n enumName,\n }: {\n memberName: string;\n enumName: string;\n }) =>\n `Enum member names need to be unique, but the name \\`${memberName}\\` has already been used before in enum \\`${enumName}\\`.`,\n EnumInconsistentMemberValues: ({ enumName }: { enumName: string }) =>\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 EnumInvalidExplicitType: ({\n invalidEnumType,\n enumName,\n }: {\n invalidEnumType: string;\n enumName: string;\n }) =>\n `Enum type \\`${invalidEnumType}\\` is not valid. Use one of \\`boolean\\`, \\`number\\`, \\`string\\`, or \\`symbol\\` in enum \\`${enumName}\\`.`,\n EnumInvalidExplicitTypeUnknownSupplied: ({\n enumName,\n }: {\n enumName: string;\n }) =>\n `Supplied enum type is not valid. Use one of \\`boolean\\`, \\`number\\`, \\`string\\`, or \\`symbol\\` in enum \\`${enumName}\\`.`,\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,\n memberName,\n explicitType,\n }: {\n enumName: string;\n memberName: string;\n explicitType: EnumExplicitType;\n }) =>\n `Enum \\`${enumName}\\` has type \\`${explicitType}\\`, so the initializer of \\`${memberName}\\` needs to be a ${explicitType} literal.`,\n EnumInvalidMemberInitializerSymbolType: ({\n enumName,\n memberName,\n }: {\n enumName: string;\n memberName: string;\n explicitType: EnumExplicitType;\n }) =>\n `Symbol enum members cannot be initialized. Use \\`${memberName},\\` in enum \\`${enumName}\\`.`,\n EnumInvalidMemberInitializerUnknownType: ({\n enumName,\n memberName,\n }: {\n enumName: string;\n memberName: string;\n explicitType: EnumExplicitType;\n }) =>\n `The enum member initializer for \\`${memberName}\\` needs to be a literal (either a boolean, number, or string) in enum \\`${enumName}\\`.`,\n EnumInvalidMemberName: ({\n enumName,\n memberName,\n suggestion,\n }: {\n enumName: string;\n memberName: string;\n suggestion: string;\n }) =>\n `Enum member names cannot start with lowercase 'a' through 'z'. Instead of using \\`${memberName}\\`, consider using \\`${suggestion}\\`, in enum \\`${enumName}\\`.`,\n EnumNumberMemberNotInitialized: ({\n enumName,\n memberName,\n }: {\n enumName: string;\n memberName: string;\n }) =>\n `Number enum members need to be initialized, e.g. \\`${memberName} = 1\\` in enum \\`${enumName}\\`.`,\n EnumStringMemberInconsistentlyInitialized: ({\n enumName,\n }: {\n enumName: string;\n }) =>\n `String enum members need to consistently either all use initializers, or use no initializers, in enum \\`${enumName}\\`.`,\n GetterMayNotHaveThisParam: \"A getter cannot have a `this` parameter.\",\n ImportReflectionHasImportType:\n \"An `import module` declaration can not use `type` or `typeof` keyword.\",\n ImportTypeShorthandOnlyInPureImport:\n \"The `type` and `typeof` keywords on named imports can only be used on regular `import` statements. It cannot be used with `import type` or `import typeof` statements.\",\n InexactInsideExact:\n \"Explicit inexact syntax cannot appear inside an explicit exact object type.\",\n InexactInsideNonObject:\n \"Explicit inexact syntax cannot appear in class or interface definitions.\",\n InexactVariance: \"Explicit inexact syntax cannot have variance.\",\n InvalidNonTypeImportInDeclareModule:\n \"Imports within a `declare module` body must always be `import type` or `import typeof`.\",\n MissingTypeParamDefault:\n \"Type parameter declaration needs a default, since a preceding type parameter declaration has a default.\",\n NestedDeclareModule:\n \"`declare module` cannot be used inside another `declare module`.\",\n NestedFlowComment: \"Cannot have a flow comment inside another flow comment.\",\n PatternIsOptional: {\n message:\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 ThisParamBannedInConstructor:\n \"Constructors cannot have a `this` parameter; constructors don't bind `this` like other functions.\",\n ThisParamMayNotBeOptional: \"The `this` parameter cannot be optional.\",\n ThisParamMustBeFirst:\n \"The `this` parameter must be the first function parameter.\",\n ThisParamNoDefault: \"The `this` parameter may not have a default value.\",\n TypeBeforeInitializer:\n \"Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.\",\n TypeCastInPattern:\n \"The type cast expression is expected to be wrapped with parenthesis.\",\n UnexpectedExplicitInexactInObject:\n \"Explicit inexact syntax must appear at the end of an inexact object.\",\n UnexpectedReservedType: ({ reservedType }: { reservedType: string }) =>\n `Unexpected reserved type ${reservedType}.`,\n UnexpectedReservedUnderscore:\n \"`_` is only allowed as a type argument to call or new.\",\n UnexpectedSpaceBetweenModuloChecks:\n \"Spaces between `%` and `checks` are not allowed here.\",\n UnexpectedSpreadType:\n \"Spread operator cannot appear in class or interface definitions.\",\n UnexpectedSubtractionOperand:\n 'Unexpected token, expected \"number\" or \"bigint\".',\n UnexpectedTokenAfterTypeParameter:\n \"Expected an arrow function after this type parameter declaration.\",\n UnexpectedTypeParameterBeforeAsyncArrowFunction:\n \"Type parameters must come after the async keyword, e.g. instead of `<T> async () => {}`, use `async <T>() => {}`.\",\n UnsupportedDeclareExportKind: ({\n unsupportedExportKind,\n suggestion,\n }: {\n unsupportedExportKind: string;\n suggestion: string;\n }) =>\n `\\`declare export ${unsupportedExportKind}\\` is not supported. Use \\`${suggestion}\\` instead.`,\n UnsupportedStatementInDeclareModule:\n \"Only declares and type imports are allowed inside declare module.\",\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\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: (c: T, b: number, a: T[]) => boolean | undefined | null,\n): [T[], T[]] {\n const list1: T[] = [];\n const list2: T[] = [];\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\";\n\ntype EnumContext = {\n enumName: string;\n explicitType: EnumExplicitType;\n memberName: string;\n};\n\ntype EnumMemberInit =\n | {\n type: \"number\";\n loc: Position;\n value: N.Node;\n }\n | {\n type: \"string\";\n loc: Position;\n value: N.Node;\n }\n | {\n type: \"boolean\";\n loc: Position;\n value: N.Node;\n }\n | {\n type: \"invalid\";\n loc: Position;\n }\n | {\n type: \"none\";\n loc: Position;\n };\n\nexport default (superClass: typeof Parser) =>\n class FlowParserMixin extends superClass implements Parser {\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(): {\n new (...args: any): FlowScopeHandler;\n } {\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 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 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.FlowPredicate {\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 = super.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 N.FlowType | undefined | null,\n N.FlowPredicate | undefined | null,\n ] {\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(\n node: Undone<N.FlowDeclareClass>,\n ): N.FlowDeclareClass {\n this.next();\n this.flowParseInterfaceish(node, /*isClass*/ true);\n return this.finishNode(node, \"DeclareClass\");\n }\n\n flowParseDeclareFunction(\n node: Undone<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.TypeAnnotation>();\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 [typeNode.returnType, 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 BindingFlag.TYPE_FLOW_DECLARE_FN,\n node.id.loc.start,\n );\n\n return this.finishNode(node, \"DeclareFunction\");\n }\n\n flowParseDeclare(\n node: Undone<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 this.unexpected();\n }\n }\n\n flowParseDeclareVariable(\n node: Undone<N.FlowDeclareVariable>,\n ): N.FlowDeclareVariable {\n this.next();\n node.id = this.flowParseTypeAnnotatableIdentifier(\n /*allowPrimitiveOverride*/ true,\n );\n this.scope.declareName(\n node.id.name,\n BindingFlag.TYPE_VAR,\n node.id.loc.start,\n );\n this.semicolon();\n return this.finishNode(node, \"DeclareVariable\");\n }\n\n flowParseDeclareModule(\n node: Undone<N.FlowDeclareModule>,\n ): N.FlowDeclareModule {\n this.scope.enter(ScopeFlag.OTHER);\n\n if (this.match(tt.string)) {\n node.id = super.parseExprAtom();\n } else {\n node.id = this.parseIdentifier();\n }\n\n const bodyNode = (node.body = this.startNode());\n // @ts-expect-error refine typings\n const body = (bodyNode.body = []);\n this.expect(tt.braceL);\n while (!this.match(tt.braceR)) {\n let bodyNode = this.startNode<N.ImportDeclaration>();\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 super.parseImport(bodyNode);\n } else {\n this.expectContextual(\n tt._declare,\n FlowErrors.UnsupportedStatementInDeclareModule,\n );\n // @ts-expect-error refine typings\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: \"CommonJS\" | \"ES\" | null = 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: Undone<N.FlowDeclareExportDeclaration>,\n insideModule?: boolean | null,\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 as\n | \"const\"\n | \"let\"\n | \"type\"\n | \"interface\";\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(\n node as Undone<N.ExportNamedDeclaration | N.ExportAllDeclaration>,\n /* decorators */ null,\n );\n if (node.type === \"ExportNamedDeclaration\") {\n node.type = \"ExportDeclaration\";\n node.default = false;\n delete node.exportKind;\n }\n\n node.type = \"Declare\" + node.type;\n\n return node as N.Node;\n }\n }\n\n this.unexpected();\n }\n\n flowParseDeclareModuleExports(\n node: Undone<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: Undone<N.FlowDeclareTypeAlias>,\n ): N.FlowDeclareTypeAlias {\n this.next();\n const finished = this.flowParseTypeAlias(node);\n // Don't do finishNode as we don't want to process comments twice\n finished.type = \"DeclareTypeAlias\";\n return finished;\n }\n\n flowParseDeclareOpaqueType(\n node: Undone<N.FlowDeclareOpaqueType>,\n ): N.FlowDeclareOpaqueType {\n this.next();\n const finished = this.flowParseOpaqueType(node, true);\n // Don't do finishNode as we don't want to process comments twice\n finished.type = \"DeclareOpaqueType\";\n return finished;\n }\n\n flowParseDeclareInterface(\n node: Undone<N.FlowDeclareInterface>,\n ): N.FlowDeclareInterface {\n this.next();\n this.flowParseInterfaceish(node, /* isClass */ false);\n return this.finishNode(node, \"DeclareInterface\");\n }\n\n // Interfaces\n\n flowParseInterfaceish(node: Undone<N.FlowDeclare>, isClass: boolean): void {\n node.id = this.flowParseRestrictedIdentifier(\n /* liberal */ !isClass,\n /* declaration */ true,\n );\n\n this.scope.declareName(\n node.id.name,\n isClass ? BindingFlag.TYPE_FUNCTION : BindingFlag.TYPE_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\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 (isClass) {\n node.implements = [];\n node.mixins = [];\n\n if (this.eatContextual(tt._mixins)) {\n do {\n node.mixins.push(this.flowParseInterfaceExtends());\n } while (this.eat(tt.comma));\n }\n\n if (this.eatContextual(tt._implements)) {\n do {\n node.implements.push(this.flowParseInterfaceExtends());\n } while (this.eat(tt.comma));\n }\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: Undone<N.FlowInterface>): N.FlowInterface {\n this.flowParseInterfaceish(node, /* isClass */ false);\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: Undone<N.FlowTypeAlias>): N.FlowTypeAlias {\n node.id = this.flowParseRestrictedIdentifier(\n /* liberal */ false,\n /* declaration */ true,\n );\n this.scope.declareName(\n node.id.name,\n BindingFlag.TYPE_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.right = this.flowParseTypeInitialiser(tt.eq);\n this.semicolon();\n\n return this.finishNode(node, \"TypeAlias\");\n }\n\n flowParseOpaqueType(\n node: Undone<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(\n node.id.name,\n BindingFlag.TYPE_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 // 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.TypeParameter>();\n\n const variance = this.flowParseVariance();\n\n const ident = this.flowParseTypeAnnotatableIdentifier();\n node.name = ident.name;\n // @ts-expect-error migrate to Babel types\n node.variance = variance;\n // @ts-expect-error migrate to Babel types\n node.bound = ident.typeAnnotation;\n\n if (this.match(tt.eq)) {\n this.eat(tt.eq);\n // @ts-expect-error migrate to Babel types\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.TypeParameterDeclaration>();\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.TypeParameterInstantiation>();\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.TypeParameterInstantiation>();\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.FlowInterfaceType>();\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 ? super.parseExprAtom()\n : this.parseIdentifier(true);\n }\n\n flowParseObjectTypeIndexer(\n node: Undone<N.FlowObjectTypeIndexer>,\n isStatic: boolean,\n variance?: N.FlowVariance | null,\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: Undone<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.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: Undone<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: Undone<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 | undefined | null = null;\n let inexactStartLoc: Position | undefined | null = 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: Undone<N.FlowObjectTypeProperty | N.FlowObjectTypeSpreadProperty>,\n isStatic: boolean,\n protoStartLoc: Position | undefined | null,\n variance: N.FlowVariance | undefined | null,\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.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: Undone<\n N.FlowObjectTypeProperty | N.FlowObjectTypeSpreadProperty\n >,\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 startLoc?: Position,\n id?: N.Identifier,\n ): N.FlowQualifiedTypeIdentifier {\n startLoc ??= this.state.startLoc;\n let node: N.Identifier | N.FlowQualifiedTypeIdentifier =\n id || this.flowParseRestrictedIdentifier(true);\n\n while (this.eat(tt.dot)) {\n const node2 = this.startNodeAt<N.FlowQualifiedTypeIdentifier>(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 startLoc: Position,\n id: N.Identifier,\n ): N.FlowGenericTypeAnnotation {\n const node = this.startNodeAt(startLoc);\n\n node.typeParameters = null;\n node.id = this.flowParseQualifiedTypeIdentifier(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.FlowFunctionTypeParam>();\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.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 | undefined | null;\n _this: N.FlowFunctionTypeParam | undefined | null;\n } {\n let rest: N.FlowFunctionTypeParam | undefined | null = null;\n let _this: N.FlowFunctionTypeParam | undefined | null = 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 startLoc: Position,\n node: Undone<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(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 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 node as Undone<N.BooleanLiteralTypeAnnotation>,\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 this.unexpected();\n return;\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 as Undone<N.Identifier>, 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 startLoc,\n node,\n this.parseIdentifier(),\n );\n }\n }\n\n this.unexpected();\n }\n\n flowParsePostfixType(): N.FlowTypeAnnotation {\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(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 // @ts-expect-error todo(flow->ts)\n node,\n \"OptionalIndexedAccessType\",\n );\n } else {\n type = this.finishNode<N.FlowIndexedAccessType>(\n // @ts-expect-error todo(flow->ts)\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.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 startLoc = this.state.startLoc;\n const node = this.parseIdentifier();\n return this.flowParseGenericType(startLoc, node);\n } else {\n return this.flowParseType();\n }\n }\n\n flowParseTypeAnnotation(): N.FlowTypeAnnotation {\n const node = this.startNode<N.FlowTypeAnnotation>();\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 // @ts-expect-error: refine typings\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 | undefined | null {\n let variance = null;\n if (this.match(tt.plusMin)) {\n variance = this.startNode<N.FlowVariance>();\n if (this.state.value === \"+\") {\n variance.kind = \"plus\";\n } else {\n variance.kind = \"minus\";\n }\n this.next();\n return this.finishNode(variance, \"Variance\");\n }\n return variance;\n }\n\n // ==================================\n // Overrides\n // ==================================\n\n parseFunctionBody(\n node: N.Function,\n allowExpressionBody?: boolean | null,\n isMethod: boolean = false,\n ): void {\n if (allowExpressionBody) {\n this.forwardNoArrowParamsConversionAt(node, () =>\n super.parseFunctionBody(node, true, isMethod),\n );\n return;\n }\n\n super.parseFunctionBody(node, false, isMethod);\n }\n\n parseFunctionBodyAndFinish<\n T extends\n | N.Function\n | N.TSDeclareMethod\n | N.TSDeclareFunction\n | N.ClassPrivateMethod,\n >(node: Undone<T>, type: T[\"type\"], isMethod: boolean = false): T {\n if (this.match(tt.colon)) {\n const typeNode = this.startNode<N.TypeAnnotation>();\n\n [\n typeNode.typeAnnotation,\n // @ts-expect-error predicate may not exist\n node.predicate,\n ] = this.flowParseTypeAndPredicateInitialiser();\n\n node.returnType = typeNode.typeAnnotation\n ? this.finishNode(typeNode, \"TypeAnnotation\")\n : null;\n }\n\n return super.parseFunctionBodyAndFinish(node, type, isMethod);\n }\n\n // interfaces and enums\n parseStatementLike(flags: ParseStatementFlag): 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.FlowInterface>();\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.parseStatementLike(flags);\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 decorators: N.Decorator[] | null,\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 // @ts-expect-error: refine typings\n return this.flowParseDeclare(node);\n }\n } else if (tokenIsIdentifier(this.state.type)) {\n if (expr.name === \"interface\") {\n // @ts-expect-error: refine typings\n return this.flowParseInterface(node);\n } else if (expr.name === \"type\") {\n // @ts-expect-error: refine typings\n return this.flowParseTypeAlias(node);\n } else if (expr.name === \"opaque\") {\n // @ts-expect-error: refine typings\n return this.flowParseOpaqueType(node, false);\n }\n }\n }\n\n return super.parseExpressionStatement(node, expr, decorators);\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\n startLoc: Position,\n refExpressionErrors?: ExpressionErrors | null,\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(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 // @ts-expect-error: refine typings\n this.finishArrowValidation(node);\n } else {\n // @ts-expect-error: refine typings\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 as any as N.Expression[],\n node.extra?.trailingCommaLoc,\n /* isLHS */ false,\n );\n // Enter scope, as checkParams defines bindings\n this.scope.enter(ScopeFlag.FUNCTION | ScopeFlag.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>(\n node: Undone<N.Node>,\n parse: () => T,\n ): 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\n startLoc: Position,\n ): N.Expression {\n node = super.parseParenItem(node, 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(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 parseExportDeclaration(\n node: N.ExportNamedDeclaration,\n ): N.Declaration | undefined | null {\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 super.parseExportFrom(node);\n return null;\n } else {\n // export type Foo = Bar;\n // @ts-expect-error: refine typings\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 // @ts-expect-error: refine typings\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 // @ts-expect-error: refine typings\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 // @ts-expect-error: refine typings\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(node)) 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(\n node: N.Class,\n isStatement: boolean,\n optionalId?: boolean | null,\n ) {\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 (super.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 this.finishOp(tt.braceBarL, 2);\n } else if (\n this.state.inType &&\n (code === charCodes.greaterThan || code === charCodes.lessThan)\n ) {\n 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 this.finishOp(tt.questionDot, 2);\n } else {\n // allow double nullable types in Flow: ??string\n this.finishOp(tt.question, 1);\n }\n } else if (\n isIteratorStart(code, next, this.input.charCodeAt(this.state.pos + 2))\n ) {\n this.state.pos += 2; // eat \"@@\"\n this.readIterator();\n } else {\n 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): void {\n if (\n !isLHS &&\n node.type === \"AssignmentExpression\" &&\n node.left.type === \"TypeCastExpression\"\n ) {\n node.left = this.typeCastToParameter(node.left);\n }\n super.toAssignable(node, isLHS);\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 | undefined | null,\n isLHS: boolean,\n ): void {\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 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 | undefined | null>,\n isParenthesizedExpr?: boolean,\n ): ReadonlyArray<N.Expression | undefined | null> {\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 | null,\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, isParenthesized: boolean, binding: BindingTypes) {\n return (\n type === \"TypeCastExpression\" ||\n super.isValidLVal(type, isParenthesized, binding)\n );\n }\n\n // parse class property type annotations\n parseClassProperty(node: N.ClassProperty): N.ClassProperty {\n if (this.match(tt.colon)) {\n // @ts-expect-error refine typings\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 // @ts-expect-error refine typings\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 as any).variance) {\n this.unexpected((method as any).variance.loc.start);\n }\n delete (method as any).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 // @ts-expect-error TS does not know about the face that estree can replace ClassMethod with MethodDefinition\n method.type === \"MethodDefinition\" &&\n isConstructor &&\n // @ts-expect-error estree\n method.value.params\n ) {\n // @ts-expect-error estree\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 as any).variance) {\n this.unexpected((method as any).variance.loc.start);\n }\n delete (method as any).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: Undone<N.ObjectMethod | N.ObjectProperty>,\n startLoc: Position | undefined | null,\n isGenerator: boolean,\n isAsync: boolean,\n isPattern: boolean,\n isAccessor: boolean,\n refExpressionErrors?: ExpressionErrors | null,\n ): N.ObjectMethod | N.ObjectProperty {\n if ((prop as any).variance) {\n this.unexpected((prop as any).variance.loc.start);\n }\n delete (prop as any).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 const result = super.parseObjPropValue(\n prop,\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 // @ts-expect-error: refine typings\n (result.value || result).typeParameters = typeParameters;\n }\n return result;\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 as any as N.Identifier).optional = true;\n }\n if (this.match(tt.colon)) {\n // @ts-expect-error: refine typings\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 startLoc?: Position | null,\n left?: N.Pattern | null,\n ): N.Pattern {\n const node = super.parseMaybeDefault(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 checkImportReflection(node: Undone<N.ImportDeclaration>) {\n super.checkImportReflection(node);\n if (node.module && node.importKind !== \"value\") {\n this.raise(FlowErrors.ImportReflectionHasImportType, {\n at: node.specifiers[0].loc.start,\n });\n }\n }\n\n parseImportSpecifierLocal<\n T extends\n | N.ImportSpecifier\n | N.ImportDefaultSpecifier\n | N.ImportNamespaceSpecifier,\n >(node: N.ImportDeclaration, specifier: Undone<T>, type: T[\"type\"]): 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 isPotentialImportPhase(isExport: boolean): boolean {\n if (super.isPotentialImportPhase(isExport)) return true;\n if (this.isContextual(tt._type)) {\n if (!isExport) return true;\n const ch = this.lookaheadCharCode();\n return ch === charCodes.leftCurlyBrace || ch === charCodes.asterisk;\n }\n return !isExport && this.isContextual(tt._typeof);\n }\n\n applyImportPhase(\n node: Undone<N.ImportDeclaration | N.ExportNamedDeclaration>,\n isExport: boolean,\n phase: string | null,\n loc?: Position,\n ): void {\n super.applyImportPhase(node, isExport, phase, loc);\n if (isExport) {\n if (!phase && this.match(tt._default)) {\n // TODO: Align with our TS AST and always add .exportKind\n return;\n }\n (node as N.ExportNamedDeclaration).exportKind =\n phase === \"type\" ? phase : \"value\";\n } else {\n if (phase === \"type\" && this.match(tt.star)) this.unexpected();\n (node as N.ImportDeclaration).importKind =\n phase === \"type\" || phase === \"typeof\" ? phase : \"value\";\n }\n }\n\n // parse import-type/typeof shorthand\n parseImportSpecifier(\n specifier: any,\n importedIsString: boolean,\n isInTypeOnlyImport: boolean,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n isMaybeTypeOnly: boolean,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n bindingType: BindingTypes | undefined,\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(\n node: Undone<N.Function>,\n isConstructor: boolean,\n ): void {\n // @ts-expect-error kind may not index node\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, isConstructor);\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 // @ts-expect-error: refine typings\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 // @ts-expect-error refine typings\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 | null,\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.TypeParameterDeclaration;\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 | undefined\n | null = null;\n\n if (\n arrow.node &&\n // @ts-expect-error: refine tryParse typings\n this.maybeUnwrapTypeCastExpression(arrow.node).type ===\n \"ArrowFunctionExpression\"\n ) {\n if (!arrow.error && !arrow.aborted) {\n // <T> async () => {}\n // @ts-expect-error: refine tryParse typings\n if (arrow.node.async) {\n /*:: invariant(typeParameters) */\n this.raise(\n FlowErrors.UnexpectedTypeParameterBeforeAsyncArrowFunction,\n { at: typeParameters },\n );\n }\n // @ts-expect-error: refine tryParse typings\n return arrow.node;\n }\n\n // @ts-expect-error: refine typings\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(\n node: Undone<N.ArrowFunctionExpression>,\n ): Undone<N.ArrowFunctionExpression> | undefined | null {\n if (this.match(tt.colon)) {\n // @ts-expect-error todo(flow->ts)\n const result = this.tryParse(() => {\n const oldNoAnonFunctionType = this.state.noAnonFunctionType;\n this.state.noAnonFunctionType = true;\n\n const typeNode = this.startNode<N.TypeAnnotation>();\n\n [\n typeNode.typeAnnotation,\n // @ts-expect-error (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 // @ts-expect-error todo(flow->ts)\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.Pattern[],\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 | null,\n strictModeChanged: boolean = true,\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 super.checkParams(\n node,\n allowDuplicates,\n isArrowFunction,\n strictModeChanged,\n );\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\n startLoc: Position,\n noCalls?: boolean | null,\n ): N.Expression {\n if (\n base.type === \"Identifier\" &&\n base.name === \"async\" &&\n this.state.noArrowAt.indexOf(startLoc.index) !== -1\n ) {\n this.next();\n\n const node = this.startNodeAt(startLoc);\n node.callee = base;\n node.arguments = super.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 => this.parseAsyncArrowWithTypeParameters(startLoc) || abort(),\n state,\n );\n\n /*:: invariant(arrow.node != null) */\n // @ts-expect-error: refine tryParse typings\n if (!arrow.error && !arrow.aborted) return arrow.node;\n\n const result = this.tryParse(\n () => super.parseSubscripts(base, 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 // @ts-expect-error: refine tryParse typings\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, startLoc, noCalls);\n }\n\n parseSubscript(\n base: N.Expression,\n\n startLoc: Position,\n noCalls: boolean | undefined | null,\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 = this.startNodeAt<N.OptionalCallExpression>(startLoc);\n node.callee = base;\n node.typeArguments = this.flowParseTypeParameterInstantiation();\n this.expect(tt.parenL);\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<\n N.OptionalCallExpression | N.CallExpression\n >(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 = super.parseCallExpressionArguments(tt.parenR, false);\n if (subscriptState.optionalChainMember) {\n (node as Undone<N.OptionalCallExpression>).optional = false;\n }\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\n startLoc,\n noCalls,\n subscriptState,\n );\n }\n\n parseNewCallee(node: N.NewExpression): void {\n super.parseNewCallee(node);\n\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\n parseAsyncArrowWithTypeParameters(\n startLoc: Position,\n ): N.ArrowFunctionExpression | undefined | null {\n const node = this.startNodeAt<N.ArrowFunctionExpression>(startLoc);\n this.parseFunctionParams(node, false);\n if (!this.parseArrow(node)) return;\n return super.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 | undefined {\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 const commentSkip = this.skipFlowComment();\n if (commentSkip) {\n this.state.pos += commentSkip;\n this.state.hasFlowComment = true;\n }\n return;\n }\n\n return super.skipBlockComment(this.state.hasFlowComment ? \"*-/\" : \"*/\");\n }\n\n skipFlowComment(): number | false {\n const { pos } = this.state;\n let shiftToFirstNonWhiteSpace = 2;\n while (\n [charCodes.space, charCodes.tab].includes(\n // @ts-expect-error testing whether a number is included\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 {\n enumName,\n memberName,\n }: {\n enumName: string;\n memberName: string;\n },\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 {\n enumName,\n memberName,\n }: {\n enumName: string;\n memberName: string;\n },\n ): void {\n this.raise(FlowErrors.EnumNumberMemberNotInitialized, {\n at: loc,\n enumName,\n memberName,\n });\n }\n\n flowEnumErrorStringMemberInconsistentlyInitialized(\n node: N.Node,\n {\n enumName,\n }: {\n enumName: string;\n },\n ): void {\n this.raise(FlowErrors.EnumStringMemberInconsistentlyInitialized, {\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(): {\n id: N.Node;\n init: EnumMemberInit;\n } {\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\" as const, 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 // @ts-expect-error: migrate to Babel types\n booleanMembers: [],\n // @ts-expect-error: migrate to Babel types\n numberMembers: [],\n // @ts-expect-error: migrate to Babel types\n stringMembers: [],\n // @ts-expect-error: migrate to Babel types\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 {\n enumName,\n }: {\n enumName: string;\n },\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.flowEnumErrorStringMemberInconsistentlyInitialized(member, {\n enumName,\n });\n }\n return defaultedMembers;\n } else {\n for (const member of defaultedMembers) {\n this.flowEnumErrorStringMemberInconsistentlyInitialized(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: Undone<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: Undone<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","const entities: {\n __proto__: null;\n [name: string]: string;\n} = {\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} as const;\nexport default entities;\n","import * 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 type { TokContext } from \"../../tokenizer/context\";\nimport { types as tc } from \"../../tokenizer/context\";\nimport type * 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\";\nimport type { Undone } from \"../../parser/node\";\n\n/* eslint sort-keys: \"error\" */\nconst JsxErrors = ParseErrorEnum`jsx`({\n AttributeIsEmpty:\n \"JSX attributes must only be assigned a non-empty expression.\",\n MissingClosingTagElement: ({ openingTagName }: { openingTagName: string }) =>\n `Expected corresponding JSX closing tag for <${openingTagName}>.`,\n MissingClosingTagFragment: \"Expected corresponding JSX closing tag for <>.\",\n UnexpectedSequenceExpression:\n \"Sequence expressions cannot be directly nested inside JSX. Did you mean to wrap it in parentheses (...)?\",\n // FIXME: Unify with Errors.UnexpectedToken\n UnexpectedToken: ({\n unexpected,\n HTMLEntity,\n }: {\n unexpected: string;\n HTMLEntity: string;\n }) =>\n `Unexpected token \\`${unexpected}\\`. Did you mean \\`${HTMLEntity}\\` or \\`{'${unexpected}'}\\`?`,\n UnsupportedJsxValue:\n \"JSX value should be either an expression or a quoted JSX text.\",\n UnterminatedJsxContent: \"Unterminated JSX contents.\",\n UnwrappedAdjacentJSXElements:\n \"Adjacent JSX elements must be wrapped in an enclosing tag. Did you want a JSX fragment <>...</>?\",\n});\n\n/* eslint-disable sort-keys */\n\nfunction isFragment(object?: N.JSXElement | null): 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 interface IJSXParserMixin {\n jsxParseOpeningElementAfterName(\n node: N.JSXOpeningElement,\n ): N.JSXOpeningElement;\n}\n\nexport default (superClass: typeof Parser) =>\n class JSXParserMixin extends superClass implements Parser, IJSXParserMixin {\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 this.finishToken(tt.jsxTagStart);\n } else {\n super.getTokenFromCode(ch);\n }\n return;\n }\n out += this.input.slice(chunkStart, this.state.pos);\n this.finishToken(tt.jsxText, out);\n return;\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 ? \"&rbrace;\" : \"&gt;\",\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 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 this.finishToken(tt.jsxName, this.input.slice(start, this.state.pos));\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 startLoc = this.state.startLoc;\n const name = this.jsxParseIdentifier();\n if (!this.eat(tt.colon)) return name;\n\n const node = this.startNodeAt(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 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(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(this.state.lastTokEndLoc);\n return this.finishNodeAt(node, \"JSXEmptyExpression\", this.state.startLoc);\n }\n\n // Parse JSX spread child\n\n jsxParseSpreadChild(node: Undone<N.JSXSpreadChild>): N.JSXSpreadChild {\n this.next(); // ellipsis\n node.expression = this.parseExpression();\n this.setContext(tc.j_expr);\n this.state.canStartJSXElement = true;\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: Undone<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.state.canStartJSXElement = true;\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.state.canStartJSXElement = true;\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(startLoc: Position): N.JSXOpeningElement {\n const node = this.startNodeAt<N.JSXOpeningElement | N.JSXOpeningFragment>(\n startLoc,\n );\n if (this.eat(tt.jsxTagEnd)) {\n // @ts-expect-error migrate to Babel types\n return this.finishNode(node, \"JSXOpeningFragment\");\n }\n node.name = this.jsxParseElementName();\n return this.jsxParseOpeningElementAfterName(\n node as Undone<N.JSXOpeningElement>,\n );\n }\n\n jsxParseOpeningElementAfterName(\n node: Undone<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(startLoc: Position): N.JSXClosingElement {\n const node = this.startNodeAt(startLoc);\n if (this.eat(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(startLoc: Position): N.JSXElement {\n const node = this.startNodeAt(startLoc);\n const children = [];\n const openingElement = this.jsxParseOpeningElementAt(startLoc);\n let closingElement = null;\n\n if (!openingElement.selfClosing) {\n contents: for (;;) {\n switch (this.state.type) {\n case tt.jsxTagStart:\n startLoc = this.state.startLoc;\n this.next();\n if (this.eat(tt.slash)) {\n closingElement = this.jsxParseClosingElementAt(startLoc);\n break contents;\n }\n children.push(this.jsxParseElementAt(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 N.JSXSpreadChild | N.JSXExpressionContainer\n >();\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 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 at: closingElement,\n openingTagName: getQualifiedJSXName(openingElement.name),\n });\n } else if (!isFragment(openingElement) && !isFragment(closingElement)) {\n if (\n getQualifiedJSXName(closingElement.name) !==\n getQualifiedJSXName(openingElement.name)\n ) {\n this.raise(JsxErrors.MissingClosingTagElement, {\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 startLoc = this.state.startLoc;\n this.next();\n return this.jsxParseElementAt(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 | null): 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 this.jsxReadToken();\n return;\n }\n\n if (context === tc.j_oTag || context === tc.j_cTag) {\n if (isIdentifierStart(code)) {\n this.jsxReadWord();\n return;\n }\n\n if (code === charCodes.greaterThan) {\n ++this.state.pos;\n this.finishToken(tt.jsxTagEnd);\n return;\n }\n\n if (\n (code === charCodes.quotationMark || code === charCodes.apostrophe) &&\n context === tc.j_oTag\n ) {\n this.jsxReadString(code);\n return;\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 this.finishToken(tt.jsxTagStart);\n return;\n }\n\n 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","import type { Position } from \"../../util/location\";\nimport ScopeHandler, { Scope } from \"../../util/scope\";\nimport {\n BindingFlag,\n ScopeFlag,\n type BindingTypes,\n} from \"../../util/scopeflags\";\nimport type * as N from \"../../types\";\nimport { Errors } from \"../../parse-error\";\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 importsStack: Set<string>[] = [];\n\n createScope(flags: ScopeFlag): TypeScriptScope {\n this.importsStack.push(new Set()); // Always keep the top-level scope for export checks.\n\n return new TypeScriptScope(flags);\n }\n\n enter(flags: ScopeFlag): void {\n if (flags == ScopeFlag.TS_MODULE) {\n this.importsStack.push(new Set());\n }\n\n super.enter(flags);\n }\n\n exit() {\n const flags = super.exit();\n\n if (flags == ScopeFlag.TS_MODULE) {\n this.importsStack.pop();\n }\n\n return flags;\n }\n\n hasImport(name: string, allowShadow?: boolean) {\n const len = this.importsStack.length;\n if (this.importsStack[len - 1].has(name)) {\n return true;\n }\n if (!allowShadow && len > 1) {\n for (let i = 0; i < len - 1; i++) {\n if (this.importsStack[i].has(name)) return true;\n }\n }\n return false;\n }\n\n declareName(name: string, bindingType: BindingTypes, loc: Position) {\n if (bindingType & BindingFlag.FLAG_TS_IMPORT) {\n if (this.hasImport(name, true)) {\n this.parser.raise(Errors.VarRedeclaration, {\n at: loc,\n identifierName: name,\n });\n }\n this.importsStack[this.importsStack.length - 1].add(name);\n return;\n }\n\n const scope = this.currentScope();\n if (bindingType & BindingFlag.FLAG_TS_EXPORT_ONLY) {\n this.maybeExportDefined(scope, name);\n scope.exportOnlyBindings.add(name);\n return;\n }\n\n super.declareName(name, bindingType, loc);\n\n if (bindingType & BindingFlag.KIND_TYPE) {\n if (!(bindingType & BindingFlag.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 & BindingFlag.FLAG_TS_ENUM) scope.enums.add(name);\n if (bindingType & BindingFlag.FLAG_TS_CONST_ENUM) {\n scope.constEnums.add(name);\n }\n if (bindingType & BindingFlag.FLAG_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 & BindingFlag.FLAG_TS_ENUM) {\n // Enums can be merged with other enums if they are both\n // const or both non-const.\n const isConst = !!(bindingType & BindingFlag.FLAG_TS_CONST_ENUM);\n const wasConst = scope.constEnums.has(name);\n return isConst !== wasConst;\n }\n return true;\n }\n if (bindingType & BindingFlag.FLAG_CLASS && scope.classes.has(name)) {\n if (scope.lexical.has(name)) {\n // Classes can be merged with interfaces\n return !!(bindingType & BindingFlag.KIND_VALUE);\n } else {\n // Interface can be merged with other classes or interfaces\n return false;\n }\n }\n if (bindingType & BindingFlag.KIND_TYPE && scope.types.has(name)) {\n return true;\n }\n\n return super.isRedeclaredInScope(scope, name, bindingType);\n }\n\n checkLocalExport(id: N.Identifier) {\n const { name } = id;\n\n if (this.hasImport(name)) return;\n\n const len = this.scopeStack.length;\n for (let i = len - 1; i >= 0; i--) {\n const scope = this.scopeStack[i];\n if (scope.types.has(name) || scope.exportOnlyBindings.has(name)) return;\n }\n\n super.checkLocalExport(id);\n }\n}\n","import * as charCodes from \"charcodes\";\nimport { tt, type TokenType } from \"../tokenizer/types\";\nimport type {\n AssignmentPattern,\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 ArrayExpression,\n ArrayPattern,\n} from \"../types\";\nimport type { Pos, Position } from \"../util/location\";\nimport {\n isStrictBindOnlyReservedWord,\n isStrictBindReservedWord,\n} from \"../util/identifier\";\nimport { NodeUtils, type Undone } from \"./node\";\nimport { type BindingTypes, BindingFlag } from \"../util/scopeflags\";\nimport type { ExpressionErrors } from \"./util\";\nimport { Errors, type LValAncestor } from \"../parse-error\";\nimport type Parser from \"./index\";\n\nconst getOwn = <T extends {}>(object: T, key: keyof T) =>\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 const enum ParseBindingListFlags {\n ALLOW_EMPTY = 1 << 0,\n IS_FUNCTION_PARAMS = 1 << 1,\n IS_CONSTRUCTOR_PARAMS = 1 << 2,\n}\n\nexport default abstract class LValParser extends NodeUtils {\n // Forward-declaration: defined in expression.js\n abstract parseIdentifier(liberal?: boolean): Identifier;\n abstract parseMaybeAssign(\n refExpressionErrors?: ExpressionErrors | null,\n afterLeftParse?: Function,\n refNeedsArrowPos?: Pos | null,\n ): Expression;\n\n abstract parseMaybeAssignAllowIn(\n refExpressionErrors?: ExpressionErrors | null,\n afterLeftParse?: Function,\n refNeedsArrowPos?: Pos | null,\n ): Expression;\n\n abstract parseObjectLike<T extends ObjectPattern | ObjectExpression>(\n close: TokenType,\n isPattern: boolean,\n isRecord?: boolean,\n refExpressionErrors?: ExpressionErrors,\n ): T;\n abstract parseObjPropValue(\n prop: any,\n startLoc: Position | null,\n isGenerator: boolean,\n isAsync: boolean,\n isPattern: boolean,\n isAccessor: boolean,\n refExpressionErrors?: ExpressionErrors | null,\n ): void;\n abstract parsePropertyName(\n prop: ObjectOrClassMember | ClassMember | TsNamedTypeElementBase,\n ): Expression | Identifier;\n abstract parsePrivateName(): PrivateName;\n // Forward-declaration: defined in statement.js\n abstract parseDecorator(): Decorator;\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 The expression atom\n * @param isLHS Whether we are parsing a LeftHandSideExpression.\n * If isLHS is `true`, the following cases are allowed: `[(a)] = [0]`, `[(a.b)] = [0]`\n * If isLHS is `false`, we are in an arrow function parameters list.\n */\n toAssignable(node: Node, isLHS: boolean = false): void {\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 `recordArrowParameterBindingError` signature in packages/babel-parser/src/util/expression-scope.js\n if (parenthesized.type === \"Identifier\") {\n this.expressionScope.recordArrowParameterBindingError(\n Errors.InvalidParenthesizedAssignment,\n { at: node },\n );\n } else if (parenthesized.type !== \"MemberExpression\") {\n // A parenthesized member expression can be in LHS but not in pattern.\n // If the LHS is later interpreted as a pattern, `checkLVal` will throw for member expression binding\n // i.e. `([(a.b) = []] = []) => {}`\n this.raise(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 throw new Error(\n \"Internal @babel/parser error (this is a bug, please report it).\" +\n \" SpreadElement should be converted by .toAssignable's caller.\",\n );\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 }\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\") {\n prop.type = \"RestElement\";\n const arg = prop.argument;\n this.checkToRestConversion(arg, /* allowPattern */ false);\n this.toAssignable(arg, isLHS);\n\n if (!isLast) {\n this.raise(Errors.RestTrailingComma, { at: prop });\n }\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 | undefined | null,\n isLHS: boolean,\n ): void {\n const end = exprList.length - 1;\n\n for (let i = 0; i <= end; i++) {\n const elt = exprList[i];\n if (!elt) continue;\n\n if (elt.type === \"SpreadElement\") {\n elt.type = \"RestElement\";\n const arg = elt.argument;\n this.checkToRestConversion(arg, /* allowPattern */ true);\n this.toAssignable(arg, isLHS);\n } else {\n this.toAssignable(elt, isLHS);\n }\n\n if (elt.type === \"RestElement\") {\n if (i < end) {\n this.raise(Errors.RestTrailingComma, { at: elt });\n } else if (trailingCommaLoc) {\n this.raise(Errors.RestTrailingComma, { at: trailingCommaLoc });\n }\n }\n }\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 as ObjectExpression[\"properties\"]).every(\n (prop, i) => {\n return (\n prop.type !== \"ObjectMethod\" &&\n (i === last || prop.type !== \"SpreadElement\") &&\n this.isAssignable(prop)\n );\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 as ArrayExpression).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 | undefined | null>,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n isParenthesizedExpr?: boolean,\n ): ReadonlyArray<Expression | undefined | null> {\n return exprList;\n }\n\n toReferencedListDeep(\n exprList: ReadonlyArray<Expression | undefined | null>,\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 this: Parser,\n refExpressionErrors?: ExpressionErrors | null,\n ): SpreadElement {\n const node = this.startNode<SpreadElement>();\n this.next();\n node.argument = this.parseMaybeAssignAllowIn(\n refExpressionErrors,\n undefined,\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(this: Parser): RestElement {\n const node = this.startNode<RestElement>();\n this.next(); // eat `...`\n node.argument = this.parseBindingAtom();\n return this.finishNode(node, \"RestElement\");\n }\n\n // Parses lvalue (assignable) atom.\n parseBindingAtom(this: Parser): Pattern {\n // https://tc39.es/ecma262/#prod-BindingPattern\n switch (this.state.type) {\n case tt.bracketL: {\n const node = this.startNode<ArrayPattern>();\n this.next();\n // @ts-expect-error: Fixme: TSParameterProperty can not be assigned to node.elements\n node.elements = this.parseBindingList(\n tt.bracketR,\n charCodes.rightSquareBracket,\n ParseBindingListFlags.ALLOW_EMPTY,\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 this: Parser,\n close: TokenType,\n closeCharCode: (typeof charCodes)[keyof typeof charCodes],\n flags: ParseBindingListFlags,\n ): Array<Pattern | TSParameterProperty> {\n const allowEmpty = flags & ParseBindingListFlags.ALLOW_EMPTY;\n\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 elts.push(null);\n } else if (this.eat(close)) {\n break;\n } else if (this.match(tt.ellipsis)) {\n elts.push(\n this.parseAssignableListItemTypes(this.parseRestBinding(), flags),\n );\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(flags, decorators));\n }\n }\n return elts;\n }\n\n // https://tc39.es/ecma262/#prod-BindingRestProperty\n parseBindingRestProperty(\n this: Parser,\n prop: Undone<RestElement>,\n ): 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(this: Parser): ObjectMember | RestElement {\n const prop = this.startNode<ObjectMember | RestElement>();\n const { type, startLoc } = this.state;\n if (type === tt.ellipsis) {\n return this.parseBindingRestProperty(prop as Undone<RestElement>);\n } else if (type === tt.privateName) {\n this.expectPlugin(\"destructuringPrivate\", startLoc);\n this.classScope.usePrivateName(this.state.value, startLoc);\n (prop as Undone<ObjectMember>).key = this.parsePrivateName();\n } else {\n this.parsePropertyName(prop as Undone<ObjectMember>);\n }\n (prop as Undone<ObjectMember>).method = false;\n return this.parseObjPropValue(\n prop as Undone<ObjectMember>,\n startLoc,\n false /* isGenerator */,\n false /* isAsync */,\n true /* isPattern */,\n false /* isAccessor */,\n );\n }\n\n parseAssignableListItem(\n this: Parser,\n flags: ParseBindingListFlags,\n decorators: Decorator[],\n ): Pattern | TSParameterProperty {\n const left = this.parseMaybeDefault();\n this.parseAssignableListItemTypes(left, flags);\n const elt = this.parseMaybeDefault(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(\n param: Pattern,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n flags: ParseBindingListFlags,\n ): 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 this: Parser,\n startLoc?: Position | null,\n left?: Pattern | null,\n ): Pattern {\n startLoc ??= this.state.startLoc;\n left = left ?? this.parseBindingAtom();\n if (!this.eat(tt.eq)) return left;\n\n const node = this.startNodeAt<AssignmentPattern>(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 its descendants must be subsequently 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 type A Node `type` string\n * @param isUnparenthesizedInAssign\n * Whether the node in question is unparenthesized and its parent\n * is either an assignment pattern or an assignment expression.\n * @param binding\n * The binding operation that is being considered for this potential\n * LVal.\n * @returns `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 isValidLVal(\n type: string,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n isUnparenthesizedInAssign: boolean,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n binding: BindingTypes,\n ): string | boolean {\n return getOwn(\n {\n AssignmentPattern: \"left\",\n RestElement: \"argument\",\n ObjectProperty: \"value\",\n ParenthesizedExpression: \"expression\",\n ArrayPattern: \"elements\",\n ObjectPattern: \"properties\",\n },\n // @ts-expect-error refine string to enum\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 The expression in question to check.\n * @param options A set of options described below.\n * @param options.in\n * The relevant ancestor to provide context information for the error\n * if the check fails.\n * @param options.binding\n * The desired binding type. If the given expression is an identifier\n * and `binding` is not `BindingFlag.TYPE_NONE`, `checkLVal` will register binding\n * to the parser scope See also `src/util/scopeflags.js`\n * @param options.checkClashes\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 options.strictModeChanged\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 options.hasParenthesizedAncestor\n * This is only used internally during recursive calls, and you should\n * not have to set it yourself.\n */\n\n checkLVal(\n expression: Expression | ObjectMember | RestElement,\n {\n in: ancestor,\n binding = BindingFlag.TYPE_NONE,\n checkClashes = false,\n strictModeChanged = false,\n hasParenthesizedAncestor = false,\n }: {\n in: LValAncestor;\n binding?: BindingTypes;\n checkClashes?: Set<string> | false;\n strictModeChanged?: 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 !== BindingFlag.TYPE_NONE) {\n this.raise(Errors.InvalidPropertyBindingPattern, { at: expression });\n }\n return;\n }\n\n if (type === \"Identifier\") {\n this.checkIdentifier(\n expression as Identifier,\n binding,\n strictModeChanged,\n );\n\n const { name } = expression as Identifier;\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 type,\n !(hasParenthesizedAncestor || expression.extra?.parenthesized) &&\n ancestor.type === \"AssignmentExpression\",\n binding,\n );\n\n if (validity === true) return;\n if (validity === false) {\n const ParseErrorClass =\n binding === BindingFlag.TYPE_NONE\n ? Errors.InvalidLhs\n : Errors.InvalidLhsBinding;\n\n this.raise(ParseErrorClass, { at: expression, ancestor });\n return;\n }\n\n const [key, isParenthesizedExpression] = Array.isArray(validity)\n ? validity\n : [validity, type === \"ParenthesizedExpression\"];\n const nextAncestor =\n type === \"ArrayPattern\" ||\n type === \"ObjectPattern\" ||\n type === \"ParenthesizedExpression\"\n ? ({ type } as const)\n : ancestor;\n\n // @ts-expect-error key may not index expression.\n for (const child of [].concat(expression[key])) {\n if (child) {\n this.checkLVal(child, {\n in: nextAncestor,\n binding,\n checkClashes,\n strictModeChanged,\n hasParenthesizedAncestor: isParenthesizedExpression,\n });\n }\n }\n }\n\n checkIdentifier(\n at: Identifier,\n bindingType: BindingTypes,\n strictModeChanged: boolean = false,\n ) {\n if (\n this.state.strict &&\n (strictModeChanged\n ? isStrictBindReservedWord(at.name, this.inModule)\n : isStrictBindOnlyReservedWord(at.name))\n ) {\n if (bindingType === BindingFlag.TYPE_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 (bindingType & BindingFlag.FLAG_NO_LET_IN_LEXICAL && at.name === \"let\") {\n this.raise(Errors.LetInLexicalBinding, { at });\n }\n\n if (!(bindingType & BindingFlag.TYPE_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: Node, allowPattern: boolean): void {\n switch (node.type) {\n case \"ParenthesizedExpression\":\n this.checkToRestConversion(node.expression, allowPattern);\n break;\n case \"Identifier\":\n case \"MemberExpression\":\n break;\n case \"ArrayExpression\":\n case \"ObjectExpression\":\n if (allowPattern) break;\n /* falls through */\n default:\n this.raise(Errors.InvalidRestAssignmentPattern, { at: node });\n }\n }\n\n checkCommaAfterRest(\n close: (typeof charCodes)[keyof typeof charCodes],\n ): 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","/*:: 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 tokenCanStartExpression,\n} from \"../../tokenizer/types\";\nimport { types as tc } from \"../../tokenizer/context\";\nimport type * as N from \"../../types\";\nimport type { Position } from \"../../util/location\";\nimport { createPositionWithColumnOffset } from \"../../util/location\";\nimport type Parser from \"../../parser\";\nimport {\n type BindingTypes,\n ScopeFlag,\n BindingFlag,\n} from \"../../util/scopeflags\";\nimport TypeScriptScopeHandler from \"./scope\";\nimport * as charCodes from \"charcodes\";\nimport type { ExpressionErrors } from \"../../parser/util\";\nimport type { ParseStatementFlag } from \"../../parser/statement\";\nimport { PARAM } from \"../../util/production-parameter\";\nimport { Errors, ParseErrorEnum } from \"../../parse-error\";\nimport { cloneIdentifier, type Undone } from \"../../parser/node\";\nimport type { Pattern } from \"../../types\";\nimport type { Expression } from \"../../types\";\nimport type { IJSXParserMixin } from \"../jsx\";\nimport { ParseBindingListFlags } from \"../../parser/lval\";\n\nconst getOwn = <T extends {}>(object: T, key: keyof T) =>\n Object.hasOwnProperty.call(object, key) && object[key];\n\ntype TsModifier =\n | \"readonly\"\n | \"abstract\"\n | \"declare\"\n | \"static\"\n | \"override\"\n | \"const\"\n | N.Accessibility\n | N.VarianceAnnotations;\n\nfunction nonNull<T>(x?: T | null): T {\n if (x == null) {\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\ntype ModifierBase = {\n accessibility?: N.Accessibility;\n} & {\n [key in TsModifier]?: boolean | undefined | null;\n};\n\n/* eslint sort-keys: \"error\" */\nconst TSErrors = ParseErrorEnum`typescript`({\n AbstractMethodHasImplementation: ({ methodName }: { methodName: string }) =>\n `Method '${methodName}' cannot have an implementation because it is marked abstract.`,\n AbstractPropertyHasInitializer: ({\n propertyName,\n }: {\n propertyName: string;\n }) =>\n `Property '${propertyName}' cannot have an initializer because it is marked abstract.`,\n // TODO: Accesor -> Accessor\n AccesorCannotDeclareThisParameter:\n \"'get' and 'set' accessors cannot declare 'this' parameters.\",\n AccesorCannotHaveTypeParameters: \"An accessor cannot have type parameters.\",\n AccessorCannotBeOptional:\n \"An 'accessor' property cannot be declared optional.\",\n ClassMethodHasDeclare: \"Class methods cannot have the 'declare' modifier.\",\n ClassMethodHasReadonly: \"Class methods cannot have the 'readonly' modifier.\",\n ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumReference:\n \"A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference.\",\n ConstructorHasTypeParameters:\n \"Type parameters cannot appear on a constructor declaration.\",\n DeclareAccessor: ({ kind }: { kind: \"get\" | \"set\" }) =>\n `'declare' is not allowed in ${kind}ters.`,\n DeclareClassFieldHasInitializer:\n \"Initializers are not allowed in ambient contexts.\",\n DeclareFunctionHasImplementation:\n \"An implementation cannot be declared in ambient contexts.\",\n DuplicateAccessibilityModifier:\n // `Accessibility modifier already seen: ${modifier}` would be more helpful.\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n ({ modifier }: { modifier: N.Accessibility }) =>\n `Accessibility modifier already seen.`,\n DuplicateModifier: ({ modifier }: { modifier: TsModifier }) =>\n `Duplicate modifier: '${modifier}'.`,\n // `token` matches the terminology used by typescript:\n // https://github.com/microsoft/TypeScript/blob/main/src/compiler/types.ts#L2915\n EmptyHeritageClauseType: ({ token }: { token: \"extends\" | \"implements\" }) =>\n `'${token}' list cannot be empty.`,\n EmptyTypeArguments: \"Type argument list cannot be empty.\",\n EmptyTypeParameters: \"Type parameter list cannot be empty.\",\n ExpectedAmbientAfterExportDeclare:\n \"'export declare' must be followed by an ambient declaration.\",\n ImportAliasHasImportType: \"An import alias can not use 'import type'.\",\n ImportReflectionHasImportType:\n \"An `import module` declaration can not use `type` modifier\",\n IncompatibleModifiers: ({\n modifiers,\n }: {\n modifiers: [TsModifier, TsModifier];\n }) =>\n `'${modifiers[0]}' modifier cannot be used with '${modifiers[1]}' modifier.`,\n IndexSignatureHasAbstract:\n \"Index signatures cannot have the 'abstract' modifier.\",\n IndexSignatureHasAccessibility: ({\n modifier,\n }: {\n modifier: N.Accessibility;\n }) =>\n `Index signatures cannot have an accessibility modifier ('${modifier}').`,\n IndexSignatureHasDeclare:\n \"Index signatures cannot have the 'declare' modifier.\",\n IndexSignatureHasOverride:\n \"'override' modifier cannot appear on an index signature.\",\n IndexSignatureHasStatic:\n \"Index signatures cannot have the 'static' modifier.\",\n InitializerNotAllowedInAmbientContext:\n \"Initializers are not allowed in ambient contexts.\",\n InvalidModifierOnTypeMember: ({ modifier }: { modifier: TsModifier }) =>\n `'${modifier}' modifier cannot appear on a type member.`,\n InvalidModifierOnTypeParameter: ({ modifier }: { modifier: TsModifier }) =>\n `'${modifier}' modifier cannot appear on a type parameter.`,\n InvalidModifierOnTypeParameterPositions: ({\n modifier,\n }: {\n modifier: TsModifier;\n }) =>\n `'${modifier}' modifier can only appear on a type parameter of a class, interface or type alias.`,\n InvalidModifiersOrder: ({\n orderedModifiers,\n }: {\n orderedModifiers: [TsModifier, TsModifier];\n }) =>\n `'${orderedModifiers[0]}' modifier must precede '${orderedModifiers[1]}' modifier.`,\n InvalidPropertyAccessAfterInstantiationExpression:\n \"Invalid property access after an instantiation expression. \" +\n \"You can either wrap the instantiation expression in parentheses, or delete the type arguments.\",\n InvalidTupleMemberLabel:\n \"Tuple members must be labeled with a simple identifier.\",\n MissingInterfaceName:\n \"'interface' declarations must be followed by an identifier.\",\n MixedLabeledAndUnlabeledElements:\n \"Tuple members must all have names or all not have names.\",\n NonAbstractClassHasAbstractMethod:\n \"Abstract methods can only appear within an abstract class.\",\n NonClassMethodPropertyHasAbstractModifer:\n \"'abstract' modifier can only appear on a class, method, or property declaration.\",\n OptionalTypeBeforeRequired:\n \"A required element cannot follow an optional element.\",\n OverrideNotInSubClass:\n \"This member cannot have an 'override' modifier because its containing class does not extend another class.\",\n PatternIsOptional:\n \"A binding pattern parameter cannot be optional in an implementation signature.\",\n PrivateElementHasAbstract:\n \"Private elements cannot have the 'abstract' modifier.\",\n PrivateElementHasAccessibility: ({\n modifier,\n }: {\n modifier: N.Accessibility;\n }) =>\n `Private elements cannot have an accessibility modifier ('${modifier}').`,\n ReadonlyForMethodSignature:\n \"'readonly' modifier can only appear on a property declaration or index signature.\",\n ReservedArrowTypeParam:\n \"This syntax is reserved in files with the .mts or .cts extension. Add a trailing comma, as in `<T,>() => ...`.\",\n ReservedTypeAssertion:\n \"This syntax is reserved in files with the .mts or .cts extension. Use an `as` expression instead.\",\n // TODO: Accesor -> Accessor\n SetAccesorCannotHaveOptionalParameter:\n \"A 'set' accessor cannot have an optional parameter.\",\n SetAccesorCannotHaveRestParameter:\n \"A 'set' accessor cannot have rest parameter.\",\n SetAccesorCannotHaveReturnType:\n \"A 'set' accessor cannot have a return type annotation.\",\n SingleTypeParameterWithoutTrailingComma: ({\n typeParameterName,\n }: {\n typeParameterName: string;\n }) =>\n `Single type parameter ${typeParameterName} should have a trailing comma. Example usage: <${typeParameterName},>.`,\n StaticBlockCannotHaveModifier:\n \"Static class blocks cannot have any modifier.\",\n TupleOptionalAfterType:\n \"A labeled tuple optional element must be declared using a question mark after the name and before the colon (`name?: type`), rather than after the type (`name: type?`).\",\n TypeAnnotationAfterAssign:\n \"Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.\",\n TypeImportCannotSpecifyDefaultAndNamed:\n \"A type-only import can specify a default import or named bindings, but not both.\",\n TypeModifierIsUsedInTypeExports:\n \"The 'type' modifier cannot be used on a named export when 'export type' is used on its export statement.\",\n TypeModifierIsUsedInTypeImports:\n \"The 'type' modifier cannot be used on a named import when 'import type' is used on its import statement.\",\n UnexpectedParameterModifier:\n \"A parameter property is only allowed in a constructor implementation.\",\n UnexpectedReadonly:\n \"'readonly' type modifier is only permitted on array and tuple literal types.\",\n UnexpectedTypeAnnotation: \"Did not expect a type annotation here.\",\n UnexpectedTypeCastInParameter: \"Unexpected type cast in parameter position.\",\n UnsupportedImportTypeArgument:\n \"Argument in a type import must be a string literal.\",\n UnsupportedParameterPropertyKind:\n \"A parameter property may not be declared using a binding pattern.\",\n UnsupportedSignatureParameterKind: ({ type }: { type: string }) =>\n `Name in a signature must be an Identifier, ObjectPattern or ArrayPattern, instead got ${type}.`,\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(value: string): N.TsKeywordTypeType | 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): modifier is N.Accessibility {\n return (\n modifier === \"private\" || modifier === \"public\" || modifier === \"protected\"\n );\n}\n\nfunction tsIsVarianceAnnotations(\n modifier: string,\n): modifier is N.VarianceAnnotations {\n return modifier === \"in\" || modifier === \"out\";\n}\n\ntype ClassWithMixin<\n T extends new (...args: any) => any,\n M extends object,\n> = T extends new (...args: infer P) => infer I\n ? new (...args: P) => I & M\n : never;\n\nexport default (superClass: ClassWithMixin<typeof Parser, IJSXParserMixin>) =>\n class TypeScriptParserMixin extends superClass implements Parser {\n getScopeHandler(): {\n new (...args: any): TypeScriptScopeHandler;\n } {\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 extends TsModifier>(\n allowedModifiers: T[],\n stopOnStartOfClassStaticBlock?: boolean,\n ): T | undefined | null {\n if (\n !tokenIsIdentifier(this.state.type) &&\n this.state.type !== tt._in &&\n this.state.type !== tt._const\n ) {\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 extends ModifierBase>(\n {\n allowedModifiers,\n disallowedModifiers,\n stopOnStartOfClassStaticBlock,\n errorTemplate = TSErrors.InvalidModifierOnTypeMember,\n }: {\n allowedModifiers: readonly TsModifier[];\n disallowedModifiers?: TsModifier[];\n stopOnStartOfClassStaticBlock?: boolean;\n errorTemplate?: typeof TSErrors.InvalidModifierOnTypeMember;\n },\n modified: N,\n ): void {\n const enforceOrder = (\n loc: Position,\n modifier: TsModifier,\n before: TsModifier,\n after: TsModifier,\n ) => {\n if (modifier === before && modified[after]) {\n this.raise(TSErrors.InvalidModifiersOrder, {\n at: loc,\n orderedModifiers: [before, after],\n });\n }\n };\n const incompatible = (\n loc: Position,\n modifier: TsModifier,\n mod1: TsModifier,\n mod2: TsModifier,\n ) => {\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 | undefined | null = 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 if (tsIsVarianceAnnotations(modifier)) {\n if (modified[modifier]) {\n this.raise(TSErrors.DuplicateModifier, { at: startLoc, modifier });\n }\n modified[modifier] = true;\n\n enforceOrder(startLoc, modifier, \"in\", \"out\");\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(errorTemplate, {\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\n tsParseList<T extends N.Node>(\n kind: ParsingContext,\n parseElement: () => T,\n ): 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 extends N.Node>(\n kind: ParsingContext,\n parseElement: () => T,\n refTrailingCommaPos?: {\n value: number;\n },\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 extends N.Node>(\n kind: ParsingContext,\n parseElement: () => T | undefined | null,\n expectSuccess: boolean,\n refTrailingCommaPos?: {\n value: number;\n },\n ): T[] | undefined | null {\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 extends N.Node>(\n kind: ParsingContext,\n parseElement: () => T,\n bracket: boolean,\n skipFirstToken: boolean,\n refTrailingCommaPos?: {\n value: number;\n },\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 = this.startNode<N.TsImportType>();\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 = super.parseExprAtom() as N.StringLiteral;\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: Undone<N.TsQualifiedName> =\n this.startNodeAtNode<N.TsQualifiedName>(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 = this.startNode<N.TsTypeReference>();\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 = this.startNodeAtNode<N.TsTypePredicate>(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 = this.startNode<N.TsThisType>();\n this.next();\n return this.finishNode(node, \"TSThisType\");\n }\n\n tsParseTypeQuery(): N.TsTypeQuery {\n const node = this.startNode<N.TsTypeQuery>();\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 if (!this.hasPrecedingLineBreak() && this.match(tt.lt)) {\n node.typeParameters = this.tsParseTypeArguments();\n }\n return this.finishNode(node, \"TSTypeQuery\");\n }\n\n tsParseInOutModifiers = this.tsParseModifiers.bind(this, {\n allowedModifiers: [\"in\", \"out\"],\n disallowedModifiers: [\n \"const\",\n \"public\",\n \"private\",\n \"protected\",\n \"readonly\",\n \"declare\",\n \"abstract\",\n \"override\",\n ],\n errorTemplate: TSErrors.InvalidModifierOnTypeParameter,\n });\n\n tsParseConstModifier = this.tsParseModifiers.bind(this, {\n allowedModifiers: [\"const\"],\n // for better error recovery\n disallowedModifiers: [\"in\", \"out\"],\n errorTemplate: TSErrors.InvalidModifierOnTypeParameterPositions,\n });\n\n tsParseInOutConstModifiers = this.tsParseModifiers.bind(this, {\n allowedModifiers: [\"in\", \"out\", \"const\"],\n disallowedModifiers: [\n \"public\",\n \"private\",\n \"protected\",\n \"readonly\",\n \"declare\",\n \"abstract\",\n \"override\",\n ],\n errorTemplate: TSErrors.InvalidModifierOnTypeParameter,\n });\n\n tsParseTypeParameter(\n parseModifiers: (node: Undone<N.TsTypeParameter>) => void,\n ): N.TsTypeParameter {\n const node = this.startNode<N.TsTypeParameter>();\n\n parseModifiers(node);\n\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 parseModifiers: (node: N.TsTypeParameter) => void,\n ): N.TsTypeParameterDeclaration | undefined | null {\n if (this.match(tt.lt)) {\n return this.tsParseTypeParameters(parseModifiers);\n }\n }\n\n tsParseTypeParameters(parseModifiers: (node: N.TsTypeParameter) => void) {\n const node = this.startNode<N.TsTypeParameterDeclaration>();\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 // @ts-expect-error refine typings\n this.tsParseTypeParameter.bind(this, parseModifiers),\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 // 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: Undone<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.tsParseConstModifier,\n );\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(): Array<\n N.Identifier | N.RestElement | N.ObjectPattern | N.ArrayPattern\n > {\n const list = super.parseBindingList(\n tt.parenR,\n charCodes.rightParenthesis,\n ParseBindingListFlags.IS_FUNCTION_PARAMS,\n );\n for (const pattern of list) {\n const { type } = pattern;\n if (type === \"AssignmentPattern\" || type === \"TSParameterProperty\") {\n this.raise(TSErrors.UnsupportedSignatureParameterKind, {\n at: pattern,\n type,\n });\n }\n }\n return list as Exclude<\n (typeof list)[0],\n N.AssignmentPattern | N.TSParameterProperty\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: Undone<\n N.TsCallSignatureDeclaration | N.TsConstructSignatureDeclaration\n >,\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(\n node: Undone<N.TsIndexSignature>,\n ): N.TsIndexSignature | undefined {\n if (\n !(\n this.match(tt.bracketL) &&\n this.tsLookAhead(this.tsIsUnambiguouslyIndexSignature.bind(this))\n )\n ) {\n return;\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 = this.startNode<N.Identifier>();\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 {\n allowedModifiers: [\"readonly\"],\n disallowedModifiers: [\n \"declare\",\n \"abstract\",\n \"private\",\n \"protected\",\n \"public\",\n \"static\",\n \"override\",\n ],\n },\n node,\n );\n\n const idx = this.tsTryParseIndexSignature(node);\n if (idx) {\n return idx;\n }\n\n super.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 super.parsePropertyName(node);\n }\n return this.tsParsePropertyOrMethodSignature(node, !!node.readonly);\n }\n\n tsParseTypeLiteral(): N.TsTypeLiteral {\n const node = this.startNode<N.TsTypeLiteral>();\n node.members = this.tsParseObjectTypeMembers();\n return this.finishNode(node, \"TSTypeLiteral\");\n }\n\n tsParseObjectTypeMembers(): Array<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 = this.startNode<N.TsTypeParameter>();\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 = this.startNode<N.TsMappedType>();\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 = this.startNode<N.TsTupleType>();\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: boolean | null = null;\n node.elementTypes.forEach(elementNode => {\n const { 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 seenOptionalElement ||=\n (type === \"TSNamedTupleMember\" && elementNode.optional) ||\n type === \"TSOptionalType\";\n\n // When checking labels, check the argument of the spread operator\n let checkType = type;\n if (type === \"TSRestType\") {\n elementNode = elementNode.typeAnnotation;\n checkType = elementNode.type;\n }\n\n const isLabeled = checkType === \"TSNamedTupleMember\";\n 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.TsNamedTupleMember | N.TsType {\n // parses `...TsType[]`\n\n const { startLoc } = this.state;\n\n const rest = this.eat(tt.ellipsis);\n\n let labeled: boolean;\n let label: N.Identifier;\n let optional: boolean;\n let type: N.TsNamedTupleMember | N.TsType;\n\n const isWord = tokenIsKeywordOrIdentifier(this.state.type);\n const chAfterWord = isWord ? this.lookaheadCharCode() : null;\n if (chAfterWord === charCodes.colon) {\n labeled = true;\n optional = false;\n label = this.parseIdentifier(true);\n this.expect(tt.colon);\n type = this.tsParseType();\n } else if (chAfterWord === charCodes.questionMark) {\n optional = true;\n const startLoc = this.state.startLoc;\n const wordName = this.state.value;\n const typeOrLabel = this.tsParseNonArrayType();\n\n if (this.lookaheadCharCode() === charCodes.colon) {\n labeled = true;\n label = this.createIdentifier(\n this.startNodeAt<N.Identifier>(startLoc),\n wordName,\n );\n this.expect(tt.question);\n this.expect(tt.colon);\n type = this.tsParseType();\n } else {\n labeled = false;\n type = typeOrLabel;\n this.expect(tt.question);\n }\n } else {\n type = this.tsParseType();\n optional = this.eat(tt.question);\n // In this case (labeled === true) could be only in invalid label.\n // E.g. [x.y:type]\n // An error is raised while processing node.\n labeled = this.eat(tt.colon);\n }\n\n if (labeled) {\n let labeledNode: Undone<N.TsNamedTupleMember>;\n if (label) {\n labeledNode = this.startNodeAtNode<N.TsNamedTupleMember>(label);\n labeledNode.optional = optional;\n labeledNode.label = label;\n labeledNode.elementType = type;\n\n if (this.eat(tt.question)) {\n labeledNode.optional = true;\n this.raise(TSErrors.TupleOptionalAfterType, {\n at: this.state.lastTokStartLoc,\n });\n }\n } else {\n labeledNode = this.startNodeAtNode<N.TsNamedTupleMember>(type);\n labeledNode.optional = optional;\n this.raise(TSErrors.InvalidTupleMemberLabel, { at: type });\n // @ts-expect-error This produces an invalid AST, but at least we don't drop\n // nodes representing the invalid source.\n labeledNode.label = type;\n labeledNode.elementType = this.tsParseType();\n }\n type = this.finishNode(labeledNode, \"TSNamedTupleMember\");\n } else if (optional) {\n const optionalTypeNode = this.startNodeAtNode<N.TsOptionalType>(type);\n optionalTypeNode.typeAnnotation = type;\n type = this.finishNode(optionalTypeNode, \"TSOptionalType\");\n }\n\n if (rest) {\n const restNode = this.startNodeAt<N.TsRestType>(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.TsParenthesizedType>();\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 = this.startNode<\n N.TsFunctionOrConstructorType | N.TsConstructorType\n >();\n if (type === \"TSConstructorType\") {\n (node as Undone<N.TsConstructorType>).abstract = !!abstract;\n if (abstract) this.next();\n this.next(); // eat `new`\n }\n this.tsInAllowConditionalTypesContext(() =>\n this.tsFillSignature(tt.arrow, node),\n );\n return this.finishNode(node, type);\n }\n\n tsParseLiteralTypeNode(): N.TsLiteralType {\n const node = this.startNode<N.TsLiteralType>();\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 // @ts-expect-error refine typings\n node.literal = super.parseExprAtom();\n break;\n default:\n this.unexpected();\n }\n return this.finishNode(node, \"TSLiteralType\");\n }\n\n tsParseTemplateLiteralType(): N.TsType {\n const node = this.startNode<N.TsLiteralType>();\n node.literal = super.parseTemplate(false);\n return this.finishNode(node, \"TSLiteralType\");\n }\n\n parseTemplateSubstitution(): N.TsType | N.Node {\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 = this.startNode<N.TsLiteralType>();\n const nextToken = this.lookahead();\n if (nextToken.type !== tt.num && nextToken.type !== tt.bigint) {\n this.unexpected();\n }\n // @ts-expect-error: parseMaybeUnary must returns unary expression\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 startLoc = this.state.startLoc;\n this.next();\n const type = this.tsParseType();\n this.expect(tt.parenR);\n this.addExtra(type, \"parenthesized\", true);\n this.addExtra(type, \"parenStart\", startLoc.index);\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 = this.startNode<N.TsKeywordType>();\n this.next();\n return this.finishNode(node, nodeType);\n }\n return this.tsParseTypeReference();\n }\n }\n }\n\n 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 = this.startNodeAtNode<N.TsArrayType>(type);\n node.elementType = type;\n this.expect(tt.bracketR);\n type = this.finishNode(node, \"TSArrayType\");\n } else {\n const node = this.startNodeAtNode<N.TsIndexedAccessType>(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 = this.startNode<N.TsTypeOperator>();\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(\n // @ts-expect-error todo(flow->ts)\n node,\n );\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.TsInferType>();\n this.expectContextual(tt._infer);\n const typeParameter = this.startNode<N.TsTypeParameter>();\n typeParameter.name = this.tsParseTypeParameterName();\n typeParameter.constraint = this.tsTryParse(() =>\n this.tsParseConstraintForInferType(),\n );\n node.typeParameter = this.finishNode(typeParameter, \"TSTypeParameter\");\n return this.finishNode(node, \"TSInferType\");\n }\n\n tsParseConstraintForInferType() {\n if (this.eat(tt._extends)) {\n const constraint = this.tsInDisallowConditionalTypesContext(() =>\n this.tsParseType(),\n );\n if (\n this.state.inDisallowConditionalTypesContext ||\n !this.match(tt.question)\n ) {\n return constraint;\n }\n }\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.tsInAllowConditionalTypesContext(() =>\n this.tsParseArrayTypeOrHigher(),\n );\n }\n\n tsParseUnionOrIntersectionType(\n kind: \"TSUnionType\" | \"TSIntersectionType\",\n parseConstituentType: () => N.TsType,\n operator: TokenType,\n ): N.TsType {\n const node = this.startNode<N.TsUnionType | N.TsIntersectionType>();\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 super.parseBindingList(\n tt.bracketR,\n charCodes.rightSquareBracket,\n ParseBindingListFlags.ALLOW_EMPTY,\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 = this.startNode<N.TsTypeAnnotation>();\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 node.asserts = true;\n (node as N.TsTypePredicate).typeAnnotation = null;\n thisTypePredicate = this.finishNode(node, \"TSTypePredicate\");\n } else {\n this.resetStartLocationFromNode(thisTypePredicate, node);\n thisTypePredicate.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 as 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 | undefined {\n if (this.match(tt.colon)) {\n return this.tsParseTypeOrTypePredicateAnnotation(tt.colon);\n }\n }\n\n tsTryParseTypeAnnotation(): N.TsTypeAnnotation | undefined {\n if (this.match(tt.colon)) {\n return this.tsParseTypeAnnotation();\n }\n }\n\n tsTryParseType(): N.TsType | undefined {\n return this.tsEatThenParseType(tt.colon);\n }\n\n tsParseTypePredicatePrefix(): N.Identifier | undefined {\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: Undone<N.TsTypeAnnotation> = this.startNode<N.TsTypeAnnotation>(),\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\n if (\n this.state.inDisallowConditionalTypesContext ||\n this.hasPrecedingLineBreak() ||\n !this.eat(tt._extends)\n ) {\n return type;\n }\n const node = this.startNodeAtNode<N.TsConditionalType>(type);\n node.checkType = type;\n\n node.extendsType = this.tsInDisallowConditionalTypesContext(() =>\n this.tsParseNonConditionalType(),\n );\n\n this.expect(tt.question);\n node.trueType = this.tsInAllowConditionalTypesContext(() =>\n this.tsParseType(),\n );\n\n this.expect(tt.colon);\n node.falseType = this.tsInAllowConditionalTypesContext(() =>\n this.tsParseType(),\n );\n\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 = this.startNode<N.TsTypeAssertion>();\n node.typeAnnotation = this.tsInType(() => {\n this.next(); // \"<\"\n return this.match(tt._const)\n ? this.tsParseTypeReference()\n : this.tsParseType();\n });\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 ): Array<N.TsExpressionWithTypeArguments> {\n const originalStartLoc = this.state.startLoc;\n\n const delimitedList = this.tsParseDelimitedList(\n \"HeritageClauseElement\",\n () => {\n const node = this.startNode<N.TsExpressionWithTypeArguments>();\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\n if (!delimitedList.length) {\n this.raise(TSErrors.EmptyHeritageClauseType, {\n at: originalStartLoc,\n token,\n });\n }\n\n return delimitedList;\n }\n\n tsParseInterfaceDeclaration(\n node: Undone<N.TsInterfaceDeclaration>,\n properties: {\n declare?: true;\n } = {},\n ): N.TsInterfaceDeclaration | null {\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, BindingFlag.TYPE_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 this.tsParseInOutConstModifiers,\n );\n if (this.eat(tt._extends)) {\n node.extends = this.tsParseHeritageClause(\"extends\");\n }\n const body = this.startNode<N.TSInterfaceBody>();\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, BindingFlag.TYPE_TS_TYPE);\n\n node.typeAnnotation = this.tsInType(() => {\n node.typeParameters = this.tsTryParseTypeParameters(\n this.tsParseInOutModifiers,\n );\n\n this.expect(tt.eq);\n\n if (\n this.isContextual(tt._intrinsic) &&\n this.lookahead().type !== tt.dot\n ) {\n const node = this.startNode<N.TsKeywordType>();\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 tsInDisallowConditionalTypesContext<T>(cb: () => T): T {\n const oldInDisallowConditionalTypesContext =\n this.state.inDisallowConditionalTypesContext;\n this.state.inDisallowConditionalTypesContext = true;\n try {\n return cb();\n } finally {\n this.state.inDisallowConditionalTypesContext =\n oldInDisallowConditionalTypesContext;\n }\n }\n\n tsInAllowConditionalTypesContext<T>(cb: () => T): T {\n const oldInDisallowConditionalTypesContext =\n this.state.inDisallowConditionalTypesContext;\n this.state.inDisallowConditionalTypesContext = false;\n try {\n return cb();\n } finally {\n this.state.inDisallowConditionalTypesContext =\n oldInDisallowConditionalTypesContext;\n }\n }\n\n tsEatThenParseType(token: TokenType): N.TsType | undefined {\n if (this.match(token)) {\n return this.tsNextThenParseType();\n }\n }\n\n tsExpectThenParseType(token: TokenType): N.TsType {\n return this.tsInType(() => {\n this.expect(token);\n return this.tsParseType();\n });\n }\n\n tsNextThenParseType(): N.TsType {\n return this.tsInType(() => {\n this.next();\n return this.tsParseType();\n });\n }\n\n tsParseEnumMember(): N.TsEnumMember {\n const node = this.startNode<N.TsEnumMember>();\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 ? super.parseStringLiteral(this.state.value)\n : this.parseIdentifier(/* liberal */ true);\n if (this.eat(tt.eq)) {\n node.initializer = super.parseMaybeAssignAllowIn();\n }\n return this.finishNode(node, \"TSEnumMember\");\n }\n\n tsParseEnumDeclaration(\n node: Undone<N.TsEnumDeclaration>,\n properties: {\n const?: true;\n declare?: true;\n } = {},\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 ? BindingFlag.TYPE_TS_CONST_ENUM : BindingFlag.TYPE_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 = this.startNode<N.TsModuleBlock>();\n this.scope.enter(ScopeFlag.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 super.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: Undone<N.TsModuleDeclaration>,\n nested: boolean = false,\n ): N.TsModuleDeclaration {\n node.id = this.parseIdentifier();\n\n if (!nested) {\n this.checkIdentifier(node.id, BindingFlag.TYPE_TS_NAMESPACE);\n }\n\n if (this.eat(tt.dot)) {\n const inner = this.startNode<N.TsModuleDeclaration>();\n this.tsParseModuleOrNamespaceDeclaration(inner, true);\n // @ts-expect-error Fixme: refine typings\n node.body = inner;\n } else {\n this.scope.enter(ScopeFlag.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 = super.parseStringLiteral(this.state.value);\n } else {\n this.unexpected();\n }\n if (this.match(tt.braceL)) {\n this.scope.enter(ScopeFlag.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: Undone<N.TsImportEqualsDeclaration>,\n maybeDefaultIdentifier?: N.Identifier | null,\n isExport?: boolean,\n ): N.TsImportEqualsDeclaration {\n node.isExport = isExport || false;\n node.id = maybeDefaultIdentifier || this.parseIdentifier();\n this.checkIdentifier(node.id, BindingFlag.TYPE_TS_VALUE_IMPORT);\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 = this.startNode<N.TsExternalModuleReference>();\n this.expectContextual(tt._require);\n this.expect(tt.parenL);\n if (!this.match(tt.string)) {\n this.unexpected();\n }\n // For compatibility to estree we cannot call parseLiteral directly here\n node.expression = super.parseExprAtom() as N.StringLiteral;\n this.expect(tt.parenR);\n this.sawUnambiguousESM = true;\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 extends N.NodeBase | undefined | null>(\n f: () => T,\n ): T | undefined | null {\n const result = this.tryParse(\n abort =>\n // @ts-expect-error todo(flow->ts)\n f() || abort(),\n );\n\n if (result.aborted || !result.node) return;\n if (result.error) this.state = result.failState;\n // @ts-expect-error refine typings\n return result.node;\n }\n\n tsTryParse<T>(f: () => T | undefined | false): T | undefined {\n const state = this.state.clone();\n const result = f();\n if (result !== undefined && result !== false) {\n return result;\n }\n this.state = state;\n }\n\n tsTryParseDeclare(nany: any): N.Declaration | undefined {\n if (this.isLineTerminator()) {\n return;\n }\n let startType = this.state.type;\n let kind: \"let\" | null;\n\n if (this.isContextual(tt._let)) {\n startType = tt._var;\n kind = \"let\";\n }\n\n // @ts-expect-error refine typings\n return this.tsInAmbientContext(() => {\n switch (startType) {\n case tt._function:\n nany.declare = true;\n return super.parseFunctionStatement(\n nany,\n /* async */ false,\n /* isHangingDeclaration */ false,\n );\n case tt._class:\n // While this is also set by tsParseExpressionStatement, we need to set it\n // before parsing the class declaration to 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 case tt._enum:\n return this.tsParseEnumDeclaration(nany, { declare: true });\n case tt._global:\n return this.tsParseAmbientExternalModuleDeclaration(nany);\n case tt._const:\n case tt._var:\n if (!this.match(tt._const) || !this.isLookaheadContextual(\"enum\")) {\n nany.declare = true;\n return this.parseVarStatement(\n nany,\n kind || this.state.value,\n true,\n );\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 case tt._interface: {\n const result = this.tsParseInterfaceDeclaration(nany, {\n declare: true,\n });\n if (result) return result;\n }\n // fallthrough\n default:\n if (tokenIsIdentifier(startType)) {\n return this.tsParseDeclaration(\n nany,\n this.state.value,\n /* next */ true,\n /* decorators */ null,\n );\n }\n }\n });\n }\n\n // Note: this won't be called unless the keyword is allowed in `shouldParseExportDeclaration`.\n tsTryParseExportDeclaration(): N.Declaration | undefined {\n return this.tsParseDeclaration(\n this.startNode(),\n this.state.value,\n /* next */ true,\n /* decorators */ null,\n );\n }\n\n tsParseExpressionStatement(\n node: Undone<N.TsModuleDeclaration>,\n expr: N.Identifier,\n decorators: N.Decorator[] | null,\n ): N.Declaration | undefined {\n switch (expr.name) {\n case \"declare\": {\n const declaration = this.tsTryParseDeclare(node);\n if (declaration) {\n declaration.declare = true;\n }\n return declaration;\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(ScopeFlag.TS_MODULE);\n this.prodParam.enter(PARAM);\n const mod = 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(\n node,\n expr.name,\n /* next */ false,\n decorators,\n );\n }\n }\n\n // Common to tsTryParseDeclare, tsTryParseExportDeclaration, and tsParseExpressionStatement.\n tsParseDeclaration(\n node: any,\n value: string,\n next: boolean,\n decorators: N.Decorator[] | null,\n ): N.Declaration | undefined | null {\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, decorators);\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 startLoc: Position,\n ): N.ArrowFunctionExpression | undefined {\n if (!this.match(tt.lt)) return;\n\n const oldMaybeInArrowParameters = this.state.maybeInArrowParameters;\n this.state.maybeInArrowParameters = true;\n\n const res: Undone<N.ArrowFunctionExpression> | undefined =\n this.tsTryParseAndCatch(() => {\n const node = this.startNodeAt<N.ArrowFunctionExpression>(startLoc);\n node.typeParameters = this.tsParseTypeParameters(\n this.tsParseConstModifier,\n );\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) return;\n\n return super.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) return;\n return this.tsParseTypeArguments();\n }\n\n tsParseTypeArguments(): N.TsTypeParameterInstantiation {\n const node = this.startNode<N.TsTypeParameterInstantiation>();\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 } else if (!this.state.inType && this.curContext() === tc.brace) {\n // rescan `>` when we are no longer in type context and JSX parsing context\n // since it was tokenized when `inType` is `true`.\n this.reScan_lt_gt();\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 flags: ParseBindingListFlags,\n decorators: N.Decorator[],\n ): N.Pattern | N.TSParameterProperty {\n // Store original location to include modifiers in range\n const startLoc = this.state.startLoc;\n\n const modified: ModifierBase = {};\n this.tsParseModifiers(\n {\n allowedModifiers: [\n \"public\",\n \"private\",\n \"protected\",\n \"override\",\n \"readonly\",\n ],\n },\n modified,\n );\n const accessibility = modified.accessibility;\n const override = modified.override;\n const readonly = modified.readonly;\n if (\n !(flags & ParseBindingListFlags.IS_CONSTRUCTOR_PARAMS) &&\n (accessibility || readonly || override)\n ) {\n this.raise(TSErrors.UnexpectedParameterModifier, { at: startLoc });\n }\n\n const left = this.parseMaybeDefault();\n this.parseAssignableListItemTypes(left, flags);\n const elt = this.parseMaybeDefault(left.loc.start, left);\n if (accessibility || readonly || override) {\n const pp = this.startNodeAt<N.TSParameterProperty>(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 as any as 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.Pattern | N.TSParameterProperty) {\n return (\n (node.type === \"TSParameterProperty\" &&\n super.isSimpleParameter(node.parameter)) ||\n super.isSimpleParameter(node)\n );\n }\n\n tsDisallowOptionalPattern(node: Undone<N.Function>) {\n for (const param of node.params) {\n if (\n param.type !== \"Identifier\" &&\n (param as any).optional &&\n !this.state.isAmbientContext\n ) {\n this.raise(TSErrors.PatternIsOptional, { at: param });\n }\n }\n }\n\n setArrowFunctionParameters(\n node: Undone<N.ArrowFunctionExpression>,\n params: N.Expression[],\n trailingCommaLoc?: Position | null,\n ): void {\n super.setArrowFunctionParameters(node, params, trailingCommaLoc);\n this.tsDisallowOptionalPattern(node);\n }\n\n parseFunctionBodyAndFinish<\n T extends\n | N.Function\n | N.TSDeclareMethod\n | N.TSDeclareFunction\n | N.ClassPrivateMethod,\n >(node: Undone<T>, type: T[\"type\"], isMethod: boolean = false): T {\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 return this.finishNode(node, bodilessType);\n }\n if (bodilessType === \"TSDeclareFunction\" && this.state.isAmbientContext) {\n this.raise(TSErrors.DeclareFunctionHasImplementation, { at: node });\n if ((node as Undone<N.FunctionDeclaration>).declare) {\n return super.parseFunctionBodyAndFinish(node, bodilessType, isMethod);\n }\n }\n this.tsDisallowOptionalPattern(node);\n\n return 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 bodiless function, we need to do it here.\n this.checkIdentifier(node.id, BindingFlag.TYPE_TS_AMBIENT);\n } else {\n super.registerFunctionStatementId(node);\n }\n }\n\n tsCheckForInvalidTypeCasts(items: Array<N.Expression | undefined | null>) {\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: Array<N.Expression | undefined | null>,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n isInParens?: boolean,\n ): Array<N.Expression | undefined | null> {\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(\n close: TokenType,\n canBePattern: boolean,\n isTuple: boolean,\n refExpressionErrors?: ExpressionErrors | null,\n ): N.ArrayExpression | N.TupleExpression {\n const node = super.parseArrayLike(\n close,\n canBePattern,\n isTuple,\n refExpressionErrors,\n );\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\n startLoc: Position,\n noCalls: boolean | undefined | null,\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 this.startNodeAt<N.TsNonNullExpression>(startLoc);\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 =\n this.tsTryParseGenericAsyncArrowFunction(startLoc);\n if (asyncArrowFn) {\n return asyncArrowFn;\n }\n }\n\n const typeArguments = this.tsParseTypeArgumentsInExpression();\n if (!typeArguments) return;\n\n if (isOptionalCall && !this.match(tt.parenL)) {\n missingParenErrorLoc = this.state.curPosition();\n return;\n }\n\n if (tokenIsTemplate(this.state.type)) {\n const result = super.parseTaggedTemplateExpression(\n base,\n\n startLoc,\n state,\n );\n result.typeParameters = typeArguments;\n return result;\n }\n\n if (!noCalls && this.eat(tt.parenL)) {\n const node = this.startNodeAt<\n N.CallExpression | N.OptionalCallExpression\n >(startLoc);\n node.callee = base;\n // possibleAsync always false here, because we would have handled it above.\n // @ts-expect-error (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 (node as Undone<N.OptionalCallExpression>).optional =\n isOptionalCall;\n }\n\n return this.finishCallExpression(node, state.optionalChainMember);\n }\n\n const tokenType = this.state.type;\n if (\n // a<b>>c is not (a<b>)>c, but a<(b>>c)\n tokenType === tt.gt ||\n // a<b>>>c is not (a<b>)>>c, but a<(b>>>c)\n tokenType === tt.bitShiftR ||\n // a<b>c is (a<b)>c\n (tokenType !== tt.parenL &&\n tokenCanStartExpression(tokenType) &&\n !this.hasPrecedingLineBreak())\n ) {\n // Bail out.\n return;\n }\n\n const node = this.startNodeAt<N.TsInstantiationExpression>(startLoc);\n node.expression = base;\n node.typeParameters = typeArguments;\n return this.finishNode(node, \"TSInstantiationExpression\");\n });\n\n if (missingParenErrorLoc) {\n this.unexpected(missingParenErrorLoc, tt.parenL);\n }\n\n if (result) {\n if (\n result.type === \"TSInstantiationExpression\" &&\n (this.match(tt.dot) ||\n (this.match(tt.questionDot) &&\n this.lookaheadCharCode() !== charCodes.leftParenthesis))\n ) {\n this.raise(\n TSErrors.InvalidPropertyAccessAfterInstantiationExpression,\n { at: this.state.startLoc },\n );\n }\n return result;\n }\n }\n\n return super.parseSubscript(base, startLoc, noCalls, state);\n }\n\n parseNewCallee(node: N.NewExpression): void {\n super.parseNewCallee(node);\n\n const { callee } = node;\n if (\n callee.type === \"TSInstantiationExpression\" &&\n !callee.extra?.parenthesized\n ) {\n node.typeParameters = callee.typeParameters;\n node.callee = callee.expression;\n }\n }\n\n parseExprOp(\n left: N.Expression,\n leftStartLoc: Position,\n minPrec: number,\n ): N.Expression {\n let isSatisfies: boolean;\n if (\n tokenOperatorPrecedence(tt._in) > minPrec &&\n !this.hasPrecedingLineBreak() &&\n (this.isContextual(tt._as) ||\n (isSatisfies = this.isContextual(tt._satisfies)))\n ) {\n const node = this.startNodeAt<\n N.TsAsExpression | N.TsSatisfiesExpression\n >(leftStartLoc);\n node.expression = left;\n node.typeAnnotation = this.tsInType(() => {\n this.next(); // \"as\" or \"satisfies\"\n if (this.match(tt._const)) {\n if (isSatisfies) {\n this.raise(Errors.UnexpectedKeyword, {\n at: this.state.startLoc,\n keyword: \"const\",\n });\n }\n return this.tsParseTypeReference();\n }\n\n return this.tsParseType();\n });\n this.finishNode(\n node,\n isSatisfies ? \"TSSatisfiesExpression\" : \"TSAsExpression\",\n );\n // rescan `<`, `>` because they were scanned when this.state.inType was true\n this.reScan_lt_gt();\n return this.parseExprOp(\n // @ts-expect-error todo(flow->ts)\n node,\n leftStartLoc,\n minPrec,\n );\n }\n\n return super.parseExprOp(left, 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 checkImportReflection(node: Undone<N.ImportDeclaration>) {\n super.checkImportReflection(node);\n if (node.module && node.importKind !== \"value\") {\n this.raise(TSErrors.ImportReflectionHasImportType, {\n at: node.specifiers[0].loc.start,\n });\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 isPotentialImportPhase(isExport: boolean): boolean {\n if (super.isPotentialImportPhase(isExport)) return true;\n if (this.isContextual(tt._type)) {\n const ch = this.lookaheadCharCode();\n return isExport\n ? ch === charCodes.leftCurlyBrace || ch === charCodes.asterisk\n : ch !== charCodes.equalsTo;\n }\n return !isExport && this.isContextual(tt._typeof);\n }\n\n applyImportPhase(\n node: Undone<N.ImportDeclaration | N.ExportNamedDeclaration>,\n isExport: boolean,\n phase: string | null,\n loc?: Position,\n ): void {\n super.applyImportPhase(node, isExport, phase, loc);\n if (isExport) {\n (node as N.ExportNamedDeclaration).exportKind =\n phase === \"type\" ? \"type\" : \"value\";\n } else {\n (node as N.ImportDeclaration).importKind =\n phase === \"type\" || phase === \"typeof\" ? phase : \"value\";\n }\n }\n\n parseImport(\n node: Undone<N.ImportDeclaration | N.TsImportEqualsDeclaration>,\n ): N.AnyImport {\n if (this.match(tt.string)) {\n node.importKind = \"value\";\n return super.parseImport(node as Undone<N.ImportDeclaration>);\n }\n\n let importNode;\n if (\n tokenIsIdentifier(this.state.type) &&\n this.lookaheadCharCode() === charCodes.equalsTo\n ) {\n node.importKind = \"value\";\n return this.tsParseImportEqualsDeclaration(\n node as Undone<N.TsImportEqualsDeclaration>,\n );\n } else if (this.isContextual(tt._type)) {\n const maybeDefaultIdentifier = this.parseMaybeImportPhase(\n node as Undone<N.ImportDeclaration>,\n /* isExport */ false,\n );\n if (this.lookaheadCharCode() === charCodes.equalsTo) {\n return this.tsParseImportEqualsDeclaration(\n node as Undone<N.TsImportEqualsDeclaration>,\n maybeDefaultIdentifier,\n );\n } else {\n importNode = super.parseImportSpecifiersAndAfter(\n node as Undone<N.ImportDeclaration>,\n maybeDefaultIdentifier,\n );\n }\n } else {\n importNode = super.parseImport(node as Undone<N.ImportDeclaration>);\n }\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 // @ts-expect-error refine typings\n importNode.specifiers.length > 1 &&\n // @ts-expect-error refine typings\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(\n node: Undone<N.Node>,\n decorators: N.Decorator[] | null,\n ): N.AnyExport {\n if (this.match(tt._import)) {\n // `export import A = B;`\n this.next(); // eat `tt._import`\n let maybeDefaultIdentifier: N.Identifier | null = null;\n if (\n this.isContextual(tt._type) &&\n // We pass false here, because we are parsing an `import ... =`\n this.isPotentialImportPhase(/* isExport */ false)\n ) {\n maybeDefaultIdentifier = this.parseMaybeImportPhase(\n node as Undone<N.TsImportEqualsDeclaration>,\n /* isExport */ false,\n );\n } else {\n node.importKind = \"value\";\n }\n return this.tsParseImportEqualsDeclaration(\n node as Undone<N.TsImportEqualsDeclaration>,\n maybeDefaultIdentifier,\n /* isExport */ true,\n );\n } else if (this.eat(tt.eq)) {\n // `export = x;`\n const assign = node as Undone<N.TsExportAssignment>;\n assign.expression = super.parseExpression();\n this.semicolon();\n this.sawUnambiguousESM = true;\n return this.finishNode(assign, \"TSExportAssignment\");\n } else if (this.eatContextual(tt._as)) {\n // `export as namespace A;`\n const decl = node as Undone<N.TsNamespaceExportDeclaration>;\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 return super.parseExport(\n node as Undone<N.ExportAllDeclaration | N.ExportDefaultDeclaration>,\n decorators,\n );\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.Class>();\n this.next(); // Skip \"abstract\"\n cls.abstract = true;\n return this.parseClass(cls, true, true);\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(\n this.startNode<N.TsInterfaceDeclaration>(),\n );\n if (result) return result;\n }\n\n return super.parseExportDefaultExpression();\n }\n\n parseVarStatement(\n node: N.VariableDeclaration,\n kind: \"var\" | \"let\" | \"const\" | \"using\",\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 if (kind !== \"const\" || !!id.typeAnnotation) {\n this.raise(TSErrors.InitializerNotAllowedInAmbientContext, {\n at: init,\n });\n } else if (\n !isValidAmbientConstInitializer(init, this.hasPlugin(\"estree\"))\n ) {\n this.raise(\n TSErrors.ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumReference,\n { at: init },\n );\n }\n }\n\n return declaration;\n }\n\n parseStatementContent(\n flags: ParseStatementFlag,\n decorators?: N.Decorator[] | null,\n ): N.Statement {\n if (this.match(tt._const) && this.isLookaheadContextual(\"enum\")) {\n const node = this.startNode<N.TsEnumDeclaration>();\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(\n this.startNode<N.TsEnumDeclaration>(),\n );\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(flags, decorators);\n }\n\n parseAccessModifier(): N.Accessibility | undefined | null {\n return this.tsParseModifier([\"public\", \"protected\", \"private\"]);\n }\n\n tsHasSomeModifiers(member: any, modifiers: readonly 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 ] as const;\n this.tsParseModifiers(\n {\n allowedModifiers: modifiers,\n disallowedModifiers: [\"in\", \"out\"],\n stopOnStartOfClassStaticBlock: true,\n errorTemplate: TSErrors.InvalidModifierOnTypeParameterPositions,\n },\n member,\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 super.parseClassStaticBlock(classBody, member as 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: Undone<N.ClassMember | N.TsIndexSignature>,\n state: N.ParseClassMemberState,\n isStatic: boolean,\n ): void {\n const idx = this.tsTryParseIndexSignature(\n member as Undone<N.TsIndexSignature>,\n );\n if (idx) {\n classBody.body.push(idx);\n\n if ((member as any).abstract) {\n this.raise(TSErrors.IndexSignatureHasAbstract, { at: member });\n }\n if ((member as any).accessibility) {\n this.raise(TSErrors.IndexSignatureHasAccessibility, {\n at: member,\n modifier: (member as any).accessibility,\n });\n }\n if ((member as any).declare) {\n this.raise(TSErrors.IndexSignatureHasDeclare, { at: member });\n }\n if ((member as any).override) {\n this.raise(TSErrors.IndexSignatureHasOverride, { at: member });\n }\n\n return;\n }\n\n if (!this.state.inAbstractClass && (member as any).abstract) {\n this.raise(TSErrors.NonAbstractClassHasAbstractMethod, {\n at: member,\n });\n }\n\n if ((member as 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(\n classBody,\n member as Undone<N.ClassMember>,\n state,\n isStatic,\n );\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 as any).readonly && this.match(tt.parenL)) {\n this.raise(TSErrors.ClassMethodHasReadonly, { at: methodOrProp });\n }\n\n if ((methodOrProp as 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 // @ts-expect-error plugin overrides interfaces\n parseExpressionStatement(\n node: Undone<N.ExpressionStatement>,\n expr: N.Expression,\n decorators: N.Decorator[] | null,\n ): N.Statement {\n const decl =\n expr.type === \"Identifier\"\n ? // @ts-expect-error refine typings\n this.tsParseExpressionStatement(node, expr, decorators)\n : undefined;\n return decl || super.parseExpressionStatement(node, expr, decorators);\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\n startLoc: Position,\n refExpressionErrors?: ExpressionErrors | null,\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\n startLoc,\n refExpressionErrors,\n );\n }\n\n const result = this.tryParse(() =>\n super.parseConditional(expr, 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\n startLoc: Position,\n ): N.Expression {\n node = super.parseParenItem(node, 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<N.TsTypeCastExpression>(startLoc);\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(\n node: N.ExportNamedDeclaration,\n ): N.Declaration | undefined | null {\n if (!this.state.isAmbientContext && this.isContextual(tt._declare)) {\n return this.tsInAmbientContext(() => this.parseExportDeclaration(node));\n }\n\n // Store original location\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 | undefined | null =\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, 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 | null,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n bindingType?: BindingTypes,\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 as any).declare\n ? BindingFlag.TYPE_TS_AMBIENT\n : BindingFlag.TYPE_CLASS,\n );\n const typeParameters = this.tsTryParseTypeParameters(\n this.tsParseInOutConstModifiers,\n );\n if (typeParameters) node.typeParameters = typeParameters;\n }\n\n parseClassPropertyAnnotation(\n node: N.ClassProperty | N.ClassPrivateProperty | N.ClassAccessorProperty,\n ): void {\n if (!node.optional) {\n if (this.eat(tt.bang)) {\n node.definite = true;\n } else if (this.eat(tt.question)) {\n node.optional = true;\n }\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 (\n this.state.isAmbientContext &&\n !(node.readonly && !node.typeAnnotation) &&\n this.match(tt.eq)\n ) {\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 // @ts-expect-error abstract may not index node\n if (node.abstract) {\n this.raise(TSErrors.PrivateElementHasAbstract, { at: node });\n }\n\n // @ts-expect-error accessibility may not index node\n if (node.accessibility) {\n this.raise(TSErrors.PrivateElementHasAccessibility, {\n at: node,\n // @ts-expect-error refine typings\n modifier: node.accessibility,\n });\n }\n\n this.parseClassPropertyAnnotation(node);\n return super.parseClassPrivateProperty(node);\n }\n\n parseClassAccessorProperty(\n node: N.ClassAccessorProperty,\n ): N.ClassAccessorProperty {\n this.parseClassPropertyAnnotation(node);\n if (node.optional) {\n this.raise(TSErrors.AccessorCannotBeOptional, { at: node });\n }\n return super.parseClassAccessorProperty(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 this.tsParseConstModifier,\n );\n if (typeParameters && isConstructor) {\n this.raise(TSErrors.ConstructorHasTypeParameters, {\n at: typeParameters,\n });\n }\n\n // @ts-expect-error declare does not exist in ClassMethod\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 this.tsParseConstModifier,\n );\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 // @ts-expect-error refine typings\n node.superTypeParameters = this.tsParseTypeArgumentsInExpression();\n }\n if (this.eatContextual(tt._implements)) {\n node.implements = this.tsParseHeritageClause(\"implements\");\n }\n }\n\n parseObjPropValue(\n prop: Undone<N.ObjectMethod | N.ObjectProperty>,\n startLoc: Position | undefined | null,\n isGenerator: boolean,\n isAsync: boolean,\n isPattern: boolean,\n isAccessor: boolean,\n refExpressionErrors?: ExpressionErrors | null,\n ) {\n const typeParameters = this.tsTryParseTypeParameters(\n this.tsParseConstModifier,\n );\n if (typeParameters) prop.typeParameters = typeParameters;\n\n return super.parseObjPropValue(\n prop,\n\n startLoc,\n isGenerator,\n isAsync,\n isPattern,\n isAccessor,\n refExpressionErrors,\n );\n }\n\n parseFunctionParams(node: N.Function, isConstructor: boolean): void {\n const typeParameters = this.tsTryParseTypeParameters(\n this.tsParseConstModifier,\n );\n if (typeParameters) node.typeParameters = typeParameters;\n super.parseFunctionParams(node, isConstructor);\n }\n\n // `let x: number;`\n parseVarId(\n decl: N.VariableDeclarator,\n kind: \"var\" | \"let\" | \"const\" | \"using\",\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(\n refExpressionErrors?: ExpressionErrors | null,\n afterLeftParse?: Function,\n ): N.Expression {\n // Note: When the JSX plugin is on, type assertions (`<T> x`) aren't valid syntax.\n\n let state: State | undefined | null;\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(\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` 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(refExpressionErrors, afterLeftParse);\n }\n\n // Either way, we're looking at a '<': tt.jsxTagStart or relational.\n\n // If the state was cloned in the JSX parsing branch above but there\n // have been any error in the tryParse call, this.state is set to state\n // so we still need to clone it.\n if (!state || state === this.state) state = this.state.clone();\n\n let typeParameters: N.TsTypeParameterDeclaration | undefined | null;\n const arrow = this.tryParse(abort => {\n // This is similar to TypeScript's `tryParseParenthesizedArrowFunctionExpression`.\n typeParameters = this.tsParseTypeParameters(this.tsParseConstModifier);\n const expr = super.parseMaybeAssign(\n refExpressionErrors,\n afterLeftParse,\n );\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 if (process.env.BABEL_8_BREAKING) {\n if (\n this.hasPlugin(\"jsx\") &&\n expr.typeParameters.params.length === 1 &&\n !expr.typeParameters.extra?.trailingComma\n ) {\n // report error if single type parameter used without trailing comma.\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 this.raise(TSErrors.SingleTypeParameterWithoutTrailingComma, {\n at: createPositionWithColumnOffset(parameter.loc.end, 1),\n typeParameterName: parameter.name.name,\n });\n }\n }\n }\n\n return expr;\n }, state);\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 // @ts-expect-error refine typings\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(\n () => super.parseMaybeAssign(refExpressionErrors, afterLeftParse),\n state,\n );\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 // @ts-expect-error refine typings\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 throw jsx?.error || arrow.error || typeCast?.error;\n }\n\n reportReservedArrowTypeParam(node: any) {\n if (\n node.params.length === 1 &&\n !node.params[0].constraint &&\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(\n refExpressionErrors?: ExpressionErrors | null,\n sawUnary?: boolean,\n ): N.Expression {\n if (!this.hasPlugin(\"jsx\") && this.match(tt.lt)) {\n return this.tsParseTypeAssertion();\n }\n return super.parseMaybeUnary(refExpressionErrors, sawUnary);\n }\n\n parseArrow(\n node: Undone<N.ArrowFunctionExpression>,\n ): Undone<N.ArrowFunctionExpression> | undefined | null {\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 // @ts-expect-error refine typings\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(\n param: N.Pattern,\n flags: ParseBindingListFlags,\n ) {\n if (!(flags & ParseBindingListFlags.IS_FUNCTION_PARAMS)) return param;\n\n if (this.eat(tt.question)) {\n (param as any as 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): void {\n switch (node.type) {\n case \"ParenthesizedExpression\":\n this.toAssignableParenthesizedExpression(node, isLHS);\n break;\n case \"TSAsExpression\":\n case \"TSSatisfiesExpression\":\n case \"TSNonNullExpression\":\n case \"TSTypeAssertion\":\n if (isLHS) {\n this.expressionScope.recordArrowParameterBindingError(\n TSErrors.UnexpectedTypeCastInParameter,\n { at: node },\n );\n } else {\n this.raise(TSErrors.UnexpectedTypeCastInParameter, { at: node });\n }\n this.toAssignable(node.expression, isLHS);\n break;\n case \"AssignmentExpression\":\n if (!isLHS && node.left.type === \"TSTypeCastExpression\") {\n node.left = this.typeCastToParameter(node.left);\n }\n /* fall through */\n default:\n super.toAssignable(node, isLHS);\n }\n }\n\n toAssignableParenthesizedExpression(node: N.Node, isLHS: boolean): void {\n switch (node.expression.type) {\n case \"TSAsExpression\":\n case \"TSSatisfiesExpression\":\n case \"TSNonNullExpression\":\n case \"TSTypeAssertion\":\n case \"ParenthesizedExpression\":\n this.toAssignable(node.expression, isLHS);\n break;\n default:\n super.toAssignable(node, isLHS);\n }\n }\n\n checkToRestConversion(node: N.Node, allowPattern: boolean): void {\n switch (node.type) {\n case \"TSAsExpression\":\n case \"TSSatisfiesExpression\":\n case \"TSTypeAssertion\":\n case \"TSNonNullExpression\":\n this.checkToRestConversion(node.expression, false);\n break;\n default:\n super.checkToRestConversion(node, allowPattern);\n }\n }\n\n // @ts-expect-error plugin overrides interfaces\n isValidLVal(\n type:\n | \"TSTypeCastExpression\"\n | \"TSParameterProperty\"\n | \"TSNonNullExpression\"\n | \"TSAsExpression\"\n | \"TSSatisfiesExpression\"\n | \"TSTypeAssertion\",\n isUnparenthesizedInAssign: boolean,\n binding: BindingTypes,\n ) {\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 !== BindingFlag.TYPE_NONE ||\n !isUnparenthesizedInAssign) && [\"expression\", true],\n TSSatisfiesExpression: (binding !== BindingFlag.TYPE_NONE ||\n !isUnparenthesizedInAssign) && [\"expression\", true],\n TSTypeAssertion: (binding !== BindingFlag.TYPE_NONE ||\n !isUnparenthesizedInAssign) && [\"expression\", true],\n },\n type,\n ) || super.isValidLVal(type, isUnparenthesizedInAssign, binding)\n );\n }\n\n parseBindingAtom(): N.Pattern {\n if (this.state.type === tt._this) {\n return this.parseIdentifier(/* liberal */ true);\n }\n return super.parseBindingAtom();\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(\n close: (typeof charCodes)[keyof typeof charCodes],\n ): boolean {\n if (\n this.state.isAmbientContext &&\n this.match(tt.comma) &&\n this.lookaheadCharCode() === close\n ) {\n this.next();\n return false;\n }\n return super.checkCommaAfterRest(close);\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(\n startLoc?: Position | null,\n left?: Pattern | null,\n ): N.Pattern {\n const node = super.parseMaybeDefault(startLoc, left);\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 this.finishOp(tt.gt, 1);\n return;\n }\n if (code === charCodes.lessThan) {\n this.finishOp(tt.lt, 1);\n return;\n }\n }\n 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(\n exprList: Expression[],\n trailingCommaLoc: Position | undefined | null,\n isLHS: boolean,\n ): void {\n for (let i = 0; i < exprList.length; i++) {\n const expr = exprList[i];\n if (expr?.type === \"TSTypeCastExpression\") {\n exprList[i] = this.typeCastToParameter(\n expr as N.TsTypeCastExpression,\n );\n }\n }\n super.toAssignableList(exprList, trailingCommaLoc, isLHS);\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 // @ts-expect-error: refine typings\n this.tsParseTypeArgumentsInExpression(),\n );\n // @ts-expect-error: refine typings\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 extends N.Class>(\n node: Undone<T>,\n isStatement: boolean,\n optionalId?: boolean,\n ): T {\n const oldInAbstractClass = this.state.inAbstractClass;\n this.state.inAbstractClass = !!(node as any).abstract;\n try {\n return super.parseClass(node, isStatement, optionalId);\n } finally {\n this.state.inAbstractClass = oldInAbstractClass;\n }\n }\n\n tsParseAbstractDeclaration(\n node: any,\n decorators: N.Decorator[] | null,\n ): N.ClassDeclaration | N.TsInterfaceDeclaration | undefined | null {\n if (this.match(tt._class)) {\n node.abstract = true;\n return this.maybeTakeDecorators(\n decorators,\n this.parseClass<N.ClassDeclaration>(\n node as N.ClassDeclaration,\n /* isStatement */ true,\n /* optionalId */ false,\n ),\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 as N.TsInterfaceDeclaration,\n );\n }\n } else {\n this.unexpected(null, tt._class);\n }\n }\n\n parseMethod<\n T extends N.ObjectMethod | N.ClassMethod | N.ClassPrivateMethod,\n >(\n node: Undone<T>,\n isGenerator: boolean,\n isAsync: boolean,\n isConstructor: boolean,\n allowDirectSuper: boolean,\n type: T[\"type\"],\n inClassScope?: boolean,\n ) {\n const method = super.parseMethod<T>(\n node,\n isGenerator,\n isAsync,\n isConstructor,\n allowDirectSuper,\n type,\n inClassScope,\n );\n // @ts-expect-error todo(flow->ts) property not defined for all types in union\n if (method.abstract) {\n const hasBody = this.hasPlugin(\"estree\")\n ? // @ts-expect-error estree typings\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: Undone<N.ExportSpecifier>,\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: Undone<N.ImportSpecifier>,\n importedIsString: boolean,\n isInTypeOnlyImport: boolean,\n isMaybeTypeOnly: boolean,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n bindingType: BindingTypes | undefined,\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 isInTypeOnlyImport\n ? BindingFlag.TYPE_TS_TYPE_IMPORT\n : BindingFlag.TYPE_TS_VALUE_IMPORT,\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 if (isImport) {\n leftOfAs = this.parseIdentifier(true);\n if (!this.isContextual(tt._as)) {\n this.checkReservedWord(\n leftOfAs.name,\n leftOfAs.loc.start,\n true,\n true,\n );\n }\n } else {\n leftOfAs = this.parseModuleExportName();\n }\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(\n node[rightOfAsKey],\n hasTypeSpecifier\n ? BindingFlag.TYPE_TS_TYPE_IMPORT\n : BindingFlag.TYPE_TS_VALUE_IMPORT,\n );\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\n// If a const declaration has no type annotation and is initialized 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.\nfunction isValidAmbientConstInitializer(\n expression: N.Expression,\n estree: boolean,\n): boolean {\n const { type } = expression;\n if (expression.extra?.parenthesized) {\n return false;\n }\n if (estree) {\n if (type === \"Literal\") {\n const { value } = expression;\n if (typeof value === \"string\" || typeof value === \"boolean\") {\n return true;\n }\n }\n } else {\n if (type === \"StringLiteral\" || type === \"BooleanLiteral\") {\n return true;\n }\n }\n if (isNumber(expression, estree) || isNegativeNumber(expression, estree)) {\n return true;\n }\n if (type === \"TemplateLiteral\" && expression.expressions.length === 0) {\n return true;\n }\n if (isPossiblyLiteralEnum(expression)) {\n return true;\n }\n return false;\n}\n\nfunction isNumber(expression: N.Expression, estree: boolean): boolean {\n if (estree) {\n return (\n expression.type === \"Literal\" &&\n (typeof expression.value === \"number\" || \"bigint\" in expression)\n );\n }\n return (\n expression.type === \"NumericLiteral\" || expression.type === \"BigIntLiteral\"\n );\n}\n\nfunction isNegativeNumber(expression: N.Expression, estree: boolean): boolean {\n if (expression.type === \"UnaryExpression\") {\n const { operator, argument } = expression as N.UnaryExpression;\n if (operator === \"-\" && isNumber(argument, estree)) {\n return true;\n }\n }\n return false;\n}\n\nfunction isUncomputedMemberExpressionChain(expression: N.Expression): boolean {\n if (expression.type === \"Identifier\") return true;\n if (expression.type !== \"MemberExpression\" || expression.computed) {\n return false;\n }\n\n return isUncomputedMemberExpressionChain(expression.object);\n}\n","import * as charCodes from \"charcodes\";\n\nimport { tokenLabelName, tt } from \"../tokenizer/types\";\nimport type Parser from \"../parser\";\nimport type * as N from \"../types\";\nimport { ParseErrorEnum } from \"../parse-error\";\nimport type { Undone } from \"../parser/node\";\nimport type { ExpressionErrors } from \"../parser/util\";\nimport type { BindingTypes } from \"../util/scopeflags\";\nimport type { Position } from \"../util/location\";\n\ntype PossiblePlaceholders = {\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};\nexport type PlaceholderTypes = keyof PossiblePlaceholders;\n\ntype NodeOf<T extends keyof PossiblePlaceholders> = PossiblePlaceholders[T];\n// todo: when there is proper union type for Node\n// type NodeOf<T extends PlaceholderTypes> = Extract<N.Node, { type: T }>;\n\n// todo: Placeholder<T> breaks everything, because its type is incompatible with\n// the substituted nodes.\ntype MaybePlaceholder<T extends 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\n/* eslint-disable sort-keys */\n\nexport default (superClass: typeof Parser) =>\n class PlaceholdersParserMixin extends superClass implements Parser {\n parsePlaceholder<T extends PlaceholderTypes>(\n expectedNode: T,\n ): /*?N.Placeholder<T>*/ MaybePlaceholder<T> | undefined | null {\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 // @ts-expect-error placeholder typings\n return this.finishPlaceholder(node, expectedNode);\n }\n }\n\n finishPlaceholder<T extends 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 // @ts-expect-error todo(flow->ts)\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 this.finishOp(tt.placeholder, 2);\n } else {\n super.getTokenFromCode(code);\n }\n }\n\n /* ============================================================ *\n * parser/expression.js *\n * ============================================================ */\n\n parseExprAtom(\n refExpressionErrors?: ExpressionErrors | null,\n ): MaybePlaceholder<\"Expression\"> {\n return (\n this.parsePlaceholder(\"Expression\") ||\n super.parseExprAtom(refExpressionErrors)\n );\n }\n\n parseIdentifier(liberal?: boolean): 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\") || super.parseIdentifier(liberal)\n );\n }\n\n checkReservedWord(\n word: string,\n startLoc: Position,\n checkKeywords: boolean,\n isBinding: boolean,\n ) {\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) {\n super.checkReservedWord(word, startLoc, checkKeywords, isBinding);\n }\n }\n\n /* ============================================================ *\n * parser/lval.js *\n * ============================================================ */\n\n parseBindingAtom(): MaybePlaceholder<\"Pattern\"> {\n return this.parsePlaceholder(\"Pattern\") || super.parseBindingAtom();\n }\n\n isValidLVal(type: string, isParenthesized: boolean, binding: BindingTypes) {\n return (\n type === \"Placeholder\" ||\n super.isValidLVal(type, isParenthesized, binding)\n );\n }\n\n toAssignable(node: N.Node, isLHS: boolean): void {\n if (\n node &&\n node.type === \"Placeholder\" &&\n node.expectedNode === \"Expression\"\n ) {\n node.expectedNode = \"Pattern\";\n } else {\n super.toAssignable(node, isLHS);\n }\n }\n\n /* ============================================================ *\n * parser/statement.js *\n * ============================================================ */\n\n chStartsBindingIdentifier(ch: number, pos: number): boolean {\n if (super.chStartsBindingIdentifier(ch, pos)) {\n return true;\n }\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(\n node: N.BreakStatement | N.ContinueStatement,\n isBreak: boolean,\n ) {\n // @ts-expect-error: node.label could be Placeholder\n if (node.label && node.label.type === \"Placeholder\") return;\n super.verifyBreakContinue(node, isBreak);\n }\n\n // @ts-expect-error Plugin will override parser interface\n parseExpressionStatement(\n node: MaybePlaceholder<\"Statement\">,\n expr: N.Expression,\n ): MaybePlaceholder<\"Statement\"> {\n if (expr.type !== \"Placeholder\" || expr.extra?.parenthesized) {\n // @ts-expect-error placeholder typings\n return super.parseExpressionStatement(node, expr);\n }\n\n if (this.match(tt.colon)) {\n // @ts-expect-error placeholder typings\n const stmt: N.LabeledStatement = node;\n stmt.label = this.finishPlaceholder(expr, \"Identifier\");\n this.next();\n stmt.body = super.parseStatementOrSloppyAnnexBFunctionDeclaration();\n return this.finishNode(stmt, \"LabeledStatement\");\n }\n\n this.semicolon();\n node.name = expr.name;\n return this.finishPlaceholder(node, \"Statement\");\n }\n\n parseBlock(\n allowDirectives?: boolean,\n createNewLexicalScope?: boolean,\n afterBlockParse?: (hasStrictModeDirective: boolean) => void,\n ): MaybePlaceholder<\"BlockStatement\"> {\n return (\n this.parsePlaceholder(\"BlockStatement\") ||\n super.parseBlock(\n allowDirectives,\n createNewLexicalScope,\n afterBlockParse,\n )\n );\n }\n\n parseFunctionId(\n requireId?: boolean,\n ): MaybePlaceholder<\"Identifier\"> | undefined | null {\n return (\n this.parsePlaceholder(\"Identifier\") || super.parseFunctionId(requireId)\n );\n }\n // @ts-expect-error Plugin will override parser interface\n parseClass<T extends 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 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 super.parseClassSuper(node);\n node.body =\n this.parsePlaceholder(\"ClassBody\") ||\n super.parseClassBody(!!node.superClass, oldStrict);\n return this.finishNode(node, type);\n }\n\n parseExport(node: N.Node, decorators: N.Decorator[] | null): N.AnyExport {\n const placeholder = this.parsePlaceholder(\"Identifier\");\n if (!placeholder) return super.parseExport(node, decorators);\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, decorators);\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(\n node: Undone<\n | N.ExportDefaultDeclaration\n | N.ExportAllDeclaration\n | N.ExportNamedDeclaration\n >,\n maybeDefaultIdentifier: N.Identifier | null,\n ): node is Undone<N.ExportNamedDeclaration> {\n if ((node as N.ExportNamedDeclaration).specifiers?.length) {\n // \"export %%NAME%%\" has already been parsed by #parseExport.\n return true;\n }\n return super.maybeParseExportDefaultSpecifier(\n node,\n maybeDefaultIdentifier,\n );\n }\n\n checkExport(node: N.ExportNamedDeclaration): void {\n const { specifiers } = node;\n if (specifiers?.length) {\n node.specifiers = specifiers.filter(\n // @ts-expect-error placeholder typings\n node => node.exported.type === \"Placeholder\",\n );\n }\n super.checkExport(node);\n node.specifiers = specifiers;\n }\n\n parseImport(\n node: Undone<N.ImportDeclaration>,\n ): N.ImportDeclaration | N.TsImportEqualsDeclaration {\n const placeholder = this.parsePlaceholder(\"Identifier\");\n if (!placeholder) return super.parseImport(node);\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 =\n this.startNodeAtNode<N.ImportDefaultSpecifier>(placeholder);\n specifier.local = placeholder;\n node.specifiers.push(\n this.finishNode(specifier, \"ImportDefaultSpecifier\"),\n );\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\") || super.parseImportSource()\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 type * as N from \"../types\";\nimport type { ExpressionErrors } from \"../parser/util\";\n\nexport default (superClass: typeof Parser) =>\n class V8IntrinsicMixin extends superClass implements Parser {\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.Identifier>();\n this.next(); // eat '%'\n if (tokenIsIdentifier(this.state.type)) {\n const name = this.parseIdentifierName();\n const identifier = this.createIdentifier(node, name);\n // @ts-expect-error: avoid mutating AST types\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(refExpressionErrors?: ExpressionErrors | null): N.Expression {\n return (\n this.parseV8Intrinsic() || super.parseExprAtom(refExpressionErrors)\n );\n }\n };\n","import type Parser from \"./parser\";\nimport type {\n ParserPluginWithOptions,\n PluginConfig,\n PluginOptions,\n} from \"./typings\";\n\nexport type Plugin = PluginConfig;\n\nexport type PluginList = PluginConfig[];\n\nexport type MixinPlugin = (superClass: { new (...args: any): Parser }) => {\n new (...args: any): Parser;\n};\n\n// This functions 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 // @ts-expect-error key may not exist in plugin options\n if (pluginOptions[key] !== expectedOptions[key]) {\n return false;\n }\n }\n return true;\n }\n });\n}\n\nexport function getPluginOption<\n PluginName extends ParserPluginWithOptions[0],\n OptionName extends keyof PluginOptions<PluginName>,\n>(plugins: PluginList, name: PluginName, option: OptionName) {\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) && plugin.length > 1) {\n return (plugin[1] as PluginOptions<PluginName>)[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 (\n decoratorsBeforeExport != null &&\n typeof decoratorsBeforeExport !== \"boolean\"\n ) {\n throw new Error(\n \"'decoratorsBeforeExport' must be a boolean, if specified.\",\n );\n }\n\n const allowCallParenthesized = getPluginOption(\n plugins,\n \"decorators\",\n \"allowCallParenthesized\",\n );\n if (\n allowCallParenthesized != null &&\n typeof allowCallParenthesized !== \"boolean\"\n ) {\n throw new Error(\"'allowCallParenthesized' 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 `importAttributes` parser plugin, or `@babel/plugin-syntax-import-attributes`.\",\n );\n } else {\n if (\n hasPlugin(plugins, \"importAssertions\") ||\n hasPlugin(plugins, \"importAttributes\")\n ) {\n throw new Error(\n \"Cannot combine importAssertions, importAttributes and moduleAttributes plugins.\",\n );\n }\n const moduleAttributesVersionPluginOption = getPluginOption(\n plugins,\n \"moduleAttributes\",\n \"version\",\n );\n if (moduleAttributesVersionPluginOption !== \"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 if (\n hasPlugin(plugins, \"importAssertions\") &&\n hasPlugin(plugins, \"importAttributes\")\n ) {\n throw new Error(\n \"Cannot combine importAssertions and importAttributes plugins.\",\n );\n }\n\n if (\n hasPlugin(plugins, \"recordAndTuple\") &&\n getPluginOption(plugins, \"recordAndTuple\", \"syntaxType\") != null &&\n !RECORD_AND_TUPLE_SYNTAX_TYPES.includes(\n getPluginOption(plugins, \"recordAndTuple\", \"syntaxType\"),\n )\n ) {\n throw new Error(\n \"The 'syntaxType' option of the 'recordAndTuple' plugin must 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 // @ts-expect-error so @babel/core can provide better error message\n error.missingPlugins = \"doExpressions\";\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 = {\n estree,\n jsx,\n flow,\n typescript,\n v8intrinsic,\n placeholders,\n};\n\nexport const mixinPluginNames = Object.keys(mixinPlugins) as ReadonlyArray<\n \"estree\" | \"jsx\" | \"flow\" | \"typescript\" | \"v8intrinsic\" | \"placeholders\"\n>;\n","import 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 allowNewTargetOutsideFunction: boolean;\n allowImportExportEverywhere: boolean;\n allowSuperOutsideMethod: boolean;\n allowUndeclaredExports: boolean;\n plugins: PluginList;\n strictMode: boolean | undefined | null;\n ranges: boolean;\n tokens: boolean;\n createParenthesizedExpressions: boolean;\n errorRecovery: boolean;\n attachComment: boolean;\n annexB: 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, new.target outside a function or class is not\n // considered an error.\n allowNewTargetOutsideFunction: 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 // When enabled, the parser will support Annex B syntax.\n // https://tc39.es/ecma262/#sec-additional-ecmascript-features-for-web-browsers\n annexB: true,\n};\n\n// Interpret and default an options object\n\nexport function getOptions(opts?: Options | null): Options {\n if (opts == null) {\n return { ...defaultOptions };\n }\n if (opts.annexB != null && opts.annexB !== false) {\n throw new Error(\"The `annexB` option can only be set to `false`.\");\n }\n\n const options: any = {};\n for (const key of Object.keys(defaultOptions) as (keyof Options)[]) {\n options[key] = opts[key] ?? defaultOptions[key];\n }\n return options;\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 type * 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 {\n type Position,\n createPositionWithColumnOffset,\n} from \"../util/location\";\nimport * as charCodes from \"charcodes\";\nimport { ScopeFlag, BindingFlag } 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, type Undone } from \"./node\";\nimport type Parser from \".\";\n\nimport type { SourceType } from \"../options\";\n\nexport default abstract class ExpressionParser extends LValParser {\n // Forward-declaration: defined in statement.js\n abstract parseBlock(\n allowDirectives?: boolean,\n createNewLexicalScope?: boolean,\n afterBlockParse?: (hasStrictModeDirective: boolean) => void,\n ): N.BlockStatement;\n abstract parseClass(\n node: N.Class,\n isStatement: boolean,\n optionalId?: boolean,\n ): N.Class;\n abstract parseDecorators(allowExport?: boolean): void;\n abstract parseFunction<T extends N.NormalFunction>(\n node: T,\n statement?: number,\n allowExpressionBody?: boolean,\n isAsync?: boolean,\n ): T;\n abstract parseFunctionParams(node: N.Function, isConstructor?: boolean): void;\n abstract parseBlockOrModuleBlockBody(\n body: N.Statement[],\n directives: N.Directive[] | null | undefined,\n topLevel: boolean,\n end: TokenType,\n afterBlockParse?: (hasStrictModeDirective: boolean) => void,\n ): void;\n abstract parseProgram(\n program: N.Program,\n end: TokenType,\n sourceType?: SourceType,\n ): N.Program;\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 | undefined | null,\n protoRef: {\n used: boolean;\n },\n refExpressionErrors?: ExpressionErrors | null,\n ): void {\n if (\n prop.type === \"SpreadElement\" ||\n this.isObjectMethod(prop) ||\n prop.computed ||\n // @ts-expect-error prop must be an ObjectProperty\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(this: Parser): 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 // @ts-expect-error fixme: refine types\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 this: Parser,\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(\n this: Parser,\n refExpressionErrors?: ExpressionErrors,\n ): N.Expression {\n const startLoc = this.state.startLoc;\n const expr = this.parseMaybeAssign(refExpressionErrors);\n if (this.match(tt.comma)) {\n const node = this.startNodeAt(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 this: Parser,\n refExpressionErrors?: ExpressionErrors | null,\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 this: Parser,\n refExpressionErrors?: ExpressionErrors | null,\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 this: Parser,\n refExpressionErrors?: ExpressionErrors | null,\n afterLeftParse?: Function,\n ): N.Expression {\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, 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, startLoc);\n }\n if (tokenIsAssignment(this.state.type)) {\n const node = this.startNodeAt<N.AssignmentExpression>(startLoc);\n const operator = this.state.value;\n node.operator = operator;\n\n if (this.match(tt.eq)) {\n this.toAssignable(left, /* isLHS */ true);\n node.left = left;\n\n const startIndex = startLoc.index;\n if (\n refExpressionErrors.doubleProtoLoc != null &&\n refExpressionErrors.doubleProtoLoc.index >= startIndex\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 >= startIndex\n ) {\n refExpressionErrors.shorthandAssignLoc = null; // reset because shorthand default was used correctly\n }\n if (\n refExpressionErrors.privateKeyLoc != null &&\n refExpressionErrors.privateKeyLoc.index >= startIndex\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 // @ts-expect-error todo(flow->ts) improve node types\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(\n this: Parser,\n refExpressionErrors: ExpressionErrors,\n ): N.Expression {\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, startLoc, refExpressionErrors);\n }\n\n parseConditional(\n this: Parser,\n expr: N.Expression,\n startLoc: Position,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n refExpressionErrors?: ExpressionErrors | null,\n ): N.Expression {\n if (this.eat(tt.question)) {\n const node = this.startNodeAt(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 this: Parser,\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(\n this: Parser,\n refExpressionErrors: ExpressionErrors,\n ): N.Expression {\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, 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 this: Parser,\n left: N.Expression | N.PrivateName,\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<N.LogicalExpression | N.BinaryExpression>(\n leftStartLoc,\n );\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 const finishedNode = 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(finishedNode, 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(\n this: Parser,\n op: TokenType,\n prec: number,\n ): N.Expression {\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 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(\n this: Parser,\n op: TokenType,\n prec: number,\n ): N.Expression {\n const startLoc = this.state.startLoc;\n\n return this.parseExprOp(\n this.parseMaybeUnaryOrPrivate(),\n startLoc,\n tokenIsRightAssociative(op) ? prec - 1 : prec,\n );\n }\n\n parseHackPipeBody(this: Parser): N.Expression {\n const { startLoc } = this.state;\n const body = this.parseMaybeAssign();\n const requiredParentheses = UnparenthesizedPipeBodyDescriptions.has(\n // @ts-expect-error TS2345: Argument of type 'string' is not assignable to parameter of type '\"ArrowFunctionExpression\" | \"YieldExpression\" | \"AssignmentExpression\" | \"ConditionalExpression\"'.\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 // @ts-expect-error TS2322: Type 'string' is not assignable to type '\"AssignmentExpression\" | \"ArrowFunctionExpression\" | \"ConditionalExpression\" | \"YieldExpression\"'.\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(\n node: N.AwaitExpression | Undone<N.UnaryExpression>,\n ) {\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 this: Parser,\n refExpressionErrors?: ExpressionErrors | null,\n sawUnary?: boolean,\n ): N.Expression {\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(startLoc);\n if (!sawUnary) this.checkExponentialAfterUnary(expr);\n return expr;\n }\n const update = this.match(tt.incDec);\n const node = this.startNode<N.UnaryExpression | N.UpdateExpression>();\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) {\n this.checkExponentialAfterUnary(node as Undone<N.UnaryExpression>);\n }\n return this.finishNode(node, \"UnaryExpression\");\n }\n }\n\n const expr = this.parseUpdate(\n // @ts-expect-error using \"Undone\" node as \"done\"\n node,\n update,\n refExpressionErrors,\n );\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(startLoc);\n }\n }\n\n return expr;\n }\n\n // https://tc39.es/ecma262/#prod-UpdateExpression\n parseUpdate(\n this: Parser,\n node: N.Expression,\n update: boolean,\n refExpressionErrors?: ExpressionErrors | null,\n ): N.Expression {\n if (update) {\n // @ts-expect-error Type 'Node' is missing the following properties from type 'Undone<UpdateExpression>': prefix, operator, argument\n const updateExpressionNode = node as Undone<N.UpdateExpression>;\n this.checkLVal(updateExpressionNode.argument, {\n in: this.finishNode(updateExpressionNode, \"UpdateExpression\"),\n });\n return node;\n }\n\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<N.UpdateExpression>(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(\n this: Parser,\n refExpressionErrors?: ExpressionErrors | null,\n ): N.Expression {\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, startLoc);\n }\n\n parseSubscripts(\n this: Parser,\n base: N.Expression,\n startLoc: Position,\n noCalls?: boolean | null,\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, 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 this: Parser,\n base: N.Expression,\n startLoc: Position,\n noCalls: boolean | undefined | null,\n state: N.ParseSubscriptState,\n ): N.Expression {\n const { type } = this.state;\n if (!noCalls && type === tt.doubleColon) {\n return this.parseBind(base, startLoc, noCalls, state);\n } else if (tokenIsTemplate(type)) {\n return this.parseTaggedTemplateExpression(base, startLoc, state);\n }\n\n let optional = false;\n\n if (type === tt.questionDot) {\n if (noCalls) {\n this.raise(Errors.OptionalChainingNoNew, {\n at: this.state.startLoc,\n });\n if (this.lookaheadCharCode() === charCodes.leftParenthesis) {\n // stop at `?.` when parsing `new a?.()`\n state.stop = true;\n return base;\n }\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 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(base, startLoc, state, computed, optional);\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 this: Parser,\n base: N.Expression,\n startLoc: Position,\n state: N.ParseSubscriptState,\n computed: boolean,\n optional: boolean,\n ): N.OptionalMemberExpression | N.MemberExpression {\n const node = this.startNodeAt<\n N.OptionalMemberExpression | N.MemberExpression\n >(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 as N.OptionalMemberExpression).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 this: Parser,\n base: N.Expression,\n startLoc: Position,\n noCalls: boolean | undefined | null,\n state: N.ParseSubscriptState,\n ): N.Expression {\n const node = this.startNodeAt(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 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 this: Parser,\n base: N.Expression,\n startLoc: Position,\n state: N.ParseSubscriptState,\n optional: boolean,\n ): N.Expression {\n const oldMaybeInArrowParameters = this.state.maybeInArrowParameters;\n let refExpressionErrors: ExpressionErrors | null = null;\n\n this.state.maybeInArrowParameters = true;\n this.next(); // eat `(`\n\n const node = this.startNodeAt<N.CallExpression | N.OptionalCallExpression>(\n startLoc,\n );\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 // @ts-expect-error when optionalChainMember is true, node must be an optional call\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 maybeAsyncArrow ? node : null,\n refExpressionErrors,\n );\n }\n let finishedNode:\n | N.CallExpression\n | N.OptionalCallExpression\n | N.ArrowFunctionExpression = this.finishCallExpression(\n node,\n optionalChainMember,\n );\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 finishedNode = this.parseAsyncArrowFromCallExpression(\n this.startNodeAt<N.ArrowFunctionExpression>(startLoc),\n finishedNode as N.CallExpression,\n );\n } else {\n if (maybeAsyncArrow) {\n this.checkExpressionErrors(refExpressionErrors, true);\n this.expressionScope.exit();\n }\n this.toReferencedArguments(finishedNode);\n }\n\n this.state.maybeInArrowParameters = oldMaybeInArrowParameters;\n\n return finishedNode;\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 this: Parser,\n base: N.Expression,\n startLoc: Position,\n state: N.ParseSubscriptState,\n ): N.TaggedTemplateExpression {\n const node = this.startNodeAt<N.TaggedTemplateExpression>(startLoc);\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 expectImportAttributesPlugin() {\n if (!this.hasPlugin(\"importAssertions\")) {\n this.expectPlugin(\"importAttributes\");\n }\n }\n\n finishCallExpression<T extends N.CallExpression | N.OptionalCallExpression>(\n node: Undone<T>,\n optional: boolean,\n ): T {\n if (node.callee.type === \"Import\") {\n if (node.arguments.length === 2) {\n if (process.env.BABEL_8_BREAKING) {\n this.expectImportAttributesPlugin();\n } else {\n if (!this.hasPlugin(\"moduleAttributes\")) {\n this.expectImportAttributesPlugin();\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(\"importAttributes\") ||\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 this: Parser,\n close: TokenType,\n dynamicImport?: boolean,\n allowPlaceholder?: boolean,\n nodeForExtra?: Undone<N.Node> | null,\n refExpressionErrors?: ExpressionErrors | null,\n ): Array<N.Expression | undefined | null> {\n const elts: N.Expression[] = [];\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(\"importAttributes\") &&\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 this: Parser,\n node: Undone<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 as N.ArrowFunctionExpression;\n }\n\n // Parse a no-call expression (like argument of `new` or `::` operators).\n // https://tc39.es/ecma262/#prod-MemberExpression\n parseNoCallExpr(this: Parser): N.Expression {\n const startLoc = this.state.startLoc;\n return this.parseSubscripts(this.parseExprAtom(), 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(\n this: Parser,\n refExpressionErrors?: ExpressionErrors | null,\n ): N.Expression {\n let node;\n let decorators: N.Decorator[] | null = null;\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.MetaProperty | N.Import>();\n this.next();\n\n if (this.match(tt.dot)) {\n return this.parseImportMetaProperty(node as Undone<N.MetaProperty>);\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 decorators = this.parseDecorators();\n // fall through\n case tt._class:\n return this.parseClass(\n this.maybeTakeDecorators(decorators, this.startNode()),\n false,\n );\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 }\n this.unexpected();\n break;\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 } else {\n this.unexpected();\n }\n break;\n }\n\n default:\n if (tokenIsIdentifier(type)) {\n if (\n this.isContextual(tt._module) &&\n this.lookaheadInLineCharCode() === charCodes.leftCurlyBrace\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.parseAsyncFunctionExpression(\n this.startNodeAtNode(id),\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 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 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 tokens type.\n // See <https://github.com/js-choi/proposal-hack-pipes>.\n parseTopicReference(pipeProposal: string): N.Expression {\n const node = this.startNode<N.TopicReference>();\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 plugins configuration matches the current tokens 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 plugins 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 plugins configuration,\n // then this method will throw a `PipeTopicUnconfiguredToken` error.\n finishTopicReference(\n node: Undone<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 plugins 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 plugins 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 plugins configuration.\n // If the active pipe proposal is Hack style,\n // and if the given token is the same as the plugin configurations `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 // @ts-expect-error token must have a label\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(\n this: Parser,\n node: Undone<N.ArrowFunctionExpression>,\n ): 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 return this.parseArrowExpression(node, params, true);\n }\n\n // https://github.com/tc39/proposal-do-expressions\n // https://github.com/tc39/proposal-async-do-expressions\n parseDo(\n this: Parser,\n node: Undone<N.DoExpression>,\n isAsync: boolean,\n ): 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.Super>();\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.PrivateName>();\n const id = this.startNodeAt<N.Identifier>(\n // The position is hardcoded because we merge `#` and name into a single\n // tt.privateName token\n createPositionWithColumnOffset(this.state.startLoc, 1),\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 this: Parser,\n ): N.FunctionExpression | N.MetaProperty {\n const node = this.startNode<N.FunctionExpression | N.MetaProperty>();\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<N.Identifier>(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(\n node as Undone<N.MetaProperty>,\n meta,\n \"sent\",\n );\n }\n return this.parseFunction(node as Undone<N.FunctionExpression>);\n }\n\n parseMetaProperty(\n node: Undone<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: Undone<N.MetaProperty>): N.MetaProperty {\n const id = this.createIdentifier(\n this.startNodeAtNode<N.Identifier>(node),\n \"import\",\n );\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 extends N.Node>(\n value: any,\n type: 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 extends N.Node>(value: any, type: 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: {\n value: any;\n pattern: string;\n flags: N.RegExpLiteral[\"flags\"];\n }) {\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.BooleanLiteral>();\n node.value = value;\n this.next();\n return this.finishNode(node, \"BooleanLiteral\");\n }\n\n parseNullLiteral() {\n const node = this.startNode<N.NullLiteral>();\n this.next();\n return this.finishNode(node, \"NullLiteral\");\n }\n\n // https://tc39.es/ecma262/#prod-CoverParenthesizedExpressionAndArrowParameterList\n parseParenAndDistinguishExpression(\n this: Parser,\n canBeArrow: boolean,\n ): N.Expression {\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 innerStartLoc = this.state.startLoc;\n const exprList: N.Expression[] = [];\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 spreadNodeStartLoc = this.state.startLoc;\n spreadStartLoc = this.state.startLoc;\n exprList.push(\n this.parseParenItem(this.parseRestBinding(), spreadNodeStartLoc),\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<N.ArrowFunctionExpression>(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 // @ts-expect-error todo(flow->ts) improve node types\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<N.SequenceExpression>(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(\n startLoc,\n // @ts-expect-error todo(flow->ts)\n val,\n );\n }\n\n wrapParenthesis(startLoc: Position, expression: N.Expression): N.Expression {\n if (!this.options.createParenthesizedExpressions) {\n this.addExtra(expression, \"parenthesized\", true);\n this.addExtra(expression, \"parenStart\", startLoc.index);\n\n this.takeSurroundingComments(\n expression,\n startLoc.index,\n this.state.lastTokEndLoc.index,\n );\n\n return expression;\n }\n\n const parenExpression =\n this.startNodeAt<N.ParenthesizedExpression>(startLoc);\n parenExpression.expression = expression;\n return this.finishNode(parenExpression, \"ParenthesizedExpression\");\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars -- `params` is used in typescript plugin\n shouldParseArrow(params: Array<N.Node>): boolean {\n return !this.canInsertSemicolon();\n }\n\n parseArrow(\n node: Undone<N.ArrowFunctionExpression>,\n ): Undone<N.ArrowFunctionExpression> | undefined {\n if (this.eat(tt.arrow)) {\n return node;\n }\n }\n\n parseParenItem(\n node: N.Expression,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n startLoc: Position,\n ): N.Expression {\n return node;\n }\n\n parseNewOrNewTarget(this: Parser): N.NewExpression | N.MetaProperty {\n const node = this.startNode<N.NewExpression | N.MetaProperty>();\n this.next();\n if (this.match(tt.dot)) {\n // https://tc39.es/ecma262/#prod-NewTarget\n const meta = this.createIdentifier(\n this.startNodeAtNode<N.Identifier>(node),\n \"new\",\n );\n this.next();\n const metaProp = this.parseMetaProperty(\n node as Undone<N.MetaProperty>,\n meta,\n \"target\",\n );\n\n if (\n !this.scope.inNonArrowFunction &&\n !this.scope.inClass &&\n !this.options.allowNewTargetOutsideFunction\n ) {\n this.raise(Errors.UnexpectedNewTarget, { at: metaProp });\n }\n\n return metaProp;\n }\n\n return this.parseNew(node as Undone<N.NewExpression>);\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(this: Parser, node: Undone<N.NewExpression>): N.NewExpression {\n this.parseNewCallee(node);\n\n if (this.eat(tt.parenL)) {\n const args = this.parseExprList(tt.parenR);\n this.toReferencedList(args);\n // (parseExprList should be all non-null in this case)\n node.arguments = args;\n } else {\n node.arguments = [];\n }\n\n return this.finishNode(node, \"NewExpression\");\n }\n\n parseNewCallee(this: Parser, node: Undone<N.NewExpression>): void {\n node.callee = this.parseNoCallExpr();\n if (node.callee.type === \"Import\") {\n this.raise(Errors.ImportCallNotNewExpression, { at: node.callee });\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.TemplateElement>(\n createPositionWithColumnOffset(startLoc, 1),\n );\n if (value === null) {\n if (!isTagged) {\n this.raise(Errors.InvalidEscapeSequenceTemplate, {\n // FIXME: Adding 1 is probably wrong.\n at: createPositionWithColumnOffset(\n this.state.firstInvalidTemplateEscapePos,\n 1,\n ),\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 const finishedNode = this.finishNode(elem, \"TemplateElement\");\n this.resetEndLocation(\n finishedNode,\n createPositionWithColumnOffset(this.state.lastTokEndLoc, endOffset),\n );\n return finishedNode;\n }\n\n // https://tc39.es/ecma262/#prod-TemplateLiteral\n parseTemplate(this: Parser, isTagged: boolean): N.TemplateLiteral {\n const node = this.startNode<N.TemplateLiteral>();\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(this: Parser): N.Expression {\n return this.parseExpression();\n }\n\n // Parse an object literal, binding pattern, or record.\n\n parseObjectLike(\n close: TokenType,\n isPattern: true,\n isRecord?: boolean | null,\n refExpressionErrors?: ExpressionErrors | null,\n ): N.ObjectPattern;\n parseObjectLike(\n close: TokenType,\n isPattern: false,\n isRecord?: false | null,\n refExpressionErrors?: ExpressionErrors | null,\n ): N.ObjectExpression;\n parseObjectLike(\n close: TokenType,\n isPattern: false,\n isRecord?: true,\n refExpressionErrors?: ExpressionErrors | null,\n ): N.RecordExpression;\n parseObjectLike<T extends N.ObjectPattern | N.ObjectExpression>(\n this: Parser,\n close: TokenType,\n isPattern: boolean,\n isRecord?: boolean | null,\n refExpressionErrors?: ExpressionErrors | null,\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.ObjectExpression | N.ObjectPattern | N.RecordExpression\n >();\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 // @ts-expect-error shorthand may not index prop\n if (prop.shorthand) {\n this.addExtra(prop, \"shorthand\", true);\n }\n\n // @ts-expect-error Fixme: refine typings\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 // @ts-expect-error type is well defined\n return this.finishNode(node, type);\n }\n\n addTrailingCommaExtraToNode(node: Undone<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: Undone<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 this: Parser,\n refExpressionErrors?: ExpressionErrors | null,\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.ObjectProperty>();\n let isAsync = false;\n let isAccessor = false;\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 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 return this.parseObjPropValue(\n prop,\n startLoc,\n isGenerator,\n isAsync,\n false /* isPattern */,\n isAccessor,\n refExpressionErrors,\n );\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 this: Parser,\n prop: Undone<N.ObjectMethod>,\n isGenerator: boolean,\n isAsync: boolean,\n isPattern: boolean,\n isAccessor: boolean,\n ): N.ObjectMethod | undefined | null {\n if (isAccessor) {\n // isAccessor implies isAsync: false, isPattern: false, isGenerator: false\n const finishedProp = 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(finishedProp);\n return finishedProp;\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 this: Parser,\n prop: Undone<N.ObjectProperty>,\n startLoc: Position | undefined | null,\n isPattern: boolean,\n refExpressionErrors?: ExpressionErrors | null,\n ): N.ObjectProperty | undefined | null {\n prop.shorthand = false;\n\n if (this.eat(tt.colon)) {\n prop.value = isPattern\n ? this.parseMaybeDefault(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 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 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 this: Parser,\n prop: Undone<N.ObjectMethod | N.ObjectProperty>,\n startLoc: Position | undefined | null,\n isGenerator: boolean,\n isAsync: boolean,\n isPattern: boolean,\n isAccessor: boolean,\n refExpressionErrors?: ExpressionErrors | null,\n ): N.ObjectMethod | N.ObjectProperty {\n const node =\n this.parseObjectMethod(\n prop as Undone<N.ObjectMethod>,\n isGenerator,\n isAsync,\n isPattern,\n isAccessor,\n ) ||\n this.parseObjectProperty(\n prop as Undone<N.ObjectProperty>,\n startLoc,\n isPattern,\n refExpressionErrors,\n );\n\n if (!node) this.unexpected();\n\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 this: Parser,\n prop:\n | Undone<N.ObjectOrClassMember | N.ClassMember>\n | N.TsNamedTypeElementBase,\n refExpressionErrors?: ExpressionErrors | null,\n ): N.Expression | N.Identifier {\n if (this.eat(tt.bracketL)) {\n (prop as Undone<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 this.unexpected();\n }\n }\n (prop as any).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 extends N.ObjectMethod | N.ClassMethod | N.ClassPrivateMethod>(\n this: Parser,\n node: Undone<T>,\n isGenerator: boolean,\n isAsync: boolean,\n isConstructor: boolean,\n allowDirectSuper: boolean,\n type: T[\"type\"],\n inClassScope: boolean = false,\n ): T {\n this.initFunction(node, isAsync);\n node.generator = isGenerator;\n this.scope.enter(\n ScopeFlag.FUNCTION |\n ScopeFlag.SUPER |\n (inClassScope ? ScopeFlag.CLASS : 0) |\n (allowDirectSuper ? ScopeFlag.DIRECT_SUPER : 0),\n );\n this.prodParam.enter(functionFlags(isAsync, node.generator));\n this.parseFunctionParams(node, isConstructor);\n const finishedNode = this.parseFunctionBodyAndFinish(node, type, true);\n this.prodParam.exit();\n this.scope.exit();\n\n return finishedNode;\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 this: Parser,\n close: TokenType,\n canBePattern: boolean,\n isTuple: boolean,\n refExpressionErrors?: ExpressionErrors | null,\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.ArrayExpression | N.TupleExpression>();\n this.next();\n node.elements = this.parseExprList(\n close,\n /* allowEmpty */ !isTuple,\n refExpressionErrors,\n // @ts-expect-error todo(flow->ts)\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 this: Parser,\n node: Undone<N.ArrowFunctionExpression>,\n params: N.Expression[] | undefined | null,\n isAsync: boolean,\n trailingCommaLoc?: Position | null,\n ): N.ArrowFunctionExpression {\n this.scope.enter(ScopeFlag.FUNCTION | ScopeFlag.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: Undone<N.ArrowFunctionExpression>,\n params: N.Expression[],\n trailingCommaLoc?: Position | null,\n ): void {\n this.toAssignableList(params, trailingCommaLoc, false);\n node.params = params as (N.Pattern | N.TSParameterProperty)[];\n }\n\n parseFunctionBodyAndFinish<\n T extends\n | N.Function\n | N.TSDeclareMethod\n | N.TSDeclareFunction\n | N.ClassPrivateMethod,\n >(node: Undone<T>, type: T[\"type\"], isMethod: boolean = false): T {\n // @ts-expect-error (node is not bodiless if we get here)\n this.parseFunctionBody(node, false, isMethod);\n return this.finishNode(node, type);\n }\n\n // Parse function body and check parameters.\n parseFunctionBody(\n this: Parser,\n node: Undone<N.Function>,\n allowExpression?: boolean | null,\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 as Undone<N.ArrowFunctionExpression>).body =\n 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 // @ts-expect-error kind may not index node\n (node.kind === \"method\" || node.kind === \"constructor\") &&\n // @ts-expect-error key may not index node\n !!node.key\n ? // @ts-expect-error node.key has been guarded\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(\n node.id,\n BindingFlag.TYPE_OUTSIDE,\n strictModeChanged,\n );\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: Undone<N.Function>,\n allowDuplicates: boolean,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n isArrowFunction?: boolean | null,\n strictModeChanged: boolean = true,\n ): void {\n const checkClashes = !allowDuplicates && new Set<string>();\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\" } as const;\n for (const param of node.params) {\n this.checkLVal(param, {\n in: formalParameters,\n binding: BindingFlag.TYPE_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 this: Parser,\n close: TokenType,\n allowEmpty?: boolean,\n refExpressionErrors?: ExpressionErrors | null,\n nodeForExtra?: N.Node | null,\n ): (N.Expression | null)[] {\n const elts: (N.Expression | null)[] = [];\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 this: Parser,\n allowEmpty?: boolean,\n refExpressionErrors?: ExpressionErrors | null,\n allowPlaceholder?: boolean | null,\n ): N.Expression | null;\n parseExprListItem(\n this: Parser,\n allowEmpty?: false,\n refExpressionErrors?: ExpressionErrors | null,\n allowPlaceholder?: boolean | null,\n ): N.Expression;\n parseExprListItem(\n this: Parser,\n allowEmpty?: boolean | null,\n refExpressionErrors?: ExpressionErrors | null,\n allowPlaceholder?: boolean | null,\n ): N.Expression | null {\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 spreadNodeStartLoc = this.state.startLoc;\n\n elt = this.parseParenItem(\n this.parseSpread(refExpressionErrors),\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.Identifier>();\n const name = this.parseIdentifierName(liberal);\n\n return this.createIdentifier(node, name);\n }\n\n createIdentifier(\n node: Omit<N.Identifier, \"type\">,\n name: string,\n ): N.Identifier {\n node.name = name;\n node.loc.identifierName = name;\n\n return this.finishNode(node, \"Identifier\");\n }\n\n parseIdentifierName(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 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 (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 return;\n } else 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\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(this: Parser, startLoc: Position): N.AwaitExpression {\n const node = this.startNodeAt<N.AwaitExpression>(startLoc);\n\n this.expressionScope.recordParameterInitializerError(\n Errors.AwaitExpressionFormalParameter,\n {\n // @ts-expect-error todo(flow->ts)\n at: node,\n },\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 ``, await of []\n type === tt.plusMin ||\n type === tt.parenL ||\n type === tt.bracketL ||\n tokenIsTemplate(type) ||\n (type === tt._of && !this.state.containsEsc) ||\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(this: Parser): N.YieldExpression {\n const node = this.startNode<N.YieldExpression>();\n\n this.expressionScope.recordParameterInitializerError(\n Errors.YieldInParameter,\n {\n // @ts-expect-error todo(flow->ts)\n at: node,\n },\n );\n\n this.next();\n let delegating = false;\n let argument: N.Expression | null = 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(childExpr: N.Expression, startLoc: Position) {\n if (this.isSimpleReference(childExpr)) {\n const bodyNode = this.startNodeAt<N.PipelineBareFunction>(startLoc);\n bodyNode.callee = childExpr;\n return this.finishNode(bodyNode, \"PipelineBareFunction\");\n } else {\n const bodyNode = this.startNodeAt<N.PipelineTopicExpression>(startLoc);\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 parsers 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(this: Parser, prec: number): N.Expression {\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 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(this: Parser): N.ModuleExpression {\n this.expectPlugin(\"moduleBlocks\");\n const node = this.startNode<N.ModuleExpression>();\n this.next(); // eat \"module\"\n if (!this.match(tt.braceL)) {\n this.unexpected(null, tt.braceL);\n }\n // start program node immediately after `{`\n const program = this.startNodeAt<N.Program>(this.state.endLoc);\n this.next(); // eat `{`\n\n const revertScopes = this.initializeScopes(/** inModule */ true);\n this.enterInitialScopes();\n\n try {\n node.body = this.parseProgram(program, tt.braceR, \"module\");\n } finally {\n revertScopes();\n }\n return this.finishNode<N.ModuleExpression>(node, \"ModuleExpression\");\n }\n\n // Used in Flow plugin\n parsePropertyNamePrefixOperator(\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n prop: Undone<N.ObjectOrClassMember | N.ClassMember>,\n ): void {}\n}\n","import type * as N from \"../types\";\nimport {\n tokenIsIdentifier,\n tokenIsKeywordOrIdentifier,\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 * as charCodes from \"charcodes\";\nimport {\n ScopeFlag,\n ClassElementType,\n type BindingTypes,\n BindingFlag,\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 type { Position } from \"../util/location\";\nimport { createPositionWithColumnOffset } from \"../util/location\";\nimport { cloneStringLiteral, cloneIdentifier, type Undone } from \"./node\";\nimport type Parser from \"./index\";\nimport { ParseBindingListFlags } from \"./lval\";\n\nconst loopLabel = { kind: \"loop\" } as const,\n switchLabel = { kind: \"switch\" } as const;\n\nexport const enum ParseFunctionFlag {\n Expression = 0b0000,\n Declaration = 0b0001,\n HangingDeclaration = 0b0010,\n NullableId = 0b0100,\n Async = 0b1000,\n}\n\nexport const enum ParseStatementFlag {\n StatementOnly = 0b0000,\n AllowImportExport = 0b0001,\n AllowDeclaration = 0b0010,\n AllowFunctionDeclaration = 0b0100,\n AllowLabeledFunction = 0b1000,\n}\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 */\nfunction babel7CompatTokens(tokens: (Token | N.Comment)[], input: string) {\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 new Token({\n // @ts-expect-error: hacky way to create token\n type: getExportedToken(tt.hash),\n value: \"#\",\n start: start,\n end: hashEndPos,\n startLoc: loc.start,\n endLoc: hashEndLoc,\n }),\n new Token({\n // @ts-expect-error: hacky way to create 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 startToken = new Token({\n // @ts-expect-error: hacky way to create 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 startToken = new Token({\n // @ts-expect-error: hacky way to create 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 endToken = new Token({\n // @ts-expect-error: hacky way to create 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 endToken = new Token({\n // @ts-expect-error: hacky way to create 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 new Token({\n // @ts-expect-error: hacky way to create 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 // @ts-expect-error: we manipulate `token` for performance reasons\n token.type = getExportedToken(type);\n }\n }\n return tokens;\n}\nexport default abstract 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(this: Parser, 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 this: Parser,\n program: Undone<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 let finishedProgram: N.Program;\n if (end === tt.eof) {\n // finish at eof for top level program\n finishedProgram = this.finishNode(program, \"Program\");\n } else {\n // finish immediately before the end token\n finishedProgram = this.finishNodeAt(\n program,\n \"Program\",\n createPositionWithColumnOffset(this.state.startLoc, -1),\n );\n }\n return finishedProgram;\n }\n\n /**\n * cast a Statement to a Directive. This method mutates input statement.\n */\n stmtToDirective(stmt: N.Statement): N.Directive {\n const directive = stmt as 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.InterpreterDirective>();\n node.value = this.state.value;\n this.next();\n return this.finishNode(node, \"InterpreterDirective\");\n }\n\n isLet(): boolean {\n if (!this.isContextual(tt._let)) {\n return false;\n }\n return this.hasFollowingBindingAtom();\n }\n\n chStartsBindingIdentifier(ch: number, pos: number) {\n if (isIdentifierStart(ch)) {\n keywordRelationalOperator.lastIndex = pos;\n if (keywordRelationalOperator.test(this.input)) {\n // We have seen `in` or `instanceof` so far, now check if the identifier\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 } else if (ch === charCodes.backslash) {\n return true;\n } else {\n return false;\n }\n }\n\n chStartsBindingPattern(ch: number) {\n return (\n ch === charCodes.leftSquareBracket || ch === charCodes.leftCurlyBrace\n );\n }\n\n /**\n * Assuming we have seen a contextual `let` and declaration is allowed, check if it\n * starts a variable declaration so that it should be interpreted as a keyword.\n */\n hasFollowingBindingAtom(): boolean {\n const next = this.nextTokenStart();\n const nextCh = this.codePointAtPos(next);\n return (\n this.chStartsBindingPattern(nextCh) ||\n this.chStartsBindingIdentifier(nextCh, next)\n );\n }\n\n /**\n * Assuming we have seen a contextual `using` and declaration is allowed, check if it\n * starts a variable declaration in the same line so that it should be interpreted as\n * a keyword.\n */\n hasInLineFollowingBindingIdentifier(): boolean {\n const next = this.nextTokenInLineStart();\n const nextCh = this.codePointAtPos(next);\n return this.chStartsBindingIdentifier(nextCh, next);\n }\n\n startsUsingForOf(): boolean {\n const { type, containsEsc } = this.lookahead();\n if (type === tt._of && !containsEsc) {\n // `using of` must start a for-lhs-of statement\n return false;\n } else if (tokenIsIdentifier(type) && !this.hasFollowingLineBreak()) {\n this.expectPlugin(\"explicitResourceManagement\");\n return true;\n }\n }\n\n startsAwaitUsing(): boolean {\n let next = this.nextTokenInLineStart();\n if (this.isUnparsedContextual(next, \"using\")) {\n next = this.nextTokenInLineStartSince(next + 5);\n const nextCh = this.codePointAtPos(next);\n if (this.chStartsBindingIdentifier(nextCh, next)) {\n this.expectPlugin(\"explicitResourceManagement\");\n return true;\n }\n }\n return false;\n }\n\n // https://tc39.es/ecma262/#prod-ModuleItem\n parseModuleItem(this: Parser) {\n return this.parseStatementLike(\n ParseStatementFlag.AllowImportExport |\n ParseStatementFlag.AllowDeclaration |\n ParseStatementFlag.AllowFunctionDeclaration |\n // This function is actually also used to parse StatementItems,\n // which with Annex B enabled allows labeled functions.\n ParseStatementFlag.AllowLabeledFunction,\n );\n }\n\n // https://tc39.es/ecma262/#prod-StatementListItem\n parseStatementListItem(this: Parser) {\n return this.parseStatementLike(\n ParseStatementFlag.AllowDeclaration |\n ParseStatementFlag.AllowFunctionDeclaration |\n (!this.options.annexB || this.state.strict\n ? 0\n : ParseStatementFlag.AllowLabeledFunction),\n );\n }\n\n parseStatementOrSloppyAnnexBFunctionDeclaration(\n this: Parser,\n allowLabeledFunction: boolean = false,\n ) {\n let flags: ParseStatementFlag = ParseStatementFlag.StatementOnly;\n if (this.options.annexB && !this.state.strict) {\n flags |= ParseStatementFlag.AllowFunctionDeclaration;\n if (allowLabeledFunction) {\n flags |= ParseStatementFlag.AllowLabeledFunction;\n }\n }\n return this.parseStatementLike(flags);\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 parseStatement(this: Parser) {\n return this.parseStatementLike(ParseStatementFlag.StatementOnly);\n }\n\n // ImportDeclaration and ExportDeclaration are also handled here so we can throw recoverable errors\n // when they are not at the top level\n parseStatementLike(\n this: Parser,\n flags: ParseStatementFlag,\n ):\n | N.Statement\n | N.Declaration\n | N.ImportDeclaration\n | N.ExportDefaultDeclaration\n | N.ExportNamedDeclaration\n | N.ExportAllDeclaration {\n let decorators: N.Decorator[] | null = null;\n\n if (this.match(tt.at)) {\n decorators = this.parseDecorators(true);\n }\n return this.parseStatementContent(flags, decorators);\n }\n\n parseStatementContent(\n this: Parser,\n flags: ParseStatementFlag,\n decorators?: N.Decorator[] | null,\n ): N.Statement {\n const starttype = this.state.type;\n const node = this.startNode();\n const allowDeclaration = !!(flags & ParseStatementFlag.AllowDeclaration);\n const allowFunctionDeclaration = !!(\n flags & ParseStatementFlag.AllowFunctionDeclaration\n );\n const topLevel = flags & ParseStatementFlag.AllowImportExport;\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 as Undone<N.DebuggerStatement>);\n case tt._do:\n return this.parseDoWhileStatement(node as Undone<N.DoWhileStatement>);\n case tt._for:\n return this.parseForStatement(node as Undone<N.ForStatement>);\n case tt._function:\n if (this.lookaheadCharCode() === charCodes.dot) break;\n if (!allowFunctionDeclaration) {\n this.raise(\n this.state.strict\n ? Errors.StrictFunction\n : this.options.annexB\n ? Errors.SloppyFunctionAnnexB\n : Errors.SloppyFunction,\n { at: this.state.startLoc },\n );\n }\n return this.parseFunctionStatement(\n node as Undone<N.FunctionDeclaration>,\n false,\n !allowDeclaration && allowFunctionDeclaration,\n );\n case tt._class:\n if (!allowDeclaration) this.unexpected();\n return this.parseClass(\n this.maybeTakeDecorators(\n decorators,\n node as Undone<N.ClassDeclaration>,\n ),\n true,\n );\n\n case tt._if:\n return this.parseIfStatement(node as Undone<N.IfStatement>);\n case tt._return:\n return this.parseReturnStatement(node as Undone<N.ReturnStatement>);\n case tt._switch:\n return this.parseSwitchStatement(node as Undone<N.SwitchStatement>);\n case tt._throw:\n return this.parseThrowStatement(node as Undone<N.ThrowStatement>);\n case tt._try:\n return this.parseTryStatement(node as Undone<N.TryStatement>);\n\n case tt._await:\n // [+Await] await [no LineTerminator here] using [no LineTerminator here] BindingList[+Using]\n if (!this.state.containsEsc && this.startsAwaitUsing()) {\n if (!this.isAwaitAllowed()) {\n this.raise(Errors.AwaitUsingNotInAsyncContext, { at: node });\n } else if (!allowDeclaration) {\n this.raise(Errors.UnexpectedLexicalDeclaration, {\n at: node,\n });\n }\n this.next(); // eat 'await'\n return this.parseVarStatement(\n node as Undone<N.VariableDeclaration>,\n \"await using\",\n );\n }\n break;\n case tt._using:\n // using [no LineTerminator here] BindingList[+Using]\n if (\n this.state.containsEsc ||\n !this.hasInLineFollowingBindingIdentifier()\n ) {\n break;\n }\n this.expectPlugin(\"explicitResourceManagement\");\n if (!this.scope.inModule && this.scope.inTopLevel) {\n this.raise(Errors.UnexpectedUsingDeclaration, {\n at: this.state.startLoc,\n });\n } else if (!allowDeclaration) {\n this.raise(Errors.UnexpectedLexicalDeclaration, {\n at: this.state.startLoc,\n });\n }\n return this.parseVarStatement(\n node as Undone<N.VariableDeclaration>,\n \"using\",\n );\n case tt._let: {\n if (this.state.containsEsc) {\n break;\n }\n // `let [` is an explicit negative lookahead for\n // ExpressionStatement, so special-case it first.\n const next = this.nextTokenStart();\n const nextCh = this.codePointAtPos(next);\n if (nextCh !== charCodes.leftSquareBracket) {\n if (!allowDeclaration && this.hasFollowingLineBreak()) break;\n if (\n !this.chStartsBindingIdentifier(nextCh, next) &&\n nextCh !== charCodes.leftCurlyBrace\n ) {\n break;\n }\n }\n }\n // fall through\n case tt._const: {\n if (!allowDeclaration) {\n this.raise(Errors.UnexpectedLexicalDeclaration, {\n at: this.state.startLoc,\n });\n }\n }\n // fall through\n case tt._var: {\n const kind = this.state.value;\n return this.parseVarStatement(\n node as Undone<N.VariableDeclaration>,\n kind,\n );\n }\n case tt._while:\n return this.parseWhileStatement(node as Undone<N.WhileStatement>);\n case tt._with:\n return this.parseWithStatement(node as Undone<N.WithStatement>);\n case tt.braceL:\n return this.parseBlock();\n case tt.semi:\n return this.parseEmptyStatement(node as Undone<N.EmptyStatement>);\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 as Undone<N.ImportDeclaration>);\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(\n node as Undone<\n | N.ExportAllDeclaration\n | N.ExportDefaultDeclaration\n | N.ExportDefaultDeclaration\n >,\n decorators,\n );\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(result);\n\n return result;\n }\n\n default: {\n if (this.isAsyncFunction()) {\n if (!allowDeclaration) {\n this.raise(Errors.AsyncFunctionInSingleStatementContext, {\n at: this.state.startLoc,\n });\n }\n this.next(); // eat 'async'\n return this.parseFunctionStatement(\n node as Undone<N.FunctionDeclaration>,\n true,\n !allowDeclaration && allowFunctionDeclaration,\n );\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(\n node as Undone<N.LabeledStatement>,\n maybeName,\n // @ts-expect-error migrate to Babel types\n expr,\n flags,\n );\n } else {\n return this.parseExpressionStatement(\n node as Undone<N.ExpressionStatement>,\n expr,\n decorators,\n );\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 decoratorsEnabledBeforeExport(): boolean {\n if (this.hasPlugin(\"decorators-legacy\")) return true;\n return (\n this.hasPlugin(\"decorators\") &&\n this.getPluginOption(\"decorators\", \"decoratorsBeforeExport\") !== false\n );\n }\n\n // Attach the decorators to the given class.\n // NOTE: This method changes the .start location of the class, and thus\n // can affect comment attachment. Calling it before or after finalizing\n // the class node (and thus finalizing its comments) changes how comments\n // before the `class` keyword or before the final .start location of the\n // class are attached.\n maybeTakeDecorators<T extends Undone<N.Class>>(\n maybeDecorators: N.Decorator[] | null,\n classNode: T,\n exportNode?: Undone<N.ExportDefaultDeclaration | N.ExportNamedDeclaration>,\n ): T {\n if (maybeDecorators) {\n if (classNode.decorators && classNode.decorators.length > 0) {\n // Note: decorators attachment is only attempred multiple times\n // when the class is part of an export declaration.\n if (\n typeof this.getPluginOption(\n \"decorators\",\n \"decoratorsBeforeExport\",\n ) !== \"boolean\"\n ) {\n // If `decoratorsBeforeExport` was set to `true` or `false`, we\n // already threw an error about decorators not being in a valid\n // position.\n this.raise(Errors.DecoratorsBeforeAfterExport, {\n at: classNode.decorators[0],\n });\n }\n classNode.decorators.unshift(...maybeDecorators);\n } else {\n classNode.decorators = maybeDecorators;\n }\n this.resetStartLocationFromNode(classNode, maybeDecorators[0]);\n if (exportNode) this.resetStartLocationFromNode(exportNode, classNode);\n }\n return classNode;\n }\n\n canHaveLeadingDecorator(): boolean {\n return this.match(tt._class);\n }\n\n parseDecorators(this: Parser, allowExport?: boolean): N.Decorator[] {\n const decorators = [];\n do {\n decorators.push(this.parseDecorator());\n } while (this.match(tt.at));\n\n if (this.match(tt._export)) {\n if (!allowExport) {\n this.unexpected();\n }\n\n if (!this.decoratorsEnabledBeforeExport()) {\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 return decorators;\n }\n\n parseDecorator(this: Parser): N.Decorator {\n this.expectOnePlugin([\"decorators\", \"decorators-legacy\"]);\n\n const node = this.startNode<N.Decorator>();\n this.next();\n\n if (this.hasPlugin(\"decorators\")) {\n const startLoc = this.state.startLoc;\n let expr: N.Expression;\n\n if (this.match(tt.parenL)) {\n const startLoc = this.state.startLoc;\n this.next(); // eat '('\n expr = this.parseExpression();\n this.expect(tt.parenR);\n expr = this.wrapParenthesis(startLoc, expr);\n\n const paramsStartLoc = this.state.startLoc;\n node.expression = this.parseMaybeDecoratorArguments(expr);\n if (\n this.getPluginOption(\"decorators\", \"allowCallParenthesized\") ===\n false &&\n node.expression !== expr\n ) {\n this.raise(Errors.DecoratorArgumentsOutsideParentheses, {\n at: paramsStartLoc,\n });\n }\n } else {\n expr = this.parseIdentifier(false);\n\n while (this.eat(tt.dot)) {\n const node = this.startNodeAt(startLoc);\n node.object = expr;\n if (this.match(tt.privateName)) {\n this.classScope.usePrivateName(\n this.state.value,\n this.state.startLoc,\n );\n node.property = this.parsePrivateName();\n } else {\n node.property = this.parseIdentifier(true);\n }\n node.computed = false;\n expr = this.finishNode(node, \"MemberExpression\");\n }\n\n node.expression = this.parseMaybeDecoratorArguments(expr);\n }\n } else {\n node.expression = this.parseExprSubscripts();\n }\n return this.finishNode(node, \"Decorator\");\n }\n\n parseMaybeDecoratorArguments(this: Parser, 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: Undone<N.Node>,\n isBreak: true,\n ): N.BreakStatement;\n parseBreakContinueStatement(\n node: Undone<N.Node>,\n isBreak: false,\n ): N.ContinueStatement;\n parseBreakContinueStatement(\n node: Undone<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: Undone<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(\n node: Undone<N.DebuggerStatement>,\n ): N.DebuggerStatement {\n this.next();\n this.semicolon();\n return this.finishNode(node, \"DebuggerStatement\");\n }\n\n parseHeaderExpression(this: Parser): N.Expression {\n this.expect(tt.parenL);\n const val = this.parseExpression();\n this.expect(tt.parenR);\n return val;\n }\n\n // https://tc39.es/ecma262/#prod-DoWhileStatement\n parseDoWhileStatement(\n this: Parser,\n node: Undone<N.DoWhileStatement>,\n ): 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(),\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(\n this: Parser,\n node: Undone<N.ForStatement | N.ForInOf>,\n ): 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(ScopeFlag.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 as Undone<N.ForStatement>, null);\n }\n\n const startsWithLet = this.isContextual(tt._let);\n {\n const startsWithAwaitUsing =\n this.isContextual(tt._await) && this.startsAwaitUsing();\n const starsWithUsingDeclaration =\n startsWithAwaitUsing ||\n (this.isContextual(tt._using) && this.startsUsingForOf());\n const isLetOrUsing =\n (startsWithLet && this.hasFollowingBindingAtom()) ||\n starsWithUsingDeclaration;\n\n if (this.match(tt._var) || this.match(tt._const) || isLetOrUsing) {\n const initNode = this.startNode<N.VariableDeclaration>();\n let kind;\n if (startsWithAwaitUsing) {\n kind = \"await using\";\n if (!this.isAwaitAllowed()) {\n this.raise(Errors.AwaitUsingNotInAsyncContext, {\n at: this.state.startLoc,\n });\n }\n this.next(); // eat 'await'\n } else {\n kind = this.state.value;\n }\n this.next();\n this.parseVar(initNode, true, kind);\n const init = this.finishNode(initNode, \"VariableDeclaration\");\n\n const isForIn = this.match(tt._in);\n if (isForIn && starsWithUsingDeclaration) {\n this.raise(Errors.ForInUsing, { at: init });\n }\n if (\n (isForIn || this.isContextual(tt._of)) &&\n init.declarations.length === 1\n ) {\n return this.parseForIn(node as Undone<N.ForInOf>, init, awaitAt);\n }\n if (awaitAt !== null) {\n this.unexpected(awaitAt);\n }\n return this.parseFor(node as Undone<N.ForStatement>, init);\n }\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(\n node as Undone<N.ForInStatement | N.ForOfStatement>,\n // @ts-expect-error init has been transformed to an assignable\n init,\n awaitAt,\n );\n } else {\n this.checkExpressionErrors(refExpressionErrors, true);\n }\n if (awaitAt !== null) {\n this.unexpected(awaitAt);\n }\n return this.parseFor(node as Undone<N.ForStatement>, init);\n }\n\n // https://tc39.es/ecma262/#prod-HoistableDeclaration\n parseFunctionStatement(\n this: Parser,\n node: Undone<N.FunctionDeclaration>,\n isAsync: boolean,\n isHangingDeclaration: boolean,\n ): N.FunctionDeclaration {\n this.next(); // eat 'function'\n return this.parseFunction(\n node,\n ParseFunctionFlag.Declaration |\n (isHangingDeclaration ? ParseFunctionFlag.HangingDeclaration : 0) |\n (isAsync ? ParseFunctionFlag.Async : 0),\n );\n }\n\n // https://tc39.es/ecma262/#prod-IfStatement\n parseIfStatement(this: Parser, node: Undone<N.IfStatement>) {\n this.next();\n node.test = this.parseHeaderExpression();\n // Annex B.3.3\n // https://tc39.es/ecma262/#sec-functiondeclarations-in-ifstatement-statement-clauses\n node.consequent = this.parseStatementOrSloppyAnnexBFunctionDeclaration();\n node.alternate = this.eat(tt._else)\n ? this.parseStatementOrSloppyAnnexBFunctionDeclaration()\n : null;\n return this.finishNode(node, \"IfStatement\");\n }\n\n parseReturnStatement(this: Parser, node: Undone<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 // https://tc39.es/ecma262/#prod-SwitchStatement\n parseSwitchStatement(this: Parser, node: Undone<N.SwitchStatement>) {\n this.next();\n node.discriminant = this.parseHeaderExpression();\n const cases: N.SwitchStatement[\"cases\"] = (node.cases = []);\n this.expect(tt.braceL);\n this.state.labels.push(switchLabel);\n this.scope.enter(ScopeFlag.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 // @ts-expect-error Fixme\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.parseStatementListItem());\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(this: Parser, node: Undone<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(this: Parser): N.Pattern {\n const param = this.parseBindingAtom();\n\n this.scope.enter(\n this.options.annexB && param.type === \"Identifier\"\n ? ScopeFlag.SIMPLE_CATCH\n : 0,\n );\n this.checkLVal(param, {\n in: { type: \"CatchClause\" },\n binding: BindingFlag.TYPE_CATCH_PARAM,\n });\n\n return param;\n }\n\n parseTryStatement(\n this: Parser,\n node: Undone<N.TryStatement>,\n ): 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.CatchClause>();\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(ScopeFlag.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 // https://tc39.es/ecma262/#prod-VariableStatement\n // https://tc39.es/ecma262/#prod-LexicalDeclaration\n parseVarStatement(\n this: Parser,\n node: Undone<N.VariableDeclaration>,\n kind: \"var\" | \"let\" | \"const\" | \"using\" | \"await using\",\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 // https://tc39.es/ecma262/#prod-WhileStatement\n parseWhileStatement(\n this: Parser,\n node: Undone<N.WhileStatement>,\n ): 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(),\n );\n\n this.state.labels.pop();\n\n return this.finishNode(node, \"WhileStatement\");\n }\n\n parseWithStatement(\n this: Parser,\n node: Undone<N.WithStatement>,\n ): 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(),\n );\n\n return this.finishNode(node, \"WithStatement\");\n }\n\n parseEmptyStatement(node: Undone<N.EmptyStatement>): N.EmptyStatement {\n this.next();\n return this.finishNode(node, \"EmptyStatement\");\n }\n\n // https://tc39.es/ecma262/#prod-LabelledStatement\n parseLabeledStatement(\n this: Parser,\n node: Undone<N.LabeledStatement>,\n maybeName: string,\n expr: N.Identifier,\n flags: ParseStatementFlag,\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 // https://tc39.es/ecma262/#prod-LabelledItem\n node.body =\n flags & ParseStatementFlag.AllowLabeledFunction\n ? this.parseStatementOrSloppyAnnexBFunctionDeclaration(true)\n : this.parseStatement();\n\n this.state.labels.pop();\n node.label = expr;\n return this.finishNode(node, \"LabeledStatement\");\n }\n\n parseExpressionStatement(\n node: Undone<N.ExpressionStatement>,\n expr: N.Expression,\n /* eslint-disable-next-line @typescript-eslint/no-unused-vars -- used in TypeScript parser */\n decorators: N.Decorator[] | null,\n ) {\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 this: Parser,\n allowDirectives: boolean = false,\n createNewLexicalScope: boolean = true,\n afterBlockParse?: (hasStrictModeDirective: boolean) => void,\n ): N.BlockStatement {\n const node = this.startNode<N.BlockStatement>();\n if (allowDirectives) {\n this.state.strictErrors.clear();\n }\n this.expect(tt.braceL);\n if (createNewLexicalScope) {\n this.scope.enter(ScopeFlag.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 this: Parser,\n node: Undone<N.BlockStatementLike>,\n allowDirectives: boolean | undefined | null,\n topLevel: boolean,\n end: TokenType,\n afterBlockParse?: (hasStrictModeDirective: boolean) => void,\n ): void {\n const body: N.BlockStatementLike[\"body\"] = (node.body = []);\n const directives: N.BlockStatementLike[\"directives\"] = (node.directives =\n []);\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 this: Parser,\n body: N.Statement[],\n directives: N.Directive[] | undefined | null,\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 = topLevel\n ? this.parseModuleItem()\n : this.parseStatementListItem();\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 afterBlockParse?.call(this, hasStrictModeDirective);\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 this: Parser,\n node: Undone<N.ForStatement>,\n init?: N.VariableDeclaration | N.Expression | null,\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(),\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 this: Parser,\n node: Undone<N.ForInOf>,\n init: N.VariableDeclaration | N.AssignmentPattern,\n awaitAt?: Position | null,\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.options.annexB ||\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(),\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 this: Parser,\n node: Undone<N.VariableDeclaration>,\n isFor: boolean,\n kind: \"var\" | \"let\" | \"const\" | \"using\" | \"await using\",\n allowMissingInitializer: boolean = false,\n ): Undone<N.VariableDeclaration> {\n const declarations: N.VariableDeclarator[] = (node.declarations = []);\n node.kind = kind;\n for (;;) {\n const decl = this.startNode<N.VariableDeclarator>();\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(\n this: Parser,\n decl: Undone<N.VariableDeclarator>,\n kind: \"var\" | \"let\" | \"const\" | \"using\" | \"await using\",\n ): void {\n const id = this.parseBindingAtom();\n this.checkLVal(id, {\n in: { type: \"VariableDeclarator\" },\n binding: kind === \"var\" ? BindingFlag.TYPE_VAR : BindingFlag.TYPE_LEXICAL,\n });\n decl.id = id;\n }\n\n // https://tc39.es/ecma262/#prod-AsyncFunctionExpression\n parseAsyncFunctionExpression(\n this: Parser,\n node: Undone<N.FunctionExpression>,\n ): N.FunctionExpression {\n return this.parseFunction(node, ParseFunctionFlag.Async);\n }\n\n // Parse a function declaration or expression (depending on the\n // ParseFunctionFlag.Declaration flag).\n\n parseFunction<T extends N.NormalFunction>(\n this: Parser,\n node: Undone<T>,\n flags: ParseFunctionFlag = ParseFunctionFlag.Expression,\n ): T {\n const hangingDeclaration = flags & ParseFunctionFlag.HangingDeclaration;\n const isDeclaration = !!(flags & ParseFunctionFlag.Declaration);\n const requireId = isDeclaration && !(flags & ParseFunctionFlag.NullableId);\n const isAsync = !!(flags & ParseFunctionFlag.Async);\n\n this.initFunction(node, isAsync);\n\n if (this.match(tt.star)) {\n if (hangingDeclaration) {\n this.raise(Errors.GeneratorInSingleStatementContext, {\n at: this.state.startLoc,\n });\n }\n this.next(); // eat *\n node.generator = true;\n }\n\n if (isDeclaration) {\n node.id = this.parseFunctionId(requireId);\n }\n\n const oldMaybeInArrowParameters = this.state.maybeInArrowParameters;\n this.state.maybeInArrowParameters = false;\n this.scope.enter(ScopeFlag.FUNCTION);\n this.prodParam.enter(functionFlags(isAsync, node.generator));\n\n if (!isDeclaration) {\n node.id = this.parseFunctionId();\n }\n\n this.parseFunctionParams(node, /* isConstructor */ 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 isDeclaration ? \"FunctionDeclaration\" : \"FunctionExpression\",\n );\n });\n\n this.prodParam.exit();\n this.scope.exit();\n\n if (isDeclaration && !hangingDeclaration) {\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 as T);\n }\n\n this.state.maybeInArrowParameters = oldMaybeInArrowParameters;\n return node as T;\n }\n\n parseFunctionId(requireId?: boolean): N.Identifier | undefined | null {\n return requireId || tokenIsIdentifier(this.state.type)\n ? this.parseIdentifier()\n : null;\n }\n\n parseFunctionParams(\n this: Parser,\n node: Undone<N.Function>,\n isConstructor?: boolean,\n ): void {\n this.expect(tt.parenL);\n this.expressionScope.enter(newParameterDeclarationScope());\n node.params = this.parseBindingList(\n tt.parenR,\n charCodes.rightParenthesis,\n ParseBindingListFlags.IS_FUNCTION_PARAMS |\n (isConstructor ? ParseBindingListFlags.IS_CONSTRUCTOR_PARAMS : 0),\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 (BindingFlag.TYPE_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.options.annexB || this.state.strict || node.generator || node.async\n ? this.scope.treatFunctionsAsVar\n ? BindingFlag.TYPE_VAR\n : BindingFlag.TYPE_LEXICAL\n : BindingFlag.TYPE_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 extends N.Class>(\n this: Parser,\n node: Undone<T>,\n isStatement: /* T === ClassDeclaration */ boolean,\n optionalId?: boolean,\n ): T {\n this.next(); // 'class'\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(\n this: Parser,\n hadSuperClass: boolean,\n oldStrict: boolean,\n ): 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 = this.startNode<N.ClassBody>();\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.ClassMember>();\n\n // steal the decorators if there are any\n if (decorators.length) {\n // @ts-expect-error Fixme\n member.decorators = decorators;\n this.resetStartLocationFromNode(member, decorators[0]);\n decorators = [];\n }\n\n this.parseClassMember(classBody, member, state);\n\n if (\n // @ts-expect-error Fixme\n member.kind === \"constructor\" &&\n // @ts-expect-error Fixme\n member.decorators &&\n // @ts-expect-error Fixme\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 this: Parser,\n classBody: Undone<N.ClassBody>,\n member: Undone<N.ClassMember>,\n ): boolean {\n const key = this.parseIdentifier(true); // eats the modifier\n\n if (this.isClassMethod()) {\n const method: N.ClassMethod = member as 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 as 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 this: Parser,\n classBody: Undone<N.ClassBody>,\n member: Undone<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 as any as N.StaticBlock);\n return;\n }\n }\n\n this.parseClassMemberWithIsStatic(classBody, member, state, isStatic);\n }\n\n parseClassMemberWithIsStatic(\n this: Parser,\n classBody: Undone<N.ClassBody>,\n member: Undone<N.ClassMember>,\n state: N.ParseClassMemberState,\n isStatic: boolean,\n ) {\n const publicMethod = member as N.ClassMethod;\n const privateMethod = member as N.ClassPrivateMethod;\n const publicProp = member as N.ClassProperty;\n const privateProp = member as N.ClassPrivateProperty;\n const accessorProp = member as N.ClassAccessorProperty;\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(\n this: Parser,\n member: Undone<N.ClassMember>,\n ): 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 this: Parser,\n classBody: Undone<N.ClassBody>,\n member: Undone<\n N.StaticBlock & {\n decorators?: Array<N.Decorator>;\n }\n >,\n ) {\n // Start a new lexical scope\n this.scope.enter(\n ScopeFlag.CLASS | ScopeFlag.STATIC_BLOCK | ScopeFlag.SUPER,\n );\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: N.Node[] = (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(\n this: Parser,\n classBody: Undone<N.ClassBody>,\n prop: N.ClassProperty,\n ) {\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 this: Parser,\n classBody: Undone<N.ClassBody>,\n prop: Undone<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 ClassElementType.OTHER,\n node.key.loc.start,\n );\n }\n\n pushClassAccessorProperty(\n this: Parser,\n classBody: Undone<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 as 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 ClassElementType.OTHER,\n node.key.loc.start,\n );\n }\n }\n\n pushClassMethod(\n this: Parser,\n classBody: Undone<N.ClassBody>,\n method: Undone<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 this: Parser,\n classBody: Undone<N.ClassBody>,\n method: Undone<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 ? ClassElementType.STATIC_GETTER\n : ClassElementType.INSTANCE_GETTER\n : node.kind === \"set\"\n ? node.static\n ? ClassElementType.STATIC_SETTER\n : ClassElementType.INSTANCE_SETTER\n : ClassElementType.OTHER;\n this.declareClassPrivateMethodInScope(node, kind);\n }\n\n declareClassPrivateMethodInScope(\n node: Undone<\n N.ClassPrivateMethod | N.EstreeMethodDefinition | N.TSDeclareMethod\n >,\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 @typescript-eslint/no-unused-vars\n methodOrProp: Undone<N.ClassMethod | N.ClassProperty>,\n ): void {}\n\n // https://tc39.es/ecma262/#prod-FieldDefinition\n parseClassPrivateProperty(\n this: Parser,\n node: Undone<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(this: Parser, node: N.ClassProperty): N.ClassProperty {\n this.parseInitializer(node);\n this.semicolon();\n return this.finishNode(node, \"ClassProperty\");\n }\n\n parseClassAccessorProperty(\n this: Parser,\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 this: Parser,\n node: Undone<\n N.ClassProperty | N.ClassPrivateProperty | N.ClassAccessorProperty\n >,\n ): void {\n this.scope.enter(ScopeFlag.CLASS | ScopeFlag.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: Undone<N.Class>,\n isStatement: boolean,\n optionalId?: boolean | null,\n bindingType: BindingTypes = BindingFlag.TYPE_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(this: Parser, node: Undone<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(\n this: Parser,\n node: Undone<\n | N.ExportDefaultDeclaration\n | N.ExportAllDeclaration\n | N.ExportNamedDeclaration\n >,\n decorators: N.Decorator[] | null,\n ): N.AnyExport {\n const maybeDefaultIdentifier = this.parseMaybeImportPhase(\n node,\n /* isExport */ true,\n );\n const hasDefault = this.maybeParseExportDefaultSpecifier(\n node,\n maybeDefaultIdentifier,\n );\n const parseAfterDefault = !hasDefault || this.eat(tt.comma);\n const hasStar =\n parseAfterDefault &&\n this.eatExportStar(\n // @ts-expect-error todo(flow->ts)\n node,\n );\n const hasNamespace =\n hasStar &&\n this.maybeParseExportNamespaceSpecifier(\n // @ts-expect-error todo(flow->ts)\n node,\n );\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 if (decorators) {\n throw this.raise(Errors.UnsupportedDecoratorExport, { at: node });\n }\n this.parseExportFrom(node as Undone<N.ExportNamedDeclaration>, true);\n\n return this.finishNode(node, \"ExportAllDeclaration\");\n }\n\n const hasSpecifiers = this.maybeParseExportNamedSpecifiers(\n // @ts-expect-error todo(flow->ts)\n node,\n );\n\n if (hasDefault && parseAfterDefault && !hasStar && !hasSpecifiers) {\n this.unexpected(null, tt.braceL);\n }\n\n if (hasNamespace && parseAfterNamespace) {\n this.unexpected(null, tt._from);\n }\n\n let hasDeclaration;\n if (isFromRequired || hasSpecifiers) {\n hasDeclaration = false;\n if (decorators) {\n throw this.raise(Errors.UnsupportedDecoratorExport, { at: node });\n }\n this.parseExportFrom(\n node as Undone<N.ExportNamedDeclaration>,\n isFromRequired,\n );\n } else {\n hasDeclaration = this.maybeParseExportDeclaration(\n node as Undone<N.ExportNamedDeclaration>,\n );\n }\n\n if (isFromRequired || hasSpecifiers || hasDeclaration) {\n const node2 = node as Undone<N.ExportNamedDeclaration>;\n this.checkExport(node2, true, false, !!node2.source);\n if (node2.declaration?.type === \"ClassDeclaration\") {\n this.maybeTakeDecorators(decorators, node2.declaration, node2);\n } else if (decorators) {\n throw this.raise(Errors.UnsupportedDecoratorExport, { at: node });\n }\n return this.finishNode(node2, \"ExportNamedDeclaration\");\n }\n\n if (this.eat(tt._default)) {\n const node2 = node as Undone<N.ExportDefaultDeclaration>;\n // export default ...\n const decl = this.parseExportDefaultExpression();\n node2.declaration = decl;\n\n if (decl.type === \"ClassDeclaration\") {\n this.maybeTakeDecorators(decorators, decl as N.ClassDeclaration, node2);\n } else if (decorators) {\n throw this.raise(Errors.UnsupportedDecoratorExport, { at: node });\n }\n\n this.checkExport(node2, true, true);\n\n return this.finishNode(node2, \"ExportDefaultDeclaration\");\n }\n\n this.unexpected(null, tt.braceL);\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n eatExportStar(node: N.Node): boolean {\n return this.eat(tt.star);\n }\n\n maybeParseExportDefaultSpecifier(\n node: Undone<\n | N.ExportDefaultDeclaration\n | N.ExportAllDeclaration\n | N.ExportNamedDeclaration\n >,\n maybeDefaultIdentifier: N.Identifier | null,\n ): node is Undone<N.ExportNamedDeclaration> {\n if (maybeDefaultIdentifier || this.isExportDefaultSpecifier()) {\n // export defaultObj ...\n this.expectPlugin(\"exportDefaultFrom\", maybeDefaultIdentifier?.loc.start);\n const id = maybeDefaultIdentifier || this.parseIdentifier(true);\n const specifier = this.startNodeAtNode<N.ExportDefaultSpecifier>(id);\n specifier.exported = id;\n (node as Undone<N.ExportNamedDeclaration>).specifiers = [\n this.finishNode(specifier, \"ExportDefaultSpecifier\"),\n ];\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(this.state.lastTokStartLoc);\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(\n this: Parser,\n node: Undone<N.ExportNamedDeclaration>,\n ): 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.nextTokenInLineStart();\n return this.isUnparsedContextual(next, \"function\");\n }\n\n parseExportDefaultExpression(this: Parser): N.Expression | N.Declaration {\n const expr = this.startNode();\n\n if (this.match(tt._function)) {\n this.next();\n return this.parseFunction(\n expr as Undone<N.FunctionDeclaration>,\n ParseFunctionFlag.Declaration | ParseFunctionFlag.NullableId,\n );\n } else if (this.isAsyncFunction()) {\n this.next(); // eat 'async'\n this.next(); // eat 'function'\n return this.parseFunction(\n expr as Undone<N.FunctionDeclaration>,\n ParseFunctionFlag.Declaration |\n ParseFunctionFlag.NullableId |\n ParseFunctionFlag.Async,\n );\n }\n\n if (this.match(tt._class)) {\n return this.parseClass(expr as Undone<N.ClassExpression>, true, true);\n }\n\n if (this.match(tt.at)) {\n if (\n this.hasPlugin(\"decorators\") &&\n this.getPluginOption(\"decorators\", \"decoratorsBeforeExport\") === true\n ) {\n this.raise(Errors.DecoratorBeforeExport, { at: this.state.startLoc });\n }\n return this.parseClass(\n this.maybeTakeDecorators(\n this.parseDecorators(false),\n this.startNode<N.ClassDeclaration>(),\n ),\n true,\n true,\n );\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 // https://tc39.es/ecma262/#prod-ExportDeclaration\n parseExportDeclaration(\n this: Parser,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n node: Undone<N.ExportNamedDeclaration>,\n ): N.Declaration | undefined | null {\n if (this.match(tt._class)) {\n const node = this.parseClass(\n this.startNode<N.ClassDeclaration>(),\n true,\n false,\n );\n return node;\n }\n return this.parseStatementListItem() as N.Declaration;\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(\n this: Parser,\n node: Undone<N.ExportNamedDeclaration>,\n expect?: boolean,\n ): void {\n if (this.eatContextual(tt._from)) {\n node.source = this.parseImportSource();\n this.checkExport(node);\n this.maybeParseImportAttributes(node);\n this.checkJSONModuleImport(node);\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 (\n this.getPluginOption(\"decorators\", \"decoratorsBeforeExport\") === true\n ) {\n 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: Undone<N.ExportNamedDeclaration | N.ExportDefaultDeclaration>,\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 as any as 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 // @ts-expect-error node.specifiers may not exist\n } else if (node.specifiers?.length) {\n // Named exports\n // @ts-expect-error node.specifiers may not exist\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 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\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 // @ts-expect-error migrate to Babel types\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: Undone<\n | N.Identifier\n | N.StringLiteral\n | N.ExportNamedDeclaration\n | N.ExportSpecifier\n | N.ExportDefaultSpecifier\n >,\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 @typescript-eslint/no-unused-vars -- used in TypeScript parser */\n isInTypeExport: boolean,\n isMaybeTypeOnly: boolean,\n /* eslint-enable @typescript-eslint/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 isJSONModuleImport(\n node: Undone<\n N.ExportAllDeclaration | N.ExportNamedDeclaration | N.ImportDeclaration\n >,\n ): boolean {\n if (node.assertions != null) {\n return node.assertions.some(({ key, value }) => {\n return (\n value.value === \"json\" &&\n (key.type === \"Identifier\"\n ? key.name === \"type\"\n : key.value === \"type\")\n );\n });\n }\n return false;\n }\n\n checkImportReflection(node: Undone<N.ImportDeclaration>) {\n if (node.module) {\n if (\n node.specifiers.length !== 1 ||\n node.specifiers[0].type !== \"ImportDefaultSpecifier\"\n ) {\n this.raise(Errors.ImportReflectionNotBinding, {\n at: node.specifiers[0].loc.start,\n });\n }\n if (node.assertions?.length > 0) {\n this.raise(Errors.ImportReflectionHasAssertion, {\n at: node.specifiers[0].loc.start,\n });\n }\n }\n }\n\n checkJSONModuleImport(\n node: Undone<\n N.ExportAllDeclaration | N.ExportNamedDeclaration | N.ImportDeclaration\n >,\n ) {\n // @ts-expect-error Fixme: node.type must be undefined because they are undone\n if (this.isJSONModuleImport(node) && node.type !== \"ExportAllDeclaration\") {\n // @ts-expect-error specifiers may not index node\n const { specifiers } = node;\n if (specifiers != null) {\n // @ts-expect-error refine specifier types\n const nonDefaultNamedSpecifier = specifiers.find(specifier => {\n let imported;\n if (specifier.type === \"ExportSpecifier\") {\n imported = specifier.local;\n } else if (specifier.type === \"ImportSpecifier\") {\n imported = specifier.imported;\n }\n if (imported !== undefined) {\n return imported.type === \"Identifier\"\n ? imported.name !== \"default\"\n : imported.value !== \"default\";\n }\n });\n if (nonDefaultNamedSpecifier !== undefined) {\n this.raise(Errors.ImportJSONBindingNotDefault, {\n at: nonDefaultNamedSpecifier.loc.start,\n });\n }\n }\n }\n }\n\n isPotentialImportPhase(isExport: boolean): boolean {\n return !isExport && this.isContextual(tt._module);\n }\n\n applyImportPhase(\n node: Undone<N.ImportDeclaration | N.ExportNamedDeclaration>,\n isExport: boolean,\n phase: string | null,\n loc?: Position,\n ): void {\n if (isExport) {\n if (!process.env.IS_PUBLISH) {\n if (phase === \"module\") {\n throw new Error(\n \"Assertion failure: export declarations do not support the 'module' phase.\",\n );\n }\n }\n return;\n }\n if (phase === \"module\") {\n this.expectPlugin(\"importReflection\", loc);\n (node as N.ImportDeclaration).module = true;\n } else if (this.hasPlugin(\"importReflection\")) {\n (node as N.ImportDeclaration).module = false;\n }\n }\n\n /*\n * Parse `module` in `import module x from \"x\"`, disambiguating\n * `import module from \"x\"` and `import module from from \"x\"`.\n *\n * This function might return an identifier representing the `module`\n * if it eats `module` and then discovers that it was the default import\n * binding and not the import reflection.\n *\n * This function is also used to parse `import type` and `import typeof`\n * in the TS and Flow plugins.\n *\n * Note: the proposal has been updated to use `source` instead of `module`,\n * but it has not been implemented yet.\n */\n parseMaybeImportPhase(\n node: Undone<N.ImportDeclaration | N.TsImportEqualsDeclaration>,\n isExport: boolean,\n ): N.Identifier | null {\n if (!this.isPotentialImportPhase(isExport)) {\n this.applyImportPhase(\n node as Undone<N.ImportDeclaration>,\n isExport,\n null,\n );\n return null;\n }\n\n const phaseIdentifier = this.parseIdentifier(true);\n\n const { type } = this.state;\n const isImportPhase = tokenIsKeywordOrIdentifier(type)\n ? // OK: import <phase> x from \"foo\";\n // OK: import <phase> from from \"foo\";\n // NO: import <phase> from \"foo\";\n // NO: import <phase> from 'foo';\n // With the module declarations proposals, we will need further disambiguation\n // for `import module from from;`.\n type !== tt._from || this.lookaheadCharCode() === charCodes.lowercaseF\n : // OK: import <phase> { x } from \"foo\";\n // OK: import <phase> x from \"foo\";\n // OK: import <phase> * as T from \"foo\";\n // NO: import <phase> from \"foo\";\n // OK: import <phase> \"foo\";\n // The last one is invalid, we will continue parsing and throw\n // an error later\n type !== tt.comma;\n\n if (isImportPhase) {\n this.resetPreviousIdentifierLeadingComments(phaseIdentifier);\n this.applyImportPhase(\n node as Undone<N.ImportDeclaration>,\n isExport,\n phaseIdentifier.name,\n phaseIdentifier.loc.start,\n );\n return null;\n } else {\n this.applyImportPhase(\n node as Undone<N.ImportDeclaration>,\n isExport,\n null,\n );\n // `<phase>` is a default binding, return it to the main import declaration parser\n return phaseIdentifier;\n }\n }\n\n isPrecedingIdImportPhase(\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n phase: string,\n ) {\n const { type } = this.state;\n return tokenIsIdentifier(type)\n ? // OK: import <phase> x from \"foo\";\n // OK: import <phase> from from \"foo\";\n // NO: import <phase> from \"foo\";\n // NO: import <phase> from 'foo';\n // With the module declarations proposals, we will need further disambiguation\n // for `import module from from;`.\n type !== tt._from || this.lookaheadCharCode() === charCodes.lowercaseF\n : // OK: import <phase> { x } from \"foo\";\n // OK: import <phase> x from \"foo\";\n // OK: import <phase> * as T from \"foo\";\n // NO: import <phase> from \"foo\";\n // OK: import <phase> \"foo\";\n // The last one is invalid, we will continue parsing and throw\n // an error later\n type !== tt.comma;\n }\n\n // Parses import declaration.\n // https://tc39.es/ecma262/#prod-ImportDeclaration\n\n parseImport(this: Parser, node: Undone<N.ImportDeclaration>): N.AnyImport {\n if (this.match(tt.string)) {\n // import '...'\n return this.parseImportSourceAndAttributes(node);\n }\n\n return this.parseImportSpecifiersAndAfter(\n node,\n this.parseMaybeImportPhase(node, /* isExport */ false),\n );\n }\n\n parseImportSpecifiersAndAfter(\n this: Parser,\n node: Undone<N.ImportDeclaration>,\n maybeDefaultIdentifier: N.Identifier | null,\n ): N.AnyImport {\n node.specifiers = [];\n\n // check if we have a default import like\n // import React from \"react\";\n const hasDefault = this.maybeParseDefaultImportSpecifier(\n node,\n maybeDefaultIdentifier,\n );\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 return this.parseImportSourceAndAttributes(node);\n }\n\n parseImportSourceAndAttributes(\n this: Parser,\n node: Undone<N.ImportDeclaration>,\n ): N.AnyImport {\n node.specifiers ??= [];\n node.source = this.parseImportSource();\n this.maybeParseImportAttributes(node);\n this.checkImportReflection(node);\n this.checkJSONModuleImport(node);\n\n this.semicolon();\n return this.finishNode(node, \"ImportDeclaration\");\n }\n\n parseImportSource(this: Parser): N.StringLiteral {\n if (!this.match(tt.string)) this.unexpected();\n return this.parseExprAtom() as N.StringLiteral;\n }\n\n parseImportSpecifierLocal<\n T extends\n | N.ImportSpecifier\n | N.ImportDefaultSpecifier\n | N.ImportNamespaceSpecifier,\n >(\n node: Undone<N.ImportDeclaration>,\n specifier: Undone<T>,\n type: T[\"type\"],\n ): void {\n specifier.local = this.parseIdentifier();\n node.specifiers.push(this.finishImportSpecifier(specifier, type));\n }\n\n finishImportSpecifier<\n T extends\n | N.ImportSpecifier\n | N.ImportDefaultSpecifier\n | N.ImportNamespaceSpecifier,\n >(\n specifier: Undone<T>,\n type: T[\"type\"],\n bindingType: BindingTypes = BindingFlag.TYPE_LEXICAL,\n ) {\n this.checkLVal(specifier.local, {\n in: { type },\n binding: bindingType,\n });\n return this.finishNode(specifier, type);\n }\n\n /**\n * parse assert entries\n *\n * @see {@link https://tc39.es/proposal-import-attributes/#prod-WithEntries WithEntries}\n */\n parseImportAttributes(): N.ImportAttribute[] {\n this.expect(tt.braceL);\n\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 attrs.push(this.finishNode(node, \"ImportAttribute\"));\n } while (this.eat(tt.comma));\n\n this.expect(tt.braceR);\n\n return attrs;\n }\n\n /**\n * parse module attributes\n * @deprecated It will be removed in Babel 8\n */\n parseModuleAttributes() {\n const attrs: N.ImportAttribute[] = [];\n const attributes = new Set();\n do {\n const node = this.startNode<N.ImportAttribute>();\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 attrs.push(this.finishNode(node, \"ImportAttribute\"));\n } while (this.eat(tt.comma));\n\n return attrs;\n }\n\n maybeParseImportAttributes(\n node: Undone<N.ImportDeclaration | N.ExportNamedDeclaration>,\n ) {\n let attributes: N.ImportAttribute[];\n let useWith = false;\n\n // https://tc39.es/proposal-import-attributes/#prod-WithClause\n if (this.match(tt._with)) {\n if (\n this.hasPrecedingLineBreak() &&\n this.lookaheadCharCode() === charCodes.leftParenthesis\n ) {\n // This will be parsed as a with statement, and we will throw a\n // better error about it not being supported in strict mode.\n return;\n }\n\n this.next(); // eat `with`\n\n if (!process.env.BABEL_8_BREAKING) {\n if (this.hasPlugin(\"moduleAttributes\")) {\n attributes = this.parseModuleAttributes();\n } else {\n this.expectImportAttributesPlugin();\n attributes = this.parseImportAttributes();\n }\n } else {\n this.expectImportAttributesPlugin();\n attributes = this.parseImportAttributes();\n }\n useWith = true;\n } else if (this.isContextual(tt._assert) && !this.hasPrecedingLineBreak()) {\n if (this.hasPlugin(\"importAttributes\")) {\n if (\n this.getPluginOption(\"importAttributes\", \"deprecatedAssertSyntax\") !==\n true\n ) {\n this.raise(Errors.ImportAttributesUseAssert, {\n at: this.state.startLoc,\n });\n }\n this.addExtra(node, \"deprecatedAssertSyntax\", true);\n } else {\n this.expectOnePlugin([\"importAttributes\", \"importAssertions\"]);\n }\n this.next(); // eat `assert`\n attributes = this.parseImportAttributes();\n } else if (\n this.hasPlugin(\"importAttributes\") ||\n this.hasPlugin(\"importAssertions\")\n ) {\n attributes = [];\n } else if (!process.env.BABEL_8_BREAKING) {\n if (this.hasPlugin(\"moduleAttributes\")) {\n attributes = [];\n } else return;\n } else return;\n\n if (!useWith && this.hasPlugin(\"importAssertions\")) {\n node.assertions = attributes;\n } else {\n node.attributes = attributes;\n }\n }\n\n maybeParseDefaultImportSpecifier(\n node: Undone<N.ImportDeclaration>,\n maybeDefaultIdentifier: N.Identifier | null,\n ): boolean {\n // import defaultObj, { x, y as z } from '...'\n if (maybeDefaultIdentifier) {\n const specifier = this.startNodeAtNode<N.ImportDefaultSpecifier>(\n maybeDefaultIdentifier,\n );\n specifier.local = maybeDefaultIdentifier;\n node.specifiers.push(\n this.finishImportSpecifier(specifier, \"ImportDefaultSpecifier\"),\n );\n return true;\n } else if (\n // We allow keywords, and parseImportSpecifierLocal will report a recoverable error\n tokenIsKeywordOrIdentifier(this.state.type)\n ) {\n this.parseImportSpecifierLocal(\n node,\n this.startNode<N.ImportDefaultSpecifier>(),\n \"ImportDefaultSpecifier\",\n );\n return true;\n }\n return false;\n }\n\n maybeParseStarImportSpecifier(node: Undone<N.ImportDeclaration>): boolean {\n if (this.match(tt.star)) {\n const specifier = this.startNode<N.ImportNamespaceSpecifier>();\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: Undone<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.ImportSpecifier>();\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 undefined,\n );\n node.specifiers.push(importSpecifier);\n }\n }\n\n // https://tc39.es/ecma262/#prod-ImportSpecifier\n parseImportSpecifier(\n specifier: Undone<N.ImportSpecifier>,\n importedIsString: boolean,\n /* eslint-disable @typescript-eslint/no-unused-vars -- used in TypeScript and Flow parser */\n isInTypeOnlyImport: boolean,\n isMaybeTypeOnly: boolean,\n bindingType: BindingTypes | undefined,\n /* eslint-enable @typescript-eslint/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 as N.StringLiteral).value,\n });\n }\n this.checkReservedWord(\n (imported as N.Identifier).name,\n specifier.loc.start,\n true,\n true,\n );\n if (!specifier.local) {\n specifier.local = cloneIdentifier(imported);\n }\n }\n return this.finishImportSpecifier(\n specifier,\n \"ImportSpecifier\",\n bindingType,\n );\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","import type { Options } from \"../options\";\nimport type * as N 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<\n string,\n {\n [x: string]: any;\n }\n>;\n\nexport default class Parser extends StatementParser {\n // Forward-declaration so typescript plugin can override jsx plugin\n // todo(flow->ts) - this probably can be removed\n // abstract jsxParseOpeningElementAfterName(\n // node: N.JSXOpeningElement,\n // ): N.JSXOpeningElement;\n\n constructor(options: Options | undefined | null, 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(): {\n new (...args: any): ScopeHandler;\n } {\n return ScopeHandler;\n }\n\n parse(): N.File {\n this.enterInitialScopes();\n const file = this.startNode() as N.File;\n const program = this.startNode() as N.Program;\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","import type { Options } from \"./options\";\nimport {\n hasPlugin,\n validatePlugins,\n mixinPluginNames,\n mixinPlugins,\n type PluginList,\n} from \"./plugin-utils\";\nimport type {\n PluginConfig as ParserPlugin,\n FlowPluginOptions,\n RecordAndTuplePluginOptions,\n PipelineOperatorPluginOptions,\n} from \"./typings\";\nimport Parser from \"./parser\";\n\nimport type { ExportedTokenType } from \"./tokenizer/types\";\nimport {\n getExportedToken,\n tt as internalTokenTypes,\n type InternalTokenTypes,\n} 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(\n internalTokenTypes: InternalTokenTypes,\n): Record<string, ExportedTokenType> {\n const tokenTypes: Record<string, ExportedTokenType> = {};\n for (const typeName of Object.keys(\n internalTokenTypes,\n ) as (keyof InternalTokenTypes)[]) {\n tokenTypes[typeName] = getExportedToken(internalTokenTypes[typeName]);\n }\n return tokenTypes;\n}\n\nexport const tokTypes = generateExportedTokenTypes(internalTokenTypes);\n\nfunction getParser(options: Options | undefined | null, 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]: { new (...args: any): Parser } } = {};\n\n/** Get a Parser class with plugins applied. */\nfunction getParserClass(pluginsFromOptions: PluginList): {\n new (...args: any): Parser;\n} {\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 // @ts-expect-error todo(flow->ts)\n cls = mixinPlugins[plugin](cls);\n }\n parserClassCache[key] = cls;\n }\n return cls;\n}\n\nexport type {\n FlowPluginOptions,\n ParserPlugin,\n PipelineOperatorPluginOptions,\n RecordAndTuplePluginOptions,\n};\nexport type ParserOptions = Partial<Options>;\n"],"names":["Position","constructor","line","col","index","column","SourceLocation","start","end","filename","identifierName","createPositionWithColumnOffset","position","columnOffset","ParseErrorCode","SyntaxError","SourceTypeModuleError","reflect","keys","last","length","get","reduce","object","key","set","value","item","i","instantiate","properties","descriptors","Object","map","filter","descriptor","enumerable","assign","split","instance","defineProperty","configurable","ModuleErrors","ImportMetaOutsideModule","message","code","ImportOutsideModule","NodeDescriptions","ArrayPattern","AssignmentExpression","AssignmentPattern","ArrowFunctionExpression","ConditionalExpression","CatchClause","ForOfStatement","ForInStatement","ForStatement","FormalParameters","Identifier","ImportSpecifier","ImportDefaultSpecifier","ImportNamespaceSpecifier","ObjectPattern","ParenthesizedExpression","RestElement","UpdateExpression","true","false","VariableDeclarator","YieldExpression","toNodeDescription","type","prefix","String","StandardErrors","AccessorIsGenerator","kind","ArgumentsInClass","AsyncFunctionInSingleStatementContext","AwaitBindingIdentifier","AwaitBindingIdentifierInStaticBlock","AwaitExpressionFormalParameter","AwaitUsingNotInAsyncContext","AwaitNotInAsyncContext","AwaitNotInAsyncFunction","BadGetterArity","BadSetterArity","BadSetterRestParameter","ConstructorClassField","ConstructorClassPrivateField","ConstructorIsAccessor","ConstructorIsAsync","ConstructorIsGenerator","DeclarationMissingInitializer","DecoratorArgumentsOutsideParentheses","DecoratorBeforeExport","DecoratorsBeforeAfterExport","DecoratorConstructor","DecoratorExportClass","DecoratorSemicolon","DecoratorStaticBlock","DeletePrivateField","DestructureNamedImport","DuplicateConstructor","DuplicateDefaultExport","DuplicateExport","exportName","DuplicateProto","DuplicateRegExpFlags","ElementAfterRest","EscapedCharNotAnIdentifier","ExportBindingIsString","localName","ExportDefaultFromAsIdentifier","ForInOfLoopInitializer","ForInUsing","ForOfAsync","ForOfLet","GeneratorInSingleStatementContext","IllegalBreakContinue","IllegalLanguageModeDirective","IllegalReturn","ImportAttributesUseAssert","ImportBindingIsString","importName","ImportCallArgumentTrailingComma","ImportCallArity","maxArgumentCount","ImportCallNotNewExpression","ImportCallSpreadArgument","ImportJSONBindingNotDefault","ImportReflectionHasAssertion","ImportReflectionNotBinding","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","SloppyFunctionAnnexB","StaticPrototype","SuperNotAllowed","SuperPrivateField","TrailingDecorator","TupleExpressionBarIncorrectEndSyntaxType","TupleExpressionBarIncorrectStartSyntaxType","TupleExpressionHashIncorrectStartSyntaxType","UnexpectedArgumentPlaceholder","UnexpectedAwaitAfterPipelineBody","UnexpectedDigitAfterHash","UnexpectedImportExport","UnexpectedKeyword","keyword","UnexpectedLeadingDecorator","UnexpectedLexicalDeclaration","UnexpectedNewTarget","UnexpectedNumericSeparator","UnexpectedPrivateField","UnexpectedReservedWord","UnexpectedSuper","UnexpectedToken","expected","UnexpectedTokenUnaryExponentiation","UnexpectedUsingDeclaration","UnsupportedBind","UnsupportedDecoratorExport","UnsupportedDefaultExport","UnsupportedImport","UnsupportedMetaProperty","target","onlyValidPropertyName","UnsupportedParameterDecorator","UnsupportedPropertyDecorator","UnsupportedSuper","UnterminatedComment","UnterminatedRegExp","UnterminatedString","UnterminatedTemplate","UsingDeclarationHasBindingPattern","VarRedeclaration","YieldBindingIdentifier","YieldInParameter","ZeroDigitNumericSeparator","StrictModeErrors","StrictDelete","StrictEvalArguments","referenceName","StrictEvalArgumentsBinding","bindingName","StrictFunction","StrictNumericEscape","StrictOctalLiteral","StrictWith","UnparenthesizedPipeBodyDescriptions","Set","PipelineOperatorErrors","PipeBodyIsTighter","PipeTopicRequiresHackPipes","PipeTopicUnbound","PipeTopicUnconfiguredToken","token","PipeTopicUnused","PipeUnparenthesizedBody","PipelineBodyNoArrow","PipelineBodySequenceExpression","PipelineHeadSequenceExpression","PipelineTopicUnused","PrimaryTopicNotAllowed","PrimaryTopicRequiresSmartPipeline","toParseErrorConstructor","_ref","toMessage","_objectWithoutPropertiesLoose","_excluded","loc","details","clone","overrides","pos","ParseErrorEnum","argument","syntaxPlugin","Array","isArray","parseErrorTemplates","ParseErrorConstructors","reasonCode","template","_ref2","rest","_excluded2","Errors","toUnenumerable","toESTreeLocation","node","estree","superClass","ESTreeParserMixin","parse","file","options","tokens","parseRegExpLiteral","pattern","flags","regex","RegExp","e","estreeParseLiteral","parseBigIntLiteral","bigInt","BigInt","_unused","bigint","parseDecimalLiteral","decimal","parseLiteral","parseStringLiteral","parseNumericLiteral","parseNullLiteral","parseBooleanLiteral","directiveToStmt","directive","expression","raw","extra","expressionValue","stmt","rawValue","initFunction","isAsync","checkDeclaration","isObjectProperty","getObjectOrClassMethodParams","method","params","isValidDirective","_stmt$expression$extr","parenthesized","parseBlockBody","allowDirectives","topLevel","afterBlockParse","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","args","propertyNode","parseClassPrivateProperty","parseObjectMethod","prop","isPattern","isAccessor","shorthand","parseObjectProperty","startLoc","refExpressionErrors","isValidLVal","isUnparenthesizedInAssign","binding","isAssignable","isBinding","toAssignable","isLHS","classScope","usePrivateName","toAssignableObjectExpressionProp","isLast","raise","at","finishCallExpression","unfinished","optional","callee","source","arguments","hasPlugin","_node$arguments$","attributes","toReferencedArguments","parseExport","decorators","exportStartLoc","state","lastTokStartLoc","exported","specifiers","_declaration$decorato","declaration","resetStartLocation","parseSubscript","base","noCalls","optionalChainMember","substring","stop","chain","startNodeAtNode","hasPropertyAsPrivateName","isObjectMethod","finishNodeAt","endLoc","resetEndLocation","lastTokEndLoc","TokContext","preserveSpace","types","brace","j_oTag","j_cTag","j_expr","beforeExpr","startsExpr","isLoop","isAssign","postfix","ExportedTokenType","label","conf","rightAssociative","binop","updateContext","keywords","Map","createKeyword","createToken","createBinop","tokenTypeCounter","tokenTypes","tokenLabels","tokenBinops","tokenBeforeExprs","tokenStartsExprs","tokenPrefixes","_options$binop","_options$beforeExpr","_options$startsExpr","_options$prefix","createKeywordLike","_options$binop2","_options$beforeExpr2","_options$startsExpr2","_options$prefix2","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","_using","_yield","_asserts","_checks","_exports","_global","_implements","_intrinsic","_infer","_is","_mixins","_proto","_require","_satisfies","_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","var","lexical","functions","ScopeHandler","parser","scopeStack","undefinedExports","inTopLevel","currentScope","inFunction","currentVarScopeFlags","allowSuper","currentThisScopeFlags","inClass","inClassAndNotInNonArrowFunction","inStaticBlock","ScopeFlag","inNonArrowFunction","treatFunctionsAsVar","treatFunctionsAsVarInScope","createScope","enter","exit","scope","declareName","bindingType","checkRedeclarationInScope","add","maybeExportDefined","delete","isRedeclaredInScope","values","checkLocalExport","topLevelScope","FlowScope","declareFunctions","FlowScopeHandler","BaseParser","sawUnambiguousESM","ambiguousScriptDifferentAst","pluginConfig","plugins","pluginName","pluginOptions","actualOptions","plugin","_this$plugins$get","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","resetPreviousIdentifierLeadingComments","takeSurroundingComments","lineBreak","lineBreakG","isNewLine","skipWhiteSpace","skipWhiteSpaceInLine","skipWhiteSpaceToLineBreak","isWhitespace","State","curLine","lineStart","errors","potentialArrowAt","noArrowAt","noArrowParamsConversionAt","maybeInArrowParameters","inType","noAnonFunctionType","hasFlowComment","isAmbientContext","inAbstractClass","inDisallowConditionalTypesContext","topicContext","maxNumOfResolvableTopics","maxTopicIndex","soloAwait","inFSharpPipelineDirectBody","labels","lastTokStart","ct","canStartJSXElement","containsEsc","firstInvalidTemplateEscapePos","strictErrors","tokensLength","init","strictMode","sourceType","startLine","startColumn","curPosition","skipArrays","val","slice","isDigit","forbiddenNumericSeparatorSiblings","decBinOct","hex","isAllowedNumericSeparatorSibling","bin","ch","oct","dec","readStringContents","initialPos","initialLineStart","initialCurLine","out","firstInvalidLoc","chunkStart","unterminated","isStringEnd","res","readEscapedChar","str","containsInvalid","inTemplate","throwOnInvalid","readHexChar","readCodePoint","fromCodePoint","strictNumericEscape","startPos","match","octalStr","octal","parseInt","len","forceLen","n","readInt","invalidEscapeSequence","allowNumSeparator","bailOnError","forbiddenSiblings","isAllowedSibling","invalid","total","Infinity","prev","numericSeparatorInEscapeSequence","Number","isNaN","unexpectedNumericSeparator","_isDigit","invalidDigit","indexOf","invalidCodePoint","buildPosition","VALID_REGEX_FLAGS","Token","Tokenizer","isLookahead","errorHandlers_readInt","errorRecovery","errorBuilder","errorHandlers_readCodePoint","errorHandlers_readStringContents_string","recordStrictModeErrors","errorHandlers_readStringContents_template","pushToken","checkKeywordEscapes","nextToken","eat","createLookaheadState","curContext","lookahead","old","curr","nextTokenStart","nextTokenStartSince","lastIndex","lookaheadCharCode","nextTokenInLineStart","nextTokenInLineStartSince","lookaheadInLineCharCode","codePointAtPos","cp","trail","setStrict","forEach","toParseError","clear","skipSpace","finishToken","getTokenFromCode","skipBlockComment","skipLineComment","startSkip","spaceStart","loop","attachComment","annexB","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","readRegexp","escaped","content","mods","char","includes","isBigInt","replace","startsWithDot","isFloat","isDecimal","hasExponent","isOctal","hasLeadingZero","integer","underscorePos","parseFloat","quote","readTemplateContinuation","opening","firstCode","escStart","identifierCheck","esc","keywordTypes","raiseProperties","error","raiseOverwrite","expectOnePlugin","pluginNames","some","ClassScope","privateNames","loneAccessors","undefinedPrivateNames","ClassScopeHandler","stack","oldClassScope","from","declarePrivateName","elementType","redefined","accessor","oldStatic","newStatic","oldKind","newKind","ExpressionScope","canBeArrowParameterDeclaration","isCertainlyParameterDeclaration","ArrowHeadParsingScope","declarationErrors","recordDeclarationError","ParsingErrorClass","clearDeclarationError","iterateErrors","iterator","ExpressionScopeHandler","recordParameterInitializerError","origin","recordArrowParameterBindingError","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","startNodeAt","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","EnumStringMemberInconsistentlyInitialized","GetterMayNotHaveThisParam","ImportReflectionHasImportType","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","hasTypeImportKind","importKind","exportSuggestions","const","let","interface","partition","list","list1","list2","FLOW_PRAGMA_REGEX","flow","FlowParserMixin","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","finished","flowParseTypeAlias","flowParseOpaqueType","isClass","flowParseRestrictedIdentifier","extends","flowParseInterfaceExtends","implements","mixins","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","_startLoc","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","parseStatementLike","flowParseEnumDeclaration","parseExpressionStatement","expr","shouldParseExportDeclaration","isExportDefaultSpecifier","parseExportDefaultExpression","parseConditional","setOptionalParametersError","originalNoArrowAt","consequent","failed","tryParseConditionalConsequent","valid","getArrowLikeExpressions","alternate","parseMaybeAssign","parseMaybeAssignAllowIn","disallowInvalid","arrows","finishArrowValidation","every","_node$extra","toAssignableList","trailingCommaLoc","checkParams","result","parseParenItem","typeCastNode","assertModuleNodeAllowed","parseExportDeclaration","declarationNode","parseExportSpecifiers","parseExportFrom","eatExportStar","maybeParseExportNamespaceSpecifier","hasNamespace","parseClassId","isStatement","optionalId","parseClassMember","member","parseClassMemberFromModifier","isIterator","readIterator","fullWord","left","exprList","toReferencedList","isParenthesizedExpr","_expr$extra","parseArrayLike","close","canBePattern","isTuple","isParenthesized","isClassMethod","isClassProperty","isNonstaticConstructor","isThisParam","pushClassPrivateMethod","parseClassSuper","superTypeParameters","implemented","checkGetterSetterParams","parsePropertyNamePrefixOperator","parseObjPropValue","parseAssignableListItemTypes","parseMaybeDefault","checkImportReflection","module","parseImportSpecifierLocal","specifier","local","finishImportSpecifier","isPotentialImportPhase","isExport","applyImportPhase","phase","parseImportSpecifier","importedIsString","isInTypeOnlyImport","isMaybeTypeOnly","firstIdent","imported","specifierTypeKind","as_ident","specifierIsTypeImport","checkReservedWord","parseBindingAtom","parseFunctionParams","parseVarId","decl","parseAsyncArrowFromCallExpression","call","shouldParseAsyncArrow","afterLeftParse","_jsx","jsx","currentContext","_jsx2","_jsx3","abort","_arrowExpression$extr","arrowExpression","maybeUnwrapTypeCastExpression","async","parseArrow","shouldParseArrow","setArrowFunctionParameters","allowDuplicates","isArrowFunction","strictModeChanged","parseParenAndDistinguishExpression","canBeArrow","parseSubscripts","parseCallExpressionArguments","parseAsyncArrowWithTypeParameters","subscriptState","isLookaheadToken_lt","typeArguments","parseNewCallee","targs","parseArrowExpression","parseTopLevel","program","fileNode","skipFlowComment","hasFlowCommentCompletion","commentSkip","shiftToFirstNonWhiteSpace","ch2","ch3","flowEnumErrorBooleanMemberNotInitialized","flowEnumErrorInvalidMemberInitializer","enumContext","flowEnumErrorNumberMemberNotInitialized","flowEnumErrorStringMemberInconsistentlyInitialized","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","JSXParserMixin","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","importsStack","hasImport","allowShadow","isConst","wasConst","getOwn","hasOwnProperty","unwrapParenthesizedExpression","LValParser","_node$extra3","_node$extra2","operator","arg","checkToRestConversion","elt","element","toReferencedListDeep","parseSpread","parseRestBinding","parseBindingList","ParseBindingListFlags","parseObjectLike","closeCharCode","allowEmpty","elts","checkCommaAfterRest","parseDecorator","parseAssignableListItem","parseBindingRestProperty","parseBindingProperty","parsePropertyName","_left","ObjectProperty","checkLVal","in","checkClashes","hasParenthesizedAncestor","_expression$extra","checkIdentifier","validity","ParseErrorClass","isParenthesizedExpression","nextAncestor","child","declareNameFromIdentifier","identifier","allowPattern","nonNull","x","assert","TSErrors","AbstractMethodHasImplementation","methodName","AbstractPropertyHasInitializer","propertyName","AccesorCannotDeclareThisParameter","AccesorCannotHaveTypeParameters","AccessorCannotBeOptional","ClassMethodHasDeclare","ClassMethodHasReadonly","ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumReference","ConstructorHasTypeParameters","DeclareAccessor","DeclareClassFieldHasInitializer","DeclareFunctionHasImplementation","DuplicateAccessibilityModifier","modifier","DuplicateModifier","EmptyHeritageClauseType","EmptyTypeArguments","EmptyTypeParameters","ExpectedAmbientAfterExportDeclare","ImportAliasHasImportType","IncompatibleModifiers","modifiers","IndexSignatureHasAbstract","IndexSignatureHasAccessibility","IndexSignatureHasDeclare","IndexSignatureHasOverride","IndexSignatureHasStatic","InitializerNotAllowedInAmbientContext","InvalidModifierOnTypeMember","InvalidModifierOnTypeParameter","InvalidModifierOnTypeParameterPositions","InvalidModifiersOrder","orderedModifiers","InvalidPropertyAccessAfterInstantiationExpression","InvalidTupleMemberLabel","MissingInterfaceName","MixedLabeledAndUnlabeledElements","NonAbstractClassHasAbstractMethod","NonClassMethodPropertyHasAbstractModifer","OptionalTypeBeforeRequired","OverrideNotInSubClass","PrivateElementHasAbstract","PrivateElementHasAccessibility","ReadonlyForMethodSignature","ReservedArrowTypeParam","ReservedTypeAssertion","SetAccesorCannotHaveOptionalParameter","SetAccesorCannotHaveRestParameter","SetAccesorCannotHaveReturnType","SingleTypeParameterWithoutTrailingComma","typeParameterName","StaticBlockCannotHaveModifier","TupleOptionalAfterType","TypeAnnotationAfterAssign","TypeImportCannotSpecifyDefaultAndNamed","TypeModifierIsUsedInTypeExports","TypeModifierIsUsedInTypeImports","UnexpectedParameterModifier","UnexpectedReadonly","UnexpectedTypeAnnotation","UnexpectedTypeCastInParameter","UnsupportedImportTypeArgument","UnsupportedParameterPropertyKind","UnsupportedSignatureParameterKind","keywordTypeFromName","tsIsAccessModifier","tsIsVarianceAnnotations","typescript","TypeScriptParserMixin","tsParseInOutModifiers","tsParseModifiers","bind","allowedModifiers","disallowedModifiers","errorTemplate","tsParseConstModifier","tsParseInOutConstModifiers","tsIsIdentifier","tsTokenCanFollowModifier","tsNextTokenCanFollowModifier","tsParseModifier","stopOnStartOfClassStaticBlock","tsIsStartOfStaticBlocks","tsTryParse","modified","enforceOrder","before","after","incompatible","mod1","mod2","accessibility","tsIsListTerminator","tsParseList","parseElement","tsParseDelimitedList","refTrailingCommaPos","tsParseDelimitedListWorker","expectSuccess","trailingCommaPos","tsParseBracketedList","bracket","skipFirstToken","tsParseImportType","qualifier","tsParseEntityName","tsParseTypeArguments","allowReservedWords","tsParseTypeReference","typeName","tsParseThisTypePredicate","lhs","parameterName","tsParseTypeAnnotation","asserts","tsParseThisTypeNode","tsParseTypeQuery","exprName","tsParseTypeParameter","parseModifiers","tsParseTypeParameterName","constraint","tsEatThenParseType","tsTryParseTypeParameters","tsParseTypeParameters","tsFillSignature","returnToken","signature","returnTokenRequired","paramsKey","returnTypeKey","tsParseBindingListForSignature","tsParseTypeOrTypePredicateAnnotation","tsParseTypeMemberSemicolon","tsParseSignatureMember","tsIsUnambiguouslyIndexSignature","tsTryParseIndexSignature","tsLookAhead","parameters","tsTryParseTypeAnnotation","tsParsePropertyOrMethodSignature","readonly","nodeAny","firstParameter","tsParseTypeMember","idx","tsParseTypeLiteral","tsParseObjectTypeMembers","tsIsStartOfMappedType","tsParseMappedTypeParameter","tsExpectThenParseType","tsParseMappedType","nameType","tsParseType","tsTryParseType","tsParseTupleType","elementTypes","tsParseTupleElementType","seenOptionalElement","labeledElements","elementNode","_labeledElements","checkType","isLabeled","labeled","isWord","chAfterWord","wordName","typeOrLabel","tsParseNonArrayType","labeledNode","optionalTypeNode","restNode","tsParseParenthesizedType","tsParseFunctionOrConstructorType","abstract","tsInAllowConditionalTypesContext","tsParseLiteralTypeNode","tsParseTemplateLiteralType","parseTemplate","parseTemplateSubstitution","tsParseThisTypeOrThisTypePredicate","thisKeyword","parseMaybeUnary","nodeType","tsParseArrayTypeOrHigher","tsParseTypeOperator","tsParseTypeOperatorOrHigher","tsCheckTypeAnnotationForReadOnly","tsParseInferType","tsParseConstraintForInferType","tsInDisallowConditionalTypesContext","isTypeOperator","tsParseUnionOrIntersectionType","parseConstituentType","hasLeadingOperator","tsParseIntersectionTypeOrHigher","tsParseUnionTypeOrHigher","tsIsStartOfFunctionType","tsIsUnambiguouslyStartOfFunctionType","tsSkipParameterStart","previousErrorCount","_unused2","tsInType","t","tsParseTypePredicateAsserts","thisTypePredicate","typePredicateVariable","tsParseTypePredicatePrefix","tsTryParseTypeOrTypePredicateAnnotation","eatColon","tsParseNonConditionalType","extendsType","trueType","falseType","isAbstractConstructorSignature","tsParseTypeAssertion","tsParseHeritageClause","originalStartLoc","delimitedList","tsParseInterfaceDeclaration","tsParseTypeAliasDeclaration","tsInNoContext","cb","oldContext","oldInDisallowConditionalTypesContext","tsNextThenParseType","tsParseEnumMember","initializer","tsParseEnumDeclaration","tsParseModuleBlock","parseBlockOrModuleBlockBody","tsParseModuleOrNamespaceDeclaration","nested","inner","tsParseAmbientExternalModuleDeclaration","global","tsParseImportEqualsDeclaration","maybeDefaultIdentifier","moduleReference","tsParseModuleReference","tsIsExternalModuleReference","tsParseExternalModuleReference","f","tsTryParseAndCatch","tsTryParseDeclare","nany","startType","tsInAmbientContext","parseFunctionStatement","parseClass","parseVarStatement","tsParseDeclaration","tsTryParseExportDeclaration","tsParseExpressionStatement","mod","tsCheckLineTerminator","tsParseAbstractDeclaration","tsTryParseGenericAsyncArrowFunction","oldMaybeInArrowParameters","tsParseTypeArgumentsInExpression","reScan_lt","reScan_lt_gt","tsIsDeclarationStart","override","pp","parameter","isSimpleParameter","tsDisallowOptionalPattern","bodilessType","registerFunctionStatementId","tsCheckForInvalidTypeCasts","items","isInParens","nonNullExpression","isOptionalCall","missingParenErrorLoc","atPossibleAsyncArrow","asyncArrowFn","parseTaggedTemplateExpression","tokenType","_callee$extra","parseExprOp","leftStartLoc","minPrec","isSatisfies","checkKeywords","checkDuplicateExports","importNode","parseMaybeImportPhase","parseImportSpecifiersAndAfter","isAbstractClass","cls","allowMissingInitializer","declarations","isValidAmbientConstInitializer","parseStatementContent","parseAccessModifier","tsHasSomeModifiers","callParseClassMemberWithIsStatic","parseClassStaticBlock","parseClassMemberWithIsStatic","hadSuperClass","parsePostMemberNameModifiers","methodOrProp","isDeclare","isIdentifier","parseClassPropertyAnnotation","definite","parseClassAccessorProperty","declareClassPrivateMethodInScope","_typeCast","_typeCast2","typeCast","_typeParameters","reportReservedArrowTypeParam","trailingComma","sawUnary","toAssignableParenthesizedExpression","TSTypeCastExpression","TSParameterProperty","TSNonNullExpression","TSAsExpression","TSSatisfiesExpression","TSTypeAssertion","parseMaybeDecoratorArguments","canHaveLeadingDecorator","getGetterSetterExpectedParamCount","baseCount","firstParam","hasContextParam","parseCatchClauseParam","oldIsAmbientContext","oldInAbstractClass","maybeTakeDecorators","hasBody","shouldParseAsAmbientContext","getExpression","parseExportSpecifier","isString","isInTypeExport","parseTypeOnlyImportExportSpecifier","isImport","isInTypeOnlyImportExport","leftOfAsKey","rightOfAsKey","leftOfAs","rightOfAs","hasTypeSpecifier","canParseAsKeyword","firstAs","secondAs","parseModuleExportName","kindKey","isPossiblyLiteralEnum","expressions","isUncomputedMemberExpressionChain","isNumber","isNegativeNumber","PlaceholderErrors","ClassNameIsRequired","UnexpectedSpace","placeholders","PlaceholdersParserMixin","parsePlaceholder","assertNoSpace","finishPlaceholder","isFinished","chStartsBindingIdentifier","verifyBreakContinue","isBreak","parseStatementOrSloppyAnnexBFunctionDeclaration","parseBlock","createNewLexicalScope","parseFunctionId","requireId","oldStrict","parseClassBody","startsWith","maybeParseExportDefaultSpecifier","_specifiers","checkExport","hasStarImport","maybeParseStarImportSpecifier","parseNamedImportSpecifiers","parseImportSource","v8intrinsic","V8IntrinsicMixin","parseV8Intrinsic","v8IntrinsicStartLoc","parseIdentifierName","expectedConfig","expectedName","expectedOptions","expectedKeys","expectedOptionsIsEmpty","p","option","find","PIPELINE_PROPOSALS","TOPIC_TOKENS","RECORD_AND_TUPLE_SYNTAX_TYPES","validatePlugins","decoratorsBeforeExport","allowCallParenthesized","proposalList","tupleSyntaxIsHash","syntaxType","tokenList","moduleAttributesVersionPluginOption","missingPlugins","mixinPlugins","mixinPluginNames","defaultOptions","sourceFilename","allowAwaitOutsideFunction","allowReturnOutsideFunction","allowNewTargetOutsideFunction","allowImportExportEverywhere","allowSuperOutsideMethod","allowUndeclaredExports","createParenthesizedExpressions","getOptions","opts","_opts$key","ExpressionParser","checkProto","isRecord","protoRef","used","shouldExitDescending","disallowIn","disallowInAnd","parseExpressionBase","allowInAnd","parseMaybeAssignDisallowIn","resultError","_resultError$loc","parseYield","ownExpressionErrors","parseMaybeConditional","startIndex","parseExprOps","parseMaybeUnaryOrPrivate","op","prec","checkPipelineAtInfixOperator","logical","coalesce","parseExprOpRightExpr","finishedNode","nextOp","withTopicBindingContext","parseHackPipeBody","parseSmartPipelineBodyInStyle","parseExprOpBaseRightExpr","withSoloAwaitPermittingContext","parseFSharpPipelineBody","_body$extra","requiredParentheses","topicReferenceWasUsedInCurrentContext","checkExponentialAfterUnary","isAwait","isAwaitAllowed","parseAwait","update","isDelete","parseUpdate","isAmbiguousAwait","updateExpressionNode","parseExprSubscripts","maybeAsyncArrow","parseBind","parseCoverCallAndAsyncArrowHead","parseMember","parseNoCallExpr","tag","quasi","expectImportAttributesPlugin","dynamicImport","allowPlaceholder","nodeForExtra","oldInFSharpPipelineDirectBody","addTrailingCommaExtraToNode","parseExprListItem","_call$extra","parseSuper","parseImportMetaProperty","parseDo","parseFunctionOrFunctionSent","parseDecorators","parseNewOrNewTarget","parseTopicReferenceThenEqualsSign","parseTopicReference","pipeProposal","parseModuleExpression","parseAsyncFunctionExpression","parseAsyncArrowUnaryFunction","topicTokenType","topicTokenValue","finishTopicReference","testTopicReferenceConfiguration","topicReferenceIsAllowedInCurrentContext","registerTopicReference","meta","parseMetaProperty","parseFunction","innerStartLoc","spreadStartLoc","optionalCommaStartLoc","spreadNodeStartLoc","innerEndLoc","arrowNode","wrapParenthesis","parenExpression","metaProp","parseNew","parseExprList","parseTemplateElement","isTagged","elemStart","elem","isTail","endOffset","elemEnd","cooked","tail","curElt","quasis","propHash","parsePropertyDefinition","maybeAsyncOrAccessorProp","keyName","_params","finishedProp","generator","isExpression","hasStrictModeDirective","nonSimple","isSimpleParamList","formalParameters","reservedTest","delegating","delegate","childExpr","isSimpleReference","checkSmartPipeTopicBodyEarlyErrors","callback","outerContextTopicState","withSmartMixTopicForbiddingContext","outerContextSoloAwaitState","prodParamToSet","prodParamToClear","ret","revertScopes","parseProgram","loopLabel","switchLabel","loneSurrogate","keywordRelationalOperator","babel7CompatTokens","hashEndPos","hashEndLoc","backquoteEnd","backquoteEndLoc","startToken","templateValue","templateElementEnd","templateElementEndLoc","endToken","StatementParser","interpreter","parseInterpreterDirective","finishedProgram","stmtToDirective","directiveLiteral","hasFollowingBindingAtom","endCh","chStartsBindingPattern","hasInLineFollowingBindingIdentifier","startsUsingForOf","startsAwaitUsing","parseModuleItem","ParseStatementFlag","parseStatementListItem","allowLabeledFunction","parseStatement","starttype","allowDeclaration","allowFunctionDeclaration","parseBreakContinueStatement","parseDebuggerStatement","parseDoWhileStatement","parseForStatement","parseIfStatement","parseReturnStatement","parseSwitchStatement","parseThrowStatement","parseTryStatement","parseWhileStatement","parseWithStatement","parseEmptyStatement","nextTokenCharCode","isAsyncFunction","maybeName","parseLabeledStatement","decoratorsEnabledBeforeExport","maybeDecorators","classNode","exportNode","allowExport","paramsStartLoc","lab","parseHeaderExpression","awaitAt","parseFor","startsWithLet","startsWithAwaitUsing","starsWithUsingDeclaration","isLetOrUsing","initNode","parseVar","isForIn","parseForIn","startsWithAsync","isForOf","isHangingDeclaration","ParseFunctionFlag","discriminant","cases","cur","sawDefault","isCase","block","handler","clause","finalizer","statementStart","parsedNonDirective","await","isFor","hangingDeclaration","isDeclaration","hadConstructor","publicMethod","privateMethod","publicProp","privateProp","accessorProp","publicMember","parseClassElementName","isPrivate","maybeQuestionTokenStartLoc","pushClassPrivateProperty","pushClassProperty","pushClassAccessorProperty","_member$decorators","parseInitializer","hasDefault","parseAfterDefault","hasStar","parseAfterNamespace","isFromRequired","hasSpecifiers","maybeParseExportNamedSpecifiers","hasDeclaration","maybeParseExportDeclaration","_node2$declaration","isTypeExport","assertions","nextType","hasFrom","nextAfterFrom","maybeParseImportAttributes","checkJSONModuleImport","checkNames","isDefault","isFrom","_node$specifiers","_declaration$extra","nodes","surrogate","isJSONModuleImport","_node$assertions","nonDefaultNamedSpecifier","phaseIdentifier","isImportPhase","isPrecedingIdImportPhase","parseImportSourceAndAttributes","maybeParseDefaultImportSpecifier","parseNext","_node$specifiers2","parseImportAttributes","attrs","attrNames","parseModuleAttributes","useWith","importSpecifier","Parser","pluginsMap","pluginMap","_options","getParser","ast","moduleError","generateExportedTokenTypes","internalTokenTypes","tokTypes","getParserClass","parserClassCache","pluginsFromOptions","pluginList"],"mappings":";;;;;;;;;;;;;;AAOO,MAAMA,QAAQ,CAAC;EAKpBC,WAAWA,CAACC,IAAY,EAAEC,GAAW,EAAEC,KAAa,EAAE;IAAA,IAAA,CAJtDF,IAAI,GAAA,KAAA,C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