C
C#2mo ago
RumTery

How to catch implicit conversion using SyntaxWalker and SemanticModel?

I'm traversing syntax tree and need a way to catch implicit conversion. SyntaxWalker doesn't have such virtual method and SyntaxTree itself doesn't have any info about implicit conversions. What should I do?
No description
4 Replies
jcotton42
jcotton422mo ago
they won't be in the syntax, have you looked at the semantic model?
Aaron
Aaron2mo ago
.NET Compiler Platform SDK concepts and object model - C#
This overview provides the background you need to work effectively with the .NET compiler SDK. You'll learn the API layers, the major types involved, and the overall object model.
Aaron
Aaron2mo ago
Work with the .NET Compiler Platform SDK semantic model - C#
This overview provides an understanding of the type you use to understand and manipulate the semantic model of your code.
RumTery
RumTeryOP2mo ago
Found in SemanticModel.GetConversion... It's kinda tricky to use, as it uses expression as argument... But anyways
Want results from more Discord servers?
Add your server