initial commit
This commit is contained in:
27
Yc/Program.cs
Normal file
27
Yc/Program.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
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());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
12
Yc/Yc.csproj
Normal file
12
Yc/Yc.csproj
Normal file
@@ -0,0 +1,12 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>netcoreapp2.1</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Upsilon\Upsilon.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
Reference in New Issue
Block a user