-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProgram.cs
More file actions
50 lines (33 loc) · 1.32 KB
/
Copy pathProgram.cs
File metadata and controls
50 lines (33 loc) · 1.32 KB
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
38
39
40
41
42
43
44
45
46
47
48
49
50
public static class Program
{
public static void Main(string[] args)
{
Console.Title = "Simple Language";
string specialCommand = App.Root.Ask(firstMessage: "==============================================================================\n" +
" Welcome to Simple Language! Press enter to continue or write a config command:\n" +
" ==============================================================================", message: "Press enter to continue or write a config command:", options: [], color: ConsoleColor.Yellow, canBeNull: true);
while (true)
{
string mode = App.Root.Ask("Mode:", ["interpret", "compile"], ConsoleColor.Yellow);
switch (mode)
{
case "interpret":
handleInterpreter();
break;
case "compile":
handleCompiler();
break;
}
}
}
private static void handleInterpreter()
{
Apps.Interpreter interpreter = new Apps.Interpreter();
interpreter.Execute();
}
private static void handleCompiler()
{
Apps.Compiler compiler = new Apps.Compiler();
compiler.Execute();
}
}