Roslyn Parsing now Formatting Code
I almost took another break on Roslyn’s SyntaxTree, to tackle dialogue. But I spent Thursday resolving it to completion. 😊 For the initial test, I wanted parsing, as it is * somewhat * easy to apply formatting based on the syntax kind (of which there are around 500 see: https://github.com/dotnet/roslyn/blob/master/src/Compilers/CSharp/Portable/Syntax/SyntaxKind.cs ). I set it up to pick a color at random for each new kind it comes across in code. (rather than resolve them all right now) What is not so visible, is the fact that I now have access to the types called out in the code . I can tell what classes and namespaces are in use. After researching several paths, including looking up black lists of C#, such as CAS, I ultimately will be going with a white list. If a type or method is not in the white list, the code will not be executed, and the unsafe code will be highlighted as under risk. I will also generate a black list myself. Basically c...