Skip to content

Commit f75dd7f

Browse files
committed
Cleanup RewriterPhase3 code in MixKhronosData
1 parent 5cc9c6e commit f75dd7f

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

sources/SilkTouch/SilkTouch/Mods/MixKhronosData.cs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -376,16 +376,10 @@ public async Task ExecuteAsync(IModContext ctx, CancellationToken ct = default)
376376
}
377377

378378
// Rewrite phase 3
379+
var rewriter3 = new RewriterPhase3(jobData, currentConfig);
379380
foreach (var docId in proj.DocumentIds)
380381
{
381382
var doc = proj.GetDocument(docId) ?? throw new InvalidOperationException("Document missing");
382-
var syntaxTree = await doc.GetSyntaxTreeAsync(ct);
383-
if (syntaxTree == null)
384-
{
385-
continue;
386-
}
387-
388-
var rewriter3 = new RewriterPhase3(jobData, currentConfig);
389383
proj = doc.WithSyntaxRoot(
390384
rewriter3.Visit(await doc.GetSyntaxRootAsync(ct))?.NormalizeWhitespace()
391385
?? throw new InvalidOperationException("Visit returned null.")

0 commit comments

Comments
 (0)