EP 0.1.1 语句分界线尚未完成

This commit is contained in:
ninemine
2025-07-03 21:50:26 +08:00
parent fff7b274f5
commit 6806d90829
12 changed files with 175 additions and 123 deletions

View File

@@ -4,32 +4,25 @@ using System.IO;
using System.Threading;
using Convention;
using Convention.EasySave;
using Convention.Symbolization;
public class Program
{
class Vector2
{
public double x, y;
}
class Vector2X2
{
public double x, y;
public Vector2 next;
}
static void Main(string[] args)
{
Directory.CreateDirectory(PlatformIndicator.PersistentDataPath);
Console.WriteLine(PlatformIndicator.PersistentDataPath);
EasySave.Save("key", new Vector2X2()
// Create a new SymbolizationContext
var context = new SymbolizationContext();
// Compile a script from a file
var toolFile = new ToolFile("example_script.txt");
try
{
x = 10,
y = 20,
next = new()
{
x = 30,
y = 40
}
}, "./test.json");
context.Compile(toolFile);
Console.WriteLine("Script compiled successfully.");
}
catch (FileNotFoundException ex)
{
Console.WriteLine($"Error: {ex.Message}");
toolFile.Create();
}
}
}