mirror of
https://gitee.com/langsisi_admin/serein-flow
synced 2026-03-03 00:00:49 +08:00
1. Script项目添加了数组表达式的支持
2. EmitHelper添加了数组创建委托的构建
This commit is contained in:
27
Serein.Script/Node/ArrayDefintionNode.cs
Normal file
27
Serein.Script/Node/ArrayDefintionNode.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Serein.Script.Node
|
||||
{
|
||||
/// <summary>
|
||||
/// 数组定义节点
|
||||
/// <para>arr = [1, 2, 3, 4, 5];</para>
|
||||
/// <para>arr = ["A","B","C"];</para>
|
||||
/// </summary>
|
||||
internal class ArrayDefintionNode : ASTNode
|
||||
{
|
||||
/// <summary>
|
||||
/// 数组子项
|
||||
/// </summary>
|
||||
public List<ASTNode> Elements { get; } = new List<ASTNode>();
|
||||
|
||||
public ArrayDefintionNode(List<ASTNode> elements)
|
||||
{
|
||||
Elements = elements;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user