Пример #1
0
 /// <summary>
 /// Run TrifleJS in interactive mode
 /// </summary>
 static void Interactive()
 {
     // Initialize and start console read loop;
     using (Program.context = Initialise())
     {
         while (true)
         {
             Console.Write("triflejs> ");
             try
             {
                 API.Console.log(context.Run(Console.ReadLine(), "REPL"));
             }
             catch (Exception ex) {
                 API.Context.Handle(ex);
             }
         }
     }
 }
Пример #2
0
 /// <summary>
 /// Run TrifleJS in interactive mode
 /// </summary>
 static void Interactive()
 {
     // Initialize and start console read loop;
     using (Program.context = Initialise())
     {
         while (true)
         {
             Console.Write("triflejs> ");
             try
             {
                 API.Console.log(context.Run(Console.ReadLine(), "REPL"));
             }
             catch (Exception ex) {
                 API.Context.Handle(ex);
             }
         }
     }
 }