mirror of
https://gitee.com/langsisi_admin/serein-flow
synced 2026-03-03 00:00:49 +08:00
43 lines
1.0 KiB
C#
43 lines
1.0 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace Serein.Script.Node
|
|
{
|
|
/// <summary>
|
|
/// 类型创建
|
|
/// </summary>
|
|
public class ObjectInstantiationNode : ASTNode
|
|
{
|
|
/// <summary>
|
|
/// 类型来源
|
|
/// </summary>
|
|
public TypeNode Type { get; }
|
|
|
|
/// <summary>
|
|
/// 构造方法的参数来源
|
|
/// </summary>
|
|
public List<ASTNode> Arguments { get; }
|
|
|
|
/// <summary>
|
|
/// 构造器赋值
|
|
/// </summary>
|
|
public List<CtorAssignmentNode> CtorAssignments { get; private set; } = [];
|
|
|
|
public ObjectInstantiationNode(TypeNode type, List<ASTNode> arguments)
|
|
{
|
|
this.Type = type;
|
|
this.Arguments = arguments;
|
|
}
|
|
|
|
public ObjectInstantiationNode SetCtorAssignments(List<CtorAssignmentNode> ctorAssignments)
|
|
{
|
|
CtorAssignments = ctorAssignments;
|
|
return this;
|
|
}
|
|
}
|
|
|
|
}
|