Remove non-incremental source rewriters

このコミットが含まれているのは:
Sergio Pedri committed 2021-12-08 11:17:06 +01:00
1 親 fcbe997d78
コミット 5c5c3439cb
11ファイル変更
+66 -1371

検索条件に一致するファイルはありません

+8 -1
ファイルの表示
@@ -1,4 +1,5 @@
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Diagnostics.Contracts;
using System.Text;
using ComputeSharp.__Internals;
@@ -109,8 +110,14 @@ public sealed partial class ShaderMethodSourceGenerator : ISourceGenerator
IDictionary<IFieldSymbol, string> constantDefinitions)
{
Dictionary<IMethodSymbol, MethodDeclarationSyntax> staticMethods = new(SymbolEqualityComparer.Default);
ImmutableArray<Diagnostic>.Builder diagnostics = ImmutableArray.CreateBuilder<Diagnostic>();
ShaderSourceRewriter shaderSourceRewriter = new(semanticModel, discoveredTypes, staticMethods, constantDefinitions, context);
ShaderSourceRewriter shaderSourceRewriter = new(semanticModel, discoveredTypes, staticMethods, constantDefinitions, diagnostics);
foreach (Diagnostic diagnostic in diagnostics.ToImmutable())
{
context.ReportDiagnostic(diagnostic);
}
// Rewrite the method syntax tree
var targetMethod = shaderSourceRewriter