public static void Rewrite(string fileName, List <string> contribs) { if (fileName == null) { throw new ArgumentNullException(nameof(fileName)); } if (contribs == null) { throw new ArgumentNullException(nameof(contribs)); } string rewritten = new BuildScriptRewriter(new GnLexer(File.ReadAllText(fileName)), contribs).Rewrite(); File.WriteAllText(fileName, rewritten); }
private void FixupBuildScript() { BuildScriptRewriter.Rewrite(Path.Combine(_env.CheckoutPath, "BUILD.gn"), _contribs); }