Browse Source

Update documentation in CustomLanguage

pull/863/head
Siegfried Pammer 8 years ago
parent
commit
952880f400
  1. 18
      TestPlugin/CustomLanguage.cs

18
TestPlugin/CustomLanguage.cs

@ -42,15 +42,17 @@ namespace TestPlugin
smartOutput.WriteLine(); smartOutput.WriteLine();
} }
// ICSharpCode.Decompiler.Ast.AstBuilder can be used to decompile to C# // ICSharpCode.Decompiler.CSharp.CSharpDecompiler can be used to decompile to C#.
/* /*
AstBuilder b = new AstBuilder(new DecompilerContext(method.Module) { ModuleDefinition module = LoadModule(assemblyFileName);
Settings = options.DecompilerSettings, var typeSystem = new DecompilerTypeSystem(module);
CurrentType = method.DeclaringType CSharpDecompiler decompiler = new CSharpDecompiler(typeSystem, new DecompilerSettings());
});
b.AddMethod(method); decompiler.AstTransforms.Add(new EscapeInvalidIdentifiers());
b.RunTransformations(); SyntaxTree syntaxTree = decompiler.DecompileWholeModuleAsSingleFile();
output.WriteLine("Decompiled AST has {0} nodes", b.SyntaxTree.DescendantsAndSelf.Count());*/ var visitor = new CSharpOutputVisitor(output, FormattingOptionsFactory.CreateSharpDevelop());
syntaxTree.AcceptVisitor(visitor);
*/
} }
} }
} }

Loading…
Cancel
Save