logoalt Hacker News

torginus01/15/20261 replyview on HN

Roslyn has visitor pattern combined with the 'Kind' enumeration you mentioned. You can either choose to visiti a SyntaxNode of a certain type, or override the generic version and decide what you want to do based on that enumeration.


Replies

high_na_euv01/16/2026

C# doesnt have exhaustive switch over enums.

It needs to get "closed enum" lang. feature.

show 2 replies