Parsing raw c# code (text files) #2159
-
Hi everyone! I've been a happy user of the ILSpy CSharpDecompiler, specifically the decompiled node tree. But I've been wondering, is there any method to transform raw c# code (text files) into the SyntaxTree node tree? I understand I can create a parser myself, but I'm curious if it already exists. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
The decompiler's syntax tree and type system are derived from NRefactory (which had a C# 5 parser), but all portions unneeded for decompilation have been removed to simplify the maintenance. I recommend using Microsoft.CodeAnalysis.CSharp for parsing C# code. |
Beta Was this translation helpful? Give feedback.
The decompiler's syntax tree and type system are derived from NRefactory (which had a C# 5 parser), but all portions unneeded for decompilation have been removed to simplify the maintenance.
I recommend using Microsoft.CodeAnalysis.CSharp for parsing C# code.