Beispiel #1
0
        public void Go(string sourcePath, string outputPath)
        {
            var abstractSyntaxTree = parser.BuildAst(File.ReadAllLines(sourcePath));

            foreach (var statement in abstractSyntaxTree.Statements)
            {
                var cSharp = statement.ToCSharp();
                cSharp = EliminateDuplicateVariableDeclaration(statement, cSharp);

                writer.AppendStatement(cSharp);
            }

            writer.Write(outputPath);
        }