private void TranspileCharsFile(string sphereCharsFileName, TranspileSaveOptions options) { Console.WriteLine($"Parsing {sphereCharsFileName}"); string src = File.ReadAllText(sphereCharsFileName); compilation.AddCharSaveFile(sphereCharsFileName, src); CheckCompilationErrors(); var outputFileName = GetOutputFileName(Path.GetFileName(sphereCharsFileName), options); Console.WriteLine($"Transpiling to {outputFileName}"); var transpiler = new CharsTranspiler(compilation.DefinitionRepository); string result = transpiler.Transpile(compilation.CompiledCharSaveFile.ParsedTree); File.WriteAllText(outputFileName, result); }
private void ParseCharSave(string savePath) => ParseSaveFile(savePath, "spherechars.scp", (name, src) => compilation.AddCharSaveFile(name, src));