提交 0db2e9bc 编写于 作者: C Cyrus Najmabadi

Simplify

上级 a6c64a83
......@@ -213,12 +213,10 @@ public async Task ReportTodoCommentDataAsync(DocumentId documentId, ImmutableArr
using var _ = ArrayBuilder<TodoCommentData>.GetInstance(out var converted);
var text = await document.GetTextAsync(cancellationToken).ConfigureAwait(false);
var tree = document.SupportsSyntaxTree
? await document.GetSyntaxTreeAsync(cancellationToken).ConfigureAwait(false)
: null;
// TS doesn't have syntax trees, so just explicitly pass along null when converting the data.
foreach (var comment in todoComments)
converted.Add(comment.CreateSerializableData(document, text, tree));
converted.Add(comment.CreateSerializableData(document, text, tree: null));
await ReportTodoCommentDataAsync(
document.Id, converted.ToImmutable(), cancellationToken).ConfigureAwait(false);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册