Пример #1
0
        private static void Run(params string[] args)
        {
            header();

            var context = new CompilerContext();

            try
            {
                foreach (string arg in args)
                {
                    context.SourceUnit.Add(arg);
                }

                var compiler = new Compiler();
                compiler.Build(context, Path.GetFileNameWithoutExtension(args[0]), false);
            }
            catch (Exception e)
            {
                Console.WriteLine("{0}\n", e);
            }
            finally
            {
                var printer = new ReportPrinter(Console.Out, context.Report);
                printer.Print(ReportColorScheme.Default, colorize: true, visualize: true, showOneErrorPerStmt: true);
            }
        }
Пример #2
0
 private static void printErrors(Report report)
 {
     var printer = new ReportPrinter(Console.Out, report);
     printer.Print(ReportColorScheme.Default, colorize: true);
 }