27 lines
623 B
C#
27 lines
623 B
C#
using System;
|
|
using Upsilon.Evaluator;
|
|
using Upsilon.Parser;
|
|
|
|
namespace Yc
|
|
{
|
|
static class Program
|
|
{
|
|
static void Main(string[] args)
|
|
{
|
|
Console.WriteLine("Upsilon REPL");
|
|
while (true)
|
|
{
|
|
Console.Write("» ");
|
|
var input = Console.ReadLine();
|
|
if (input == "exit")
|
|
{
|
|
return;
|
|
}
|
|
|
|
var parser = Parser.Parse(input);
|
|
//Console.WriteLine(parser.Print());
|
|
Console.WriteLine(parser.Evaluate());
|
|
}
|
|
}
|
|
}
|
|
} |