2024-12-20 23:39:29 +08:00
|
|
|
|
using System;
|
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
using System.Linq;
|
|
|
|
|
|
using System.Text;
|
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
|
|
|
|
namespace Serein.Script.Node
|
|
|
|
|
|
{
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 集合索引获取
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public class CollectionIndexNode : ASTNode
|
|
|
|
|
|
{
|
2025-07-11 20:52:21 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 集合来源
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public ASTNode Collection { get; }
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 索引来源
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public ASTNode Index { get; }
|
2025-07-13 17:34:03 +08:00
|
|
|
|
|
|
|
|
|
|
public CollectionIndexNode(ASTNode Collection, ASTNode indexValue)
|
2024-12-20 23:39:29 +08:00
|
|
|
|
{
|
2025-07-13 17:34:03 +08:00
|
|
|
|
this.Collection = Collection;
|
2025-07-11 20:52:21 +08:00
|
|
|
|
this.Index = indexValue;
|
2024-12-20 23:39:29 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
2025-07-13 17:34:03 +08:00
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 集合赋值节点
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public class CollectionAssignmentNode : ASTNode
|
|
|
|
|
|
{
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 集合来源
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public CollectionIndexNode Collection { get; }
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
2025-07-23 15:57:57 +08:00
|
|
|
|
/// 赋值值来源
|
2025-07-13 17:34:03 +08:00
|
|
|
|
/// </summary>
|
|
|
|
|
|
public ASTNode Value { get; }
|
|
|
|
|
|
|
|
|
|
|
|
public CollectionAssignmentNode(CollectionIndexNode collection, ASTNode value)
|
|
|
|
|
|
{
|
|
|
|
|
|
this.Collection = collection;
|
|
|
|
|
|
this.Value = value;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2024-12-20 23:39:29 +08:00
|
|
|
|
}
|