private static void GenerateFromBinary(string outputFolder, string pathToBinary)
        {
            CompilationLoader.ReadBinary(pathToBinary, out var syntaxTree);
            var allSources = GetSourceFiles.Apply(syntaxTree); // also generate the code for referenced libraries

            foreach (var source in allSources)
            {
                var content = SimulationCode.generate(source, syntaxTree);
                CompilationLoader.GeneratedFile(source, outputFolder, ".g.cs", content);
            }
        }
Beispiel #2
0
        private static void GenerateFromBinary(string outputFolder, string pathToBinary)
        {
            var syntaxTree = CompilationLoader.ReadBinary(pathToBinary).ToArray();
            var allSources = GetSourceFiles.Apply(syntaxTree).Where(file => file.Value.EndsWith(".qs"));

            foreach (var source in allSources)
            {
                var content = SimulationCode.generate(source, syntaxTree);
                CompilationLoader.GeneratedFile(source, outputFolder, ".g.cs", content);
            }
        }