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

Null character syntax generated is faulty #72

Closed AArnott closed 2 years ago

AArnott commented 2 years ago

Given this "statement":

char ch = '\0';

The generated code is:

LiteralExpression(SyntaxKind.CharacterLiteralExpression, Literal(''))

Note the empty` character literal, which the C# compiler emits error CS1011 for. I believe it should* be

LiteralExpression(SyntaxKind.CharacterLiteralExpression, Literal('\0'))
KirillOsenkov commented 2 years ago

Fixed and deployed, thanks for reporting.