diff --git a/src/parser.ts b/src/parser.ts index 4e102d66..0b98f5f1 100644 --- a/src/parser.ts +++ b/src/parser.ts @@ -304,7 +304,7 @@ export function parseStatementList( while (parser.token === Token.StringLiteral) { // "use strict" must be the exact literal without escape sequences or line continuation. const { index, tokenPos, tokenValue, linePos, colPos, token } = parser; - const expr = parseLiteral(parser, context, tokenPos, linePos, colPos); + const expr = parseLiteral(parser, context); if (isValidStrictMode(parser, index, tokenPos, tokenValue)) context |= Context.Strict; statements.push(parseDirective(parser, context, expr, token, tokenPos, linePos, colPos)); } @@ -355,17 +355,7 @@ export function parseModuleItemList( if (context & Context.OptionsDirectives) { while (parser.token === Token.StringLiteral) { const { tokenPos, linePos, colPos, token } = parser; - statements.push( - parseDirective( - parser, - context, - parseLiteral(parser, context, tokenPos, linePos, colPos), - token, - tokenPos, - linePos, - colPos - ) - ); + statements.push(parseDirective(parser, context, parseLiteral(parser, context), token, tokenPos, linePos, colPos)); } } @@ -666,7 +656,7 @@ export function parseExpressionOrLabelledStatement( switch (token) { case Token.LetKeyword: - expr = parseIdentifier(parser, context, 0, start, line, column); + expr = parseIdentifier(parser, context, 0); if (context & Context.Strict) report(parser, Errors.UnexpectedLetStrictReserved); if (parser.token === Token.Colon) @@ -1015,7 +1005,7 @@ export function parseAsyncArrowOrAsyncFunctionDeclaration( const { token, tokenValue } = parser; - let expr: ESTree.Expression = parseIdentifier(parser, context, 0, start, line, column); + let expr: ESTree.Expression = parseIdentifier(parser, context, 0); if (parser.token === Token.Colon) { return parseLabelledStatement( @@ -1070,7 +1060,7 @@ export function parseAsyncArrowOrAsyncFunctionDeclaration( scope = addChildScope(createScope(), ScopeKind.FuncBody); addBlockName(parser, context, scope, parser.tokenValue, BindingKind.ArgumentList, BindingOrigin.Other); } - const param = [parseIdentifier(parser, context, 0, parser.tokenPos, parser.linePos, parser.colPos)]; + const param = [parseIdentifier(parser, context, 0)]; // This has to be an async arrow, so let the caller throw on missing arrows etc expr = parseArrowFunctionExpression(parser, context, scope, param, 1, start, line, column); @@ -1556,8 +1546,8 @@ export function parseContinueStatement( nextToken(parser, context); let label: ESTree.Identifier | undefined | null = null; if ((parser.flags & Flags.NewLine) === 0 && parser.token & Token.IsIdentifier) { - const { tokenValue, tokenPos, linePos, colPos } = parser; - label = parseIdentifier(parser, context | Context.AllowRegExp, 0, tokenPos, linePos, colPos); + const { tokenValue } = parser; + label = parseIdentifier(parser, context | Context.AllowRegExp, 0); if (!isValidLabel(parser, labels, tokenValue, /* requireIterationStatement */ 1)) report(parser, Errors.UnknownLabel, tokenValue); } @@ -1592,8 +1582,8 @@ export function parseBreakStatement( nextToken(parser, context | Context.AllowRegExp); let label: ESTree.Identifier | undefined | null = null; if ((parser.flags & Flags.NewLine) === 0 && parser.token & Token.IsIdentifier) { - const { tokenValue, tokenPos, linePos, colPos } = parser; - label = parseIdentifier(parser, context | Context.AllowRegExp, 0, tokenPos, linePos, colPos); + const { tokenValue } = parser; + label = parseIdentifier(parser, context | Context.AllowRegExp, 0); if (!isValidLabel(parser, labels, tokenValue, /* requireIterationStatement */ 0)) report(parser, Errors.UnknownLabel, tokenValue); } else if ((context & (Context.InSwitch | Context.InIteration)) === 0) { @@ -1881,7 +1871,7 @@ export function parseLetIdentOrVarDeclarationStatement( column: number ): ESTree.VariableDeclaration | ESTree.LabeledStatement | ESTree.ExpressionStatement { const { token, tokenValue } = parser; - let expr: ESTree.Identifier | ESTree.Expression = parseIdentifier(parser, context, 0, start, line, column); + let expr: ESTree.Identifier | ESTree.Expression = parseIdentifier(parser, context, 0); if (parser.token & (Token.IsIdentifier | Token.IsPatternStart)) { /* VariableDeclarations :: @@ -2193,7 +2183,7 @@ export function parseForStatement( if (isVarDecl) { if (token === Token.LetKeyword) { - init = parseIdentifier(parser, context, 0, tokenPos, linePos, colPos); + init = parseIdentifier(parser, context, 0); if (parser.token & (Token.IsIdentifier | Token.IsPatternStart)) { if (parser.token === Token.InKeyword) { if (context & Context.Strict) report(parser, Errors.DisallowedLetInStrict); @@ -2415,13 +2405,13 @@ function parseImportDeclaration( // 'import' ModuleSpecifier ';' if (parser.token === Token.StringLiteral) { - source = parseLiteral(parser, context, tokenPos, linePos, colPos); + source = parseLiteral(parser, context); } else { if (parser.token & Token.IsIdentifier) { validateBindingIdentifier(parser, context, BindingKind.Const, parser.token, 0); if (context & Context.OptionsLexical) addBlockName(parser, context, scope, parser.tokenValue, BindingKind.Let, BindingOrigin.Other); - const local = parseIdentifier(parser, context, 0, tokenPos, linePos, colPos); + const local = parseIdentifier(parser, context, 0); specifiers.push( finishNode(parser, context, tokenPos, linePos, colPos, { type: 'ImportDefaultSpecifier', @@ -2498,7 +2488,7 @@ function parseImportNamespaceSpecifier( if (scope) addBlockName(parser, context, scope, parser.tokenValue, BindingKind.Let, BindingOrigin.Other); - const local = parseIdentifier(parser, context, 0, parser.tokenPos, parser.linePos, parser.colPos); + const local = parseIdentifier(parser, context, 0); specifiers.push( finishNode(parser, context, tokenPos, linePos, colPos, { @@ -2523,7 +2513,7 @@ function parseModuleSpecifier(parser: ParserState, context: Context): ESTree.Lit if (parser.token !== Token.StringLiteral) report(parser, Errors.InvalidExportImportSource, 'Import'); - return parseLiteral(parser, context, parser.tokenPos, parser.linePos, parser.colPos); + return parseLiteral(parser, context); } function parseImportSpecifierOrNamedImports( @@ -2549,7 +2539,7 @@ function parseImportSpecifierOrNamedImports( while (parser.token & Token.IsIdentifier) { let { token, tokenValue, tokenPos, linePos, colPos } = parser; - const imported = parseIdentifier(parser, context, 0, tokenPos, linePos, colPos); + const imported = parseIdentifier(parser, context, 0); let local: ESTree.Identifier; if (consumeOpt(parser, context, Token.AsKeyword)) { @@ -2559,7 +2549,7 @@ function parseImportSpecifierOrNamedImports( validateBindingIdentifier(parser, context, BindingKind.Const, parser.token, 0); } tokenValue = parser.tokenValue; - local = parseIdentifier(parser, context, 0, parser.tokenPos, parser.linePos, parser.colPos); + local = parseIdentifier(parser, context, 0); } else { // Keywords cannot be bound to themselves, so an import name // that is a keyword is a syntax error if it is not followed @@ -2708,7 +2698,7 @@ function parseExportDeclaration( const lineBeforeAsync = parser.linePos; const columnBeforeAsync = parser.colPos; - declaration = parseIdentifier(parser, context, 0, idxBeforeAsync, lineBeforeAsync, columnBeforeAsync); + declaration = parseIdentifier(parser, context, 0); const { flags } = parser; if ((flags & Flags.NewLine) === 0) { if (parser.token === Token.FunctionKeyword) { @@ -2759,7 +2749,7 @@ function parseExportDeclaration( } else if (parser.token & Token.IsIdentifier) { if (scope) scope = createArrowScope(parser, context, parser.tokenValue); - declaration = parseIdentifier(parser, context, 0, parser.tokenPos, parser.linePos, parser.colPos); + declaration = parseIdentifier(parser, context, 0); declaration = parseArrowFunctionExpression( parser, context, @@ -2807,7 +2797,7 @@ function parseExportDeclaration( specifiers.push( finishNode(parser, context, parser.tokenPos, parser.linePos, parser.colPos, { type: 'ExportNamespaceSpecifier', - specifier: parseIdentifier(parser, context, 0, start, line, column) + specifier: parseIdentifier(parser, context, 0) }) ); } @@ -2816,7 +2806,7 @@ function parseExportDeclaration( if (parser.token !== Token.StringLiteral) report(parser, Errors.InvalidExportImportSource, 'Export'); - source = parseLiteral(parser, context, parser.tokenPos, parser.linePos, parser.colPos); + source = parseLiteral(parser, context); matchOrInsertSemicolon(parser, context | Context.AllowRegExp); @@ -2859,7 +2849,7 @@ function parseExportDeclaration( while (parser.token & Token.IsIdentifier) { const { tokenPos, tokenValue, linePos, colPos } = parser; - const local = parseIdentifier(parser, context, 0, tokenPos, linePos, colPos); + const local = parseIdentifier(parser, context, 0); let exported: ESTree.Identifier | null; if (parser.token === Token.AsKeyword) { @@ -2868,7 +2858,7 @@ function parseExportDeclaration( tmpExportedNames.push(parser.tokenValue); tmpExportedBindings.push(tokenValue); } - exported = parseIdentifier(parser, context, 0, parser.tokenPos, parser.linePos, parser.colPos); + exported = parseIdentifier(parser, context, 0); } else { if (scope) { tmpExportedNames.push(parser.tokenValue); @@ -2895,7 +2885,7 @@ function parseExportDeclaration( // 'from' keyword since it references a local binding. if (parser.token !== Token.StringLiteral) report(parser, Errors.InvalidExportImportSource, 'Export'); - source = parseLiteral(parser, context, parser.tokenPos, parser.linePos, parser.colPos); + source = parseLiteral(parser, context); } else if (scope) { let i = 0; let iMax = tmpExportedNames.length; @@ -3455,7 +3445,7 @@ export function parseFunctionBody( if (parser.token !== Token.RightBrace) { while (parser.token === Token.StringLiteral) { const { index, tokenPos, tokenValue, token } = parser; - const expr = parseLiteral(parser, context, parser.tokenPos, parser.linePos, parser.colPos); + const expr = parseLiteral(parser, context); if (isValidStrictMode(parser, index, tokenPos, tokenValue)) { context |= Context.Strict; // TC39 deemed "use strict" directives to be an error when occurring @@ -3723,7 +3713,7 @@ function parsePropertyOrPrivatePropertyName(parser: ParserState, context: Contex return context & Context.OptionsNext && parser.token === Token.PrivateField ? parsePrivateName(parser, context, parser.tokenPos, parser.linePos, parser.colPos) - : parseIdentifier(parser, context, 0, parser.tokenPos, parser.linePos, parser.colPos); + : parseIdentifier(parser, context, 0); } /** @@ -3853,7 +3843,7 @@ export function parsePrimaryExpressionExtended( if (context & ((context & Context.InYieldContext) | Context.Strict)) report(parser, Errors.DisallowedInContext, 'yield'); - return parseIdentifier(parser, context, 0, start, line, column); + return parseIdentifier(parser, context, 0); } /** @@ -3871,7 +3861,7 @@ export function parsePrimaryExpressionExtended( } if ((token & Token.IsIdentifier) === Token.IsIdentifier) { const tokenValue = parser.tokenValue; - const expr = parseIdentifier(parser, context | Context.TaggedTemplate, identifierPattern, start, line, column); + const expr = parseIdentifier(parser, context | Context.TaggedTemplate, identifierPattern); if (token === Token.AsyncKeyword) { return parseAsyncExpression(parser, context, expr, inNewExpression, allowAssign, inGroup, start, line, column); @@ -3905,7 +3895,7 @@ export function parsePrimaryExpressionExtended( if ((token & Token.IsStringOrNumber) === Token.IsStringOrNumber) { parser.assignable = AssignmentKind.NotAssignable; - return parseLiteral(parser, context, start, line, column); + return parseLiteral(parser, context); } switch (token) { @@ -4090,7 +4080,7 @@ export function parseTemplateLiteral( * TemplateHead * * FullTemplate :: - * ` TemplateCharactersopt ` + * `TemplateCharactersopt` * * TemplateHead :: * ` TemplateCharactersopt ${ @@ -4120,7 +4110,7 @@ export function parseTemplateLiteral( return finishNode(parser, context, start, line, column, { type: 'TemplateLiteral', expressions: [], - quasis: [parseTemplateTail(parser, context, start, line, column)] + quasis: [parseTemplateTail(parser, context)] }); } @@ -4131,18 +4121,12 @@ export function parseTemplateLiteral( * @param context Context masks * @returns {ESTree.TemplateElement} */ -export function parseTemplateTail( - parser: ParserState, - context: Context, - start: number, - line: number, - column: number -): ESTree.TemplateElement { - const { tokenValue, tokenRaw } = parser; +export function parseTemplateTail(parser: ParserState, context: Context): ESTree.TemplateElement { + const { tokenValue, tokenRaw, startPos, linePos, colPos } = parser; consume(parser, context, Token.TemplateTail); - return finishNode(parser, context, start, line, column, { + return finishNode(parser, context, startPos, linePos, colPos, { type: 'TemplateElement', value: { cooked: tokenValue, @@ -4165,7 +4149,7 @@ export function parseTemplate( line: number, column: number ): ESTree.TemplateLiteral { - const quasis = [parseTemplateSpans(parser, context, /* tail */ false, start, line, column)]; + const quasis = [parseTemplateSpans(parser, context, /* tail */ false)]; consume(parser, context | Context.AllowRegExp, Token.TemplateContinuation); const expressions = [ @@ -4182,12 +4166,12 @@ export function parseTemplate( if (parser.token !== Token.RightBrace) report(parser, Errors.InvalidTemplateContinuation); while ((parser.token = scanTemplateTail(parser, context)) !== Token.TemplateTail) { const { tokenPos, linePos, colPos } = parser; - quasis.push(parseTemplateSpans(parser, context, /* tail */ false, tokenPos, linePos, colPos)); + quasis.push(parseTemplateSpans(parser, context, /* tail */ false)); consume(parser, context | Context.AllowRegExp, Token.TemplateContinuation); expressions.push(parseExpressions(parser, context, 0, 1, tokenPos, linePos, colPos)); } - quasis.push(parseTemplateSpans(parser, context, /* tail */ true, parser.tokenPos, parser.linePos, parser.colPos)); + quasis.push(parseTemplateSpans(parser, context, /* tail */ true)); nextToken(parser, context); @@ -4204,15 +4188,9 @@ export function parseTemplate( * @param parser Parser object * @param tail */ -export function parseTemplateSpans( - parser: ParserState, - context: Context, - tail: boolean, - start: number, - line: number, - column: number -): ESTree.TemplateElement { - return finishNode(parser, context, start, line, column, { +export function parseTemplateSpans(parser: ParserState, context: Context, tail: boolean): ESTree.TemplateElement { + const { tokenPos, linePos, colPos } = parser; + return finishNode(parser, context, tokenPos, linePos, colPos, { type: 'TemplateElement', value: { cooked: parser.tokenValue, @@ -4292,22 +4270,15 @@ export function parseArguments( * @param parser Parser object * @param context Context masks */ -export function parseIdentifier( - parser: ParserState, - context: Context, - isPattern: 0 | 1, - start: number, - line: number, - column: number -): ESTree.Identifier { - const { tokenValue } = parser; +export function parseIdentifier(parser: ParserState, context: Context, isPattern: 0 | 1): ESTree.Identifier { + const { tokenValue, tokenPos, linePos, colPos } = parser; nextToken(parser, context); return finishNode( parser, context, - start, - line, - column, + tokenPos, + linePos, + colPos, context & Context.OptionsIdentifierPattern ? { type: 'Identifier', @@ -4327,21 +4298,15 @@ export function parseIdentifier( * @param parser Parser object * @param context Context masks */ -export function parseLiteral( - parser: ParserState, - context: Context, - start: number, - line: number, - column: number -): ESTree.Literal { - const { tokenValue, tokenRaw } = parser; +export function parseLiteral(parser: ParserState, context: Context): ESTree.Literal { + const { tokenValue, tokenRaw, tokenPos, linePos, colPos } = parser; nextToken(parser, context); return finishNode( parser, context, - start, - line, - column, + tokenPos, + linePos, + colPos, context & Context.OptionsRaw ? { type: 'Literal', @@ -4508,7 +4473,7 @@ export function parseFunctionDeclaration( firstRestricted = parser.token; - id = parseIdentifier(parser, context, 0, parser.tokenPos, parser.linePos, parser.colPos); + id = parseIdentifier(parser, context, 0); } context = @@ -4591,7 +4556,7 @@ export function parseFunctionExpression( if (scope) scope = addChildScope(scope, ScopeKind.FuncRoot); firstRestricted = parser.token; - id = parseIdentifier(parser, context, 0, parser.tokenPos, parser.linePos, parser.colPos); + id = parseIdentifier(parser, context, 0); } context = @@ -5391,7 +5356,7 @@ export function parseObjectLiteralOrPattern( let value; if (parser.token & (Token.IsIdentifier | (parser.token & Token.Keyword))) { - key = parseIdentifier(parser, context, 0, tokenPos, linePos, colPos); + key = parseIdentifier(parser, context, 0); if (parser.token === Token.Comma || parser.token === Token.RightBrace || parser.token === Token.Assign) { state |= PropertyKind.Shorthand; @@ -5663,7 +5628,7 @@ export function parseObjectLiteralOrPattern( if (parser.flags & Flags.NewLine) report(parser, Errors.AsyncRestrictedProd); state |= PropertyKind.Async; } - key = parseIdentifier(parser, context, 0, parser.tokenPos, parser.linePos, parser.colPos); + key = parseIdentifier(parser, context, 0); if (token === Token.EscapedReserved) report(parser, Errors.UnexpectedStrictReserved); @@ -5705,9 +5670,9 @@ export function parseObjectLiteralOrPattern( state |= PropertyKind.Generator | PropertyKind.Method | (token === Token.AsyncKeyword ? PropertyKind.Async : 0); if (parser.token & Token.IsIdentifier) { - key = parseIdentifier(parser, context, 0, parser.tokenPos, parser.linePos, parser.colPos); + key = parseIdentifier(parser, context, 0); } else if ((parser.token & Token.IsStringOrNumber) === Token.IsStringOrNumber) { - key = parseLiteral(parser, context, parser.tokenPos, parser.linePos, parser.colPos); + key = parseLiteral(parser, context); } else if (parser.token === Token.LeftBracket) { state |= PropertyKind.Computed; key = parseComputedPropertyName(parser, context, inGroup); @@ -5735,7 +5700,7 @@ export function parseObjectLiteralOrPattern( : PropertyKind.Method; destructible |= DestructuringKind.CannotDestruct; - key = parseLiteral(parser, context, parser.tokenPos, parser.linePos, parser.colPos); + key = parseLiteral(parser, context); value = parseMethodDefinition( parser, @@ -5750,7 +5715,7 @@ export function parseObjectLiteralOrPattern( report(parser, Errors.UnexpectedCharAfterObjLit); } } else if ((parser.token & Token.IsStringOrNumber) === Token.IsStringOrNumber) { - key = parseLiteral(parser, context, tokenPos, linePos, colPos); + key = parseLiteral(parser, context); if (parser.token === Token.Colon) { consume(parser, context | Context.AllowRegExp, Token.Colon); @@ -6124,7 +6089,7 @@ export function parseObjectLiteralOrPattern( if (parser.token & Token.IsIdentifier) { const { token, line, index } = parser; - key = parseIdentifier(parser, context, 0, parser.tokenPos, parser.linePos, parser.colPos); + key = parseIdentifier(parser, context, 0); state |= PropertyKind.Method; @@ -6154,7 +6119,7 @@ export function parseObjectLiteralOrPattern( } } else if ((parser.token & Token.IsStringOrNumber) === Token.IsStringOrNumber) { destructible |= DestructuringKind.CannotDestruct; - key = parseLiteral(parser, context, parser.tokenPos, parser.linePos, parser.colPos); + key = parseLiteral(parser, context); state |= PropertyKind.Method; value = parseMethodDefinition(parser, context, state, inGroup, tokenPos, linePos, colPos); } else if (parser.token === Token.LeftBracket) { @@ -6651,7 +6616,7 @@ export function parseIdentifierOrArrow( ): ESTree.Identifier | ESTree.ArrowFunctionExpression { const { tokenValue } = parser; - const expr = parseIdentifier(parser, context, 0, start, line, column); + const expr = parseIdentifier(parser, context, 0); parser.assignable = AssignmentKind.Assignable; if (parser.token === Token.Arrow) { let scope: ScopeState | undefined = void 0; @@ -7060,7 +7025,7 @@ export function parseNewExpression( // - `new foo()();` // - `new (await foo);` // - `new x(await foo);` - const id = parseIdentifier(parser, context | Context.AllowRegExp, 0, start, line, column); + const id = parseIdentifier(parser, context | Context.AllowRegExp, 0); const { tokenPos, linePos, colPos } = parser; if (consumeOpt(parser, context, Token.Period)) { @@ -7122,7 +7087,7 @@ export function parseMetaProperty( line: number, column: number ): ESTree.MetaProperty { - const property = parseIdentifier(parser, context, 0, parser.tokenPos, parser.linePos, parser.colPos); + const property = parseIdentifier(parser, context, 0); return finishNode(parser, context, start, line, column, { type: 'MetaProperty', meta, @@ -7166,7 +7131,7 @@ export function parseAsyncExpression( addBlockName(parser, context, scope, parser.tokenValue, BindingKind.ArgumentList, BindingOrigin.Other); } - const param = [parseIdentifier(parser, context, 0, parser.tokenPos, parser.linePos, parser.colPos)]; + const param = [parseIdentifier(parser, context, 0)]; // This has to be an async arrow, so let the caller throw on missing arrows etc return parseArrowFunctionExpression(parser, context, scope, param, 1, start, line, column); @@ -7497,7 +7462,7 @@ export function parseClassDeclaration( } } - id = parseIdentifier(parser, context, 0, tokenPos, linePos, colPos); + id = parseIdentifier(parser, context, 0); } else { if (flags & HoistedClassFlags.Hoisted) { addBindingToExports(parser, ''); @@ -7593,7 +7558,7 @@ export function parseClassExpression( if ((parser.token & Token.IsEvalOrArguments) === Token.IsEvalOrArguments) report(parser, Errors.StrictEvalArguments); - id = parseIdentifier(parser, context, 0, parser.tokenPos, parser.linePos, parser.colPos); + id = parseIdentifier(parser, context, 0); } // Second set of context masks to fix 'super' edge cases @@ -7880,7 +7845,7 @@ function parseClassElementList( const { token, tokenPos, linePos, colPos } = parser; if (token & (Token.IsIdentifier | Token.FutureReserved)) { - key = parseIdentifier(parser, context, 0, tokenPos, linePos, colPos); + key = parseIdentifier(parser, context, 0); switch (token) { case Token.StaticKeyword: @@ -7935,7 +7900,7 @@ function parseClassElementList( kind = PropertyKind.Computed; key = parseComputedPropertyName(parser, inheritedContext, inGroup); } else if ((token & Token.IsStringOrNumber) === Token.IsStringOrNumber) { - key = parseLiteral(parser, context, tokenPos, linePos, colPos); + key = parseLiteral(parser, context); } else if (token === Token.Multiply) { kind |= PropertyKind.Generator; nextToken(parser, context); // skip: '*' @@ -7952,9 +7917,9 @@ function parseClassElementList( if (kind & (PropertyKind.Generator | PropertyKind.Async | PropertyKind.GetSet)) { if (parser.token & Token.IsIdentifier) { - key = parseIdentifier(parser, context, 0, parser.tokenPos, parser.linePos, parser.colPos); + key = parseIdentifier(parser, context, 0); } else if ((parser.token & Token.IsStringOrNumber) === Token.IsStringOrNumber) { - key = parseLiteral(parser, context, parser.tokenPos, parser.linePos, parser.colPos); + key = parseLiteral(parser, context); } else if (parser.token === Token.LeftBracket) { kind |= PropertyKind.Computed; key = parseComputedPropertyName(parser, context, /* inGroup */ 0); @@ -8637,7 +8602,7 @@ function parseJsxAttribute( const { tokenPos, linePos, colPos } = parser; switch (token) { case Token.StringLiteral: - value = parseLiteral(parser, context, tokenPos, linePos, colPos); + value = parseLiteral(parser, context); break; case Token.LessThan: value = parseJSXRootElementOrFragment(parser, context, /*inJSXChild*/ 1, tokenPos, linePos, colPos);