mirror of
https://gitee.com/langsisi_admin/serein-flow
synced 2026-03-03 00:00:49 +08:00
修复了脚本语言中构造器赋值的 bug
This commit is contained in:
@@ -12,19 +12,31 @@ namespace Serein.Script.Node
|
||||
public class ObjectInstantiationNode : ASTNode
|
||||
{
|
||||
/// <summary>
|
||||
/// 类型名称
|
||||
/// 类型来源
|
||||
/// </summary>
|
||||
public string TypeName { get; }
|
||||
public TypeNode Type { get; }
|
||||
|
||||
/// <summary>
|
||||
/// 构造方法的参数来源
|
||||
/// </summary>
|
||||
public List<ASTNode> Arguments { get; }
|
||||
public ObjectInstantiationNode(string typeName, List<ASTNode> arguments)
|
||||
|
||||
/// <summary>
|
||||
/// 构造器赋值
|
||||
/// </summary>
|
||||
public List<CtorAssignmentNode> CtorAssignments { get; private set; } = [];
|
||||
|
||||
public ObjectInstantiationNode(TypeNode type, List<ASTNode> arguments)
|
||||
{
|
||||
this.TypeName = typeName;
|
||||
this.Type = type;
|
||||
this.Arguments = arguments;
|
||||
}
|
||||
|
||||
public ObjectInstantiationNode SetCtorAssignments(List<CtorAssignmentNode> ctorAssignments)
|
||||
{
|
||||
CtorAssignments = ctorAssignments;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user