コード例 #1
0
        private void TranspileCharSave()
        {
            var outputFileName = Path.Combine(options.OutputPath, "save", "spherechars.scp");

            Console.WriteLine($"Transpiling to {outputFileName}");
            var transpiler = new CharsTranspiler(compilation.DefinitionRepository);

            string result = transpiler.Transpile(compilation.CompiledCharSaveFile.ParsedTree);

            File.WriteAllText(outputFileName, result);
        }
コード例 #2
0
        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);
        }