Files
serein-flow/Serein.Script/Node/CollectionIndexNode.cs

53 lines
1.2 KiB
C#
Raw Normal View History

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
{
/// <summary>
/// 集合来源
/// </summary>
public ASTNode Collection { get; }
/// <summary>
/// 索引来源
/// </summary>
public ASTNode Index { get; }
public CollectionIndexNode(ASTNode Collection, ASTNode indexValue)
{
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;
}
}
}