Roslyn Parsing now Formatting Code
![Image](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhafx2Y6jC6D30pYvNA10g-oZxlcHw-0wCe8wRJgd3FLYz3nSmJwHGV-iiueYGH1-RyC5CBSt-Df3FVhXuKFJWJcw8vnWaec7avseqJn5SNh-7N7o08a0qujkqNoorHJaz9mcgystab38g/s320/Unity+Roslyn+Code+Parse.gif)
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 code will go into on