-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMain.cs
More file actions
37 lines (31 loc) · 915 Bytes
/
Main.cs
File metadata and controls
37 lines (31 loc) · 915 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#region Using
using System;
using System.IO;
#endregion
namespace OnyxJS
{
internal class Test
{
public static void Main(string[] args)
{
var fileName = string.Empty;
if (args.Length < 1)
{
Console.WriteLine("You haven't provided a script file");
return;
}
fileName = args[0];
if (!File.Exists(fileName))
{
Console.WriteLine("FileDoesnotExist:" + args[0]);
return;
}
//Create new argument array removing the file name
var newargs = new String[args.Length - 1];
Array.Copy(args, 1, newargs, 0, args.Length - 1);
var sc = new ScriptManager();
sc.CompileAndExecuteFile(ScriptUtils.BuildFilesList(fileName), newargs);
Console.ReadKey();
}
}
}