KirillOsenkov / RoslynQuoter

Roslyn tool that for a given C# program shows syntax tree API calls to construct its syntax tree
http://roslynquoter.azurewebsites.net
Apache License 2.0
918 stars 118 forks source link

Bugfix for verbatim-identifiers and contextual keywords, always-false case "value.IsMissing" removed #63

Closed bernd5 closed 3 years ago

bernd5 commented 3 years ago

Fixes handling for identifiers like "_", "@class" and "nameof"

KirillOsenkov commented 3 years ago

Nice! Care to add a couple of unit-tests? It should be pretty easy.

bernd5 commented 3 years ago

It is not really easy to write a good unit test. The problem is that "ToString()" worked correctly - but the processing in the semantic model expects that the ContextualKeyword-Kind is set and the "ValueText" has no "@"...

We would need to evaluate the quoted code and look into the generated nodes. See issue #62

bernd5 commented 3 years ago

Anything to add or change?

KirillOsenkov commented 3 years ago

Thanks!