Switch some ParseExpression calls to IdentifierName calls

このコミットが含まれているのは:
Sergio Pedri committed 2022-08-28 00:23:30 +02:00
1 親 96c0c911f5
コミット dac1b99f2c
2ファイル変更
+4 -4

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

+3 -3
ファイルの表示
@@ -363,7 +363,7 @@ internal sealed partial class ShaderSourceRewriter : HlslSourceRewriter
// Allow specialized types to track the method invocation, if needed
TrackKnownMethodInvocation(metadataName);
return updatedNode.WithExpression(ParseExpression(mapping!));
return updatedNode.WithExpression(IdentifierName(mapping!));
}
// Update the name if the target is a local function. The exact schema for the
@@ -372,7 +372,7 @@ internal sealed partial class ShaderSourceRewriter : HlslSourceRewriter
{
var functionIdentifier = $"__{this.currentMethod!.Identifier.Text}__{method.Name}";
return updatedNode.WithExpression(ParseExpression(functionIdentifier));
return updatedNode.WithExpression(IdentifierName(functionIdentifier));
}
// If the method is an external static method, import and rewrite it as well.
@@ -398,7 +398,7 @@ internal sealed partial class ShaderSourceRewriter : HlslSourceRewriter
this.staticMethods.Add(method, processedMethod.WithIdentifier(Identifier(methodIdentifier)));
}
return updatedNode.WithExpression(ParseExpression(methodIdentifier));
return updatedNode.WithExpression(IdentifierName(methodIdentifier));
}
}
else
+1 -1
ファイルの表示
@@ -106,7 +106,7 @@ internal sealed partial class StaticFieldRewriter : HlslSourceRewriter
mapping = HlslKnownMethods.GetMappedNameWithParameters(method.Name, method.Parameters.Select(static p => p.Type.Name));
}
return updatedNode.WithExpression(ParseExpression(mapping!));
return updatedNode.WithExpression(IdentifierName(mapping!));
}
}