/// <summary> /// Compiles the Provided source array into a single file. And removes all remaining statements /// </summary> /// <param name="src">The Array of Sourcescripts that need to be compiled.</param> /// <returns>A compiled list out of the passed sourcescripts</returns> private string[] Compile(ISourceScript[] src, bool restartTimer) { if (restartTimer) { Timer.GlobalTimer.Restart(); } long old = Timer.MS; Logger.Log(PPLogType.Log, Verbosity.Level2, "Starting Compilation of File Tree..."); List <string> ret = new List <string>(); for (int i = src.Length - 1; i >= 0; i--) { string[] sr = src[i].GetSource(); if (sr != null && sr.Length != 0) { ret.AddRange(sr); } } Logger.Log(PPLogType.Log, Verbosity.Level2, "Finished Compilation..."); //this.Log(PPLogType.Log, Verbosity.LEVEL3, "Cleaning up: {0}", CleanUpList.Unpack(", ")); string[] rrr = Utils.RemoveStatements(ret, CleanUpList.ToArray()).ToArray(); Logger.Log(PPLogType.Progress, Verbosity.Level1, "Finished Compiling {1} Files({0}ms)", Timer.MS - old, src.Length); Logger.Log(PPLogType.Log, Verbosity.Level2, "Total Lines: {0}", rrr.Length); return(rrr); }
/// <summary> /// Compiles the Provided source array into a single file. And removes all remaining statements /// </summary> /// <param name="src">The Array of Sourcescripts that need to be compiled.</param> /// <returns>A compiled list out of the passed sourcescripts</returns> private string[] Compile(ISourceScript[] src, bool restartTimer) { if (restartTimer) { Timer.GlobalTimer.Restart(); } Logger.Log(LogType.Log, "Starting Compilation of File Tree...", 4); List <string> ret = new List <string>(); for (int i = src.Length - 1; i >= 0; i--) { string[] sr = src[i].GetSource(); if (sr != null && sr.Length != 0) { ret.AddRange(sr); } } string[] rrr = Utils.RemoveStatements(ret, CleanUpList.ToArray()).ToArray(); return(rrr); }