(open *ast.Node, inExpressionContext bool)
| 4916 | } |
| 4917 | |
| 4918 | func (p *Parser) parseJsxClosingElement(open *ast.Node, inExpressionContext bool) *ast.Node { |
| 4919 | pos := p.nodePos() |
| 4920 | p.parseExpected(ast.KindLessThanSlashToken) |
| 4921 | tagName := p.parseJsxElementName() |
| 4922 | if p.parseExpectedWithDiagnostic(ast.KindGreaterThanToken, nil /*diagnosticMessage*/, false /*shouldAdvance*/) { |
| 4923 | // manually advance the scanner in order to look for jsx text inside jsx |
| 4924 | if inExpressionContext || !ast.TagNamesAreEquivalent(open.TagName(), tagName) { |
| 4925 | p.nextToken() |
| 4926 | } else { |
| 4927 | p.scanJsxText() |
| 4928 | } |
| 4929 | } |
| 4930 | return p.finishNode(p.factory.NewJsxClosingElement(tagName), pos) |
| 4931 | } |
| 4932 | |
| 4933 | func (p *Parser) parseJsxOpeningOrSelfClosingElementOrOpeningFragment(inExpressionContext bool) *ast.Expression { |
| 4934 | pos := p.nodePos() |
no test coverage detected