()
| 35182 | return parseMemberExpressionRest(pos, expression, /*allowOptionalChain*/ true); |
| 35183 | } |
| 35184 | function parseSuperExpression() { |
| 35185 | var pos = getNodePos(); |
| 35186 | var expression = parseTokenNode(); |
| 35187 | if (token() === 29 /* SyntaxKind.LessThanToken */) { |
| 35188 | var startPos = getNodePos(); |
| 35189 | var typeArguments = tryParse(parseTypeArgumentsInExpression); |
| 35190 | if (typeArguments !== undefined) { |
| 35191 | parseErrorAt(startPos, getNodePos(), ts.Diagnostics.super_may_not_use_type_arguments); |
| 35192 | } |
| 35193 | } |
| 35194 | if (token() === 20 /* SyntaxKind.OpenParenToken */ || token() === 24 /* SyntaxKind.DotToken */ || token() === 22 /* SyntaxKind.OpenBracketToken */) { |
| 35195 | return expression; |
| 35196 | } |
| 35197 | // If we have seen "super" it must be followed by '(' or '.'. |
| 35198 | // If it wasn't then just try to parse out a '.' and report an error. |
| 35199 | parseExpectedToken(24 /* SyntaxKind.DotToken */, ts.Diagnostics.super_must_be_followed_by_an_argument_list_or_member_access); |
| 35200 | // private names will never work with `super` (`super.#foo`), but that's a semantic error, not syntactic |
| 35201 | return finishNode(factory.createPropertyAccessExpression(expression, parseRightSideOfDot(/*allowIdentifierNames*/ true, /*allowPrivateIdentifiers*/ true)), pos); |
| 35202 | } |
| 35203 | function parseJsxElementOrSelfClosingElementOrFragment(inExpressionContext, topInvalidNodePosition, openingTag) { |
| 35204 | var pos = getNodePos(); |
| 35205 | var opening = parseJsxOpeningOrSelfClosingElementOrOpeningFragment(inExpressionContext); |
no test coverage detected
searching dependent graphs…