(ctx context.Context, node *ast.Node, sourceFile *ast.SourceFile, l *LanguageService)
| 473 | } |
| 474 | |
| 475 | func spanForJSXAttributes(ctx context.Context, node *ast.Node, sourceFile *ast.SourceFile, l *LanguageService) *lsproto.FoldingRange { |
| 476 | var attributes *ast.JsxAttributesNode |
| 477 | if node.Kind == ast.KindJsxSelfClosingElement { |
| 478 | attributes = node.AsJsxSelfClosingElement().Attributes |
| 479 | } else { |
| 480 | attributes = node.AsJsxOpeningElement().Attributes |
| 481 | } |
| 482 | if len(attributes.Properties()) == 0 { |
| 483 | return nil |
| 484 | } |
| 485 | return createFoldingRangeFromBounds(ctx, astnav.GetStartOfNode(node, sourceFile, false /*includeJSDoc*/), node.End(), "", sourceFile, l) |
| 486 | } |
| 487 | |
| 488 | func spanForNodeArray(ctx context.Context, statements *ast.NodeList, sourceFile *ast.SourceFile, l *LanguageService) *lsproto.FoldingRange { |
| 489 | if statements != nil && len(statements.Nodes) != 0 { |
no test coverage detected