dotnet / roslyn

The Roslyn .NET compiler provides C# and Visual Basic languages with rich code analysis APIs.
https://docs.microsoft.com/dotnet/csharp/roslyn-sdk/
MIT License
18.92k stars 4.01k forks source link

Add code snippets to syntax api docstrings #54631

Open benjamin-asdf opened 3 years ago

benjamin-asdf commented 3 years ago

Background and Motivation

When I navigate the syntax api with my IDE it is not eaasy to figure out what each SyntaxNode implementation class is representing practially.

Proposed API

Change the docsstrings of Syntax classes to include examples (code snippets of chsarp code showcasing the syntax). These can be long docstrings covering differrent cases and mentioning common misunderstandings and references to other classes / docstrings.

In case there is awesome documentation online that you have in mind. That is great then the docstrings can just include the link for that.

sharwell commented 3 years ago

Related to:

43646

43647

47257