sonar-dotnet icon indicating copy to clipboard operation
sonar-dotnet copied to clipboard

Introduction of Syntax node abstractions

Open Corniel opened this issue 3 years ago • 0 comments

Why at #5741 I had the idea that the code would have been easier if there was something possible like the following:

var conditional = (Language.)Syntax.As.Conditional(epxression);
return Syntax.IsNullLiteral(conditional.WhenTrue) || Syntax.IsNullLiteral(conditional.WhenFalse);

As I did not want to mess up that PR with this idea, I made this one. I took another example: BinaryExpression, but the idea is the same. Add a builder/factory to the SyntaxFacade that returns an abstaction of a SyntaxNode that is a language independent wrapper on top of specify SyntaxNodes.

What do you think?

Corniel avatar Sep 14 '22 09:09 Corniel