Ejemplo n.º 1
0
        static string[] ParseIncludes(string[] args)
        {
            var aa = new List <string>();

            for (int i = 0; i < args.Length; i++)
            {
                var a = args[i];
                if (a == "-I")
                {
                    i++;
                    if (i < args.Length)
                    {
                        var p = args[i];
                        Builtins.AddIncludePath(p);
                    }
                    else
                    {
                        System.Console.Error.WriteLine("Error: Missing include path");
                        Environment.Exit(1);
                    }
                }
                else
                {
                    aa.Add(a);
                }
            }

            return(aa.ToArray());
        }