Beispiel #1
0
        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);
        }
Beispiel #2
0
 private void FixupBuildScript()
 {
     BuildScriptRewriter.Rewrite(Path.Combine(_env.CheckoutPath, "BUILD.gn"), _contribs);
 }