(openingTag, token)
| 35268 | return finishNode(node, pos); |
| 35269 | } |
| 35270 | function parseJsxChild(openingTag, token) { |
| 35271 | switch (token) { |
| 35272 | case 1 /* SyntaxKind.EndOfFileToken */: |
| 35273 | // If we hit EOF, issue the error at the tag that lacks the closing element |
| 35274 | // rather than at the end of the file (which is useless) |
| 35275 | if (ts.isJsxOpeningFragment(openingTag)) { |
| 35276 | parseErrorAtRange(openingTag, ts.Diagnostics.JSX_fragment_has_no_corresponding_closing_tag); |
| 35277 | } |
| 35278 | else { |
| 35279 | // We want the error span to cover only 'Foo.Bar' in < Foo.Bar > |
| 35280 | // or to cover only 'Foo' in < Foo > |
| 35281 | var tag = openingTag.tagName; |
| 35282 | var start = ts.skipTrivia(sourceText, tag.pos); |
| 35283 | parseErrorAt(start, tag.end, ts.Diagnostics.JSX_element_0_has_no_corresponding_closing_tag, ts.getTextOfNodeFromSourceText(sourceText, openingTag.tagName)); |
| 35284 | } |
| 35285 | return undefined; |
| 35286 | case 30 /* SyntaxKind.LessThanSlashToken */: |
| 35287 | case 7 /* SyntaxKind.ConflictMarkerTrivia */: |
| 35288 | return undefined; |
| 35289 | case 11 /* SyntaxKind.JsxText */: |
| 35290 | case 12 /* SyntaxKind.JsxTextAllWhiteSpaces */: |
| 35291 | return parseJsxText(); |
| 35292 | case 18 /* SyntaxKind.OpenBraceToken */: |
| 35293 | return parseJsxExpression(/*inExpressionContext*/ false); |
| 35294 | case 29 /* SyntaxKind.LessThanToken */: |
| 35295 | return parseJsxElementOrSelfClosingElementOrFragment(/*inExpressionContext*/ false, /*topInvalidNodePosition*/ undefined, openingTag); |
| 35296 | default: |
| 35297 | return ts.Debug.assertNever(token); |
| 35298 | } |
| 35299 | } |
| 35300 | function parseJsxChildren(openingTag) { |
| 35301 | var list = []; |
| 35302 | var listPos = getNodePos(); |
no test coverage detected
searching dependent graphs…