Is it currently possible to translate C# code into an Abstract Syntax Tree?
Edit: some clarification; I don't necessarily expect the compiler to generate the AST for me - a parser would be fine, although I'd like to use something "official." Lambda expressions are unfortunately not going to be sufficient given they don't allow me to use statement bodies, which is what I'm looking for.
abbreviation for carbon copy : written at the end of a business letter or in an email before the names of the people who will receive a copy.
DeepL Translate: The world's most accurate translator.
what is your name? ما هو اسمك؟
The Roslyn project is in Visual Studio 2010 and gives you programmatic access to the Syntax Tree, among other things.
SyntaxTree tree = SyntaxTree.ParseCompilationUnit(
@" C# code here ");
var root = (CompilationUnitSyntax)tree.Root;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With