重写脚本解释器的实现,提高其可读性。

This commit is contained in:
fengjiayi
2025-07-13 17:34:03 +08:00
parent 6141d2c1c1
commit 01ab905155
42 changed files with 1747 additions and 715 deletions

View File

@@ -20,10 +20,33 @@ namespace Serein.Script.Node
/// 索引来源
/// </summary>
public ASTNode Index { get; }
public CollectionIndexNode(ASTNode TargetValue,ASTNode indexValue)
public CollectionIndexNode(ASTNode Collection, ASTNode indexValue)
{
this.Collection = TargetValue;
this.Collection = Collection;
this.Index = indexValue;
}
}
/// <summary>
/// 集合赋值节点
/// </summary>
public class CollectionAssignmentNode : ASTNode
{
/// <summary>
/// 集合来源
/// </summary>
public CollectionIndexNode Collection { get; }
/// <summary>
/// 索引来源
/// </summary>
public ASTNode Value { get; }
public CollectionAssignmentNode(CollectionIndexNode collection, ASTNode value)
{
this.Collection = collection;
this.Value = value;
}
}
}