脚本节点能够自定义变量名

This commit is contained in:
fengjiayi
2025-03-14 21:38:07 +08:00
parent ef11edf7f1
commit 1e09675ef1
9 changed files with 188 additions and 29 deletions

View File

@@ -212,6 +212,8 @@ namespace Serein.Script
/// <returns></returns>
private async Task<object?> ExecutionProgramNodeAsync(IScriptInvokeContext context, ProgramNode programNode)
{
// 加载变量
// 遍历 ProgramNode 中的所有语句并执行它们
foreach (var statement in programNode.Statements)
{
@@ -366,8 +368,6 @@ namespace Serein.Script
}
public async Task<object?> InterpretAsync(IScriptInvokeContext context, ASTNode node)
{
if(node == null)