重写了Script的解释器代码,使其更加直观。重写了流程控制的部分代码,分离运行环境IOC与流程IOC。

This commit is contained in:
fengjiayi
2025-07-18 22:45:06 +08:00
parent 88de5a21f5
commit fc05cd662b
38 changed files with 567 additions and 1418 deletions

View File

@@ -10,6 +10,9 @@ using System.Threading.Tasks;
namespace Serein.Script
{
public class SereinScript
{
/// <summary>
@@ -47,7 +50,7 @@ namespace Serein.Script
}
Dictionary<ASTNode, Type> symbolInfos = TypeAnalysis.NodeSymbolInfos.ToDictionary();
SereinScriptInterpreter Interpreter = new SereinScriptInterpreter(symbolInfos);
return await Interpreter.InterpretAsync(context, programNode);
return await Interpreter.InterpreterAsync(context, programNode);
}