1. Script项目添加了数组表达式的支持

2. EmitHelper添加了数组创建委托的构建
This commit is contained in:
fengjiayi
2025-07-31 11:21:49 +08:00
parent 85d04029dc
commit 827a9242ae
10 changed files with 254 additions and 105 deletions

View 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;
}
}
}