Exemplo n.º 1
0
 private static void Main(string[] args)
 {
     //:D
     Args = args;
     //Same thingy as in GCC
     if (args.Length == 0)
     {
         WriteError("no input files");
     }
     else
     {
         //If we wanna see all messages by ANATOLIY
         if (HasArgument("--debug"))
         {
             Interpreter.Debug = true;
         }
         //If we wanna be a little faster
         if (HasArgument("--dontlinkstd"))
         {
             Interpreter.LinkStd = false;
         }
         //If the file passed does indeed exist
         if (args.Any(File.Exists))
         {
             var file = args.First(File.Exists);
             if (Interpreter.Debug)
             {
                 Console.WriteLine($"{file} file was selected.\nStarting..");
             }
             //Add the standart classes like for IO, and etc.
             Linker.AddStd("std");
             //...and finally run the file
             Interpreter.Interpret(file);
             if (Interpreter.Debug)
             {
                 Console.WriteLine("\nAnatoliy is happy, the code ran without errors! :D");
             }
         }
         else
         {
             WriteError("none of the files exist");
         }
     }
 }