private static void SyntaxReplacer() { SyntaxTree tree = CSharpSyntaxTree.ParseText(codeTryCatch); CatchSyntaxRewriter rewriter = new CatchSyntaxRewriter(); var newRoot = rewriter.Visit(tree.GetRoot()); Console.WriteLine(newRoot.ToFullString()); }
private static void SyntaxReplacer() { SyntaxTree tree = CSharpSyntaxTree.ParseText(codeTryCatch); CatchSyntaxRewriter rewriter = new CatchSyntaxRewriter(); var newRoot=rewriter.Visit(tree.GetRoot()); Console.WriteLine(newRoot.ToFullString()); }