(ctx context.Context, node *ast.Node, body *ast.Node, sourceFile *ast.SourceFile, l *LanguageService)
| 542 | } |
| 543 | |
| 544 | func functionSpan(ctx context.Context, node *ast.Node, body *ast.Node, sourceFile *ast.SourceFile, l *LanguageService) *lsproto.FoldingRange { |
| 545 | openToken := tryGetFunctionOpenToken(node, body, sourceFile) |
| 546 | closeToken := astnav.FindChildOfKind(body, ast.KindCloseBraceToken, sourceFile) |
| 547 | if openToken != nil && closeToken != nil { |
| 548 | return rangeBetweenTokens(ctx, openToken, closeToken, sourceFile, true /*useFullStart*/, l) |
| 549 | } |
| 550 | return nil |
| 551 | } |
| 552 | |
| 553 | func tryGetFunctionOpenToken(node *ast.SignatureDeclaration, body *ast.Node, sourceFile *ast.SourceFile) *ast.Node { |
| 554 | if isNodeArrayMultiLine(node.Parameters(), sourceFile) { |
no test coverage detected