private int ParseSources(string[] args, int start){
// Read source files
int i;
for (i = start; i < args.Length; i++){
if (args[i].Length == 0)
continue;
// slash ('/') character is a valid filename character on UNIX, so we can't break on it
// since it might be an absolute path to a file
if ('-' == args[i][0] || ('/' == args[i][0] && '/' != Path.DirectorySeparatorChar))
break;
try{
if (Path.GetFileName((string)args[i]) == "")
throw new CmdLineException(CmdLineError.InvalidSourceFile, args[i], JScriptCompiler.GetCultureInfo());
}catch(System.ArgumentException){
throw new CmdLineException(CmdLineError.InvalidSourceFile, args[i], JScriptCompiler.GetCultureInfo());
}
foreach (string filename in this.currentTarget.ImportFileNames){
if (String.Compare(filename, (string)args[i], StringComparison.OrdinalIgnoreCase) == 0){
throw new CmdLineException(CmdLineError.DuplicateFileAsSourceAndAssembly, args[i], JScriptCompiler.GetCultureInfo());
}
}
foreach (string filename in this.currentTarget.SourceFileNames){
if (String.Compare(filename, (string)args[i], StringComparison.OrdinalIgnoreCase) == 0){
throw new CmdLineException(CmdLineError.DuplicateSourceFile, args[i], JScriptCompiler.GetCultureInfo());
}
}
this.currentTarget.SourceFileNames.Add(args[i]);
}
return i;
}