dotnet / roslyn-sdk

Roslyn-SDK templates and Syntax Visualizer
MIT License
515 stars 256 forks source link

Example hello world generator shouldn't iterate trees #614

Open chsienki opened 4 years ago

chsienki commented 4 years ago

Our sample hello world generator iterates over the syntax trees. We explicitly tell people not to do this, and use a syntax receiver instead (and want to add an analyzer in the future too).

We should update the sample to not iterate the trees but do something else instead.

sharwell commented 3 years ago

Iterating over syntax trees is only a problem if you are iterating over the SyntaxNode root of the tree. This generator does not call GetRoot[Async|Synchronously] so there is no need to change it.