123456789101112131415161718192021222324252627282930313233343536 |
- using System;
- using System.IO;
- namespace NTERA.Compiler
- {
- class Program
- {
- static void Main(string[] args)
- {
- string path = args.Length > 0
- ? Path.GetFullPath(args[0])
- : Environment.CurrentDirectory;
- string outputPath = Path.Combine(path, "output");
- int threads = 8;
- if (!Directory.Exists(outputPath))
- Directory.CreateDirectory(outputPath);
- Console.WriteLine($"NTERA {typeof(Program).Assembly.GetName().Version}");
- Console.WriteLine("-------------------------");
- Console.WriteLine($"Compiling '{path}' to '{outputPath}'");
- Console.WriteLine($"Using {threads} threads");
-
- Compiler compiler = new Compiler(path, threads);
- compiler.Compile(outputPath);
- Console.WriteLine();
- Console.WriteLine($"{compiler.DeclaredProcedures.Count} total functions");
- Console.WriteLine($"{compiler.Errors.Count} errors");
- Console.WriteLine("Report written");
- }
- }
- }
|