mirror of
https://gitee.com/langsisi_admin/serein-flow
synced 2026-03-20 00:06:45 +08:00
修复了全局节点连接异常异常。
This commit is contained in:
@@ -3,6 +3,7 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Xml.Linq;
|
||||
|
||||
namespace Serein.Script.Node
|
||||
{
|
||||
@@ -22,6 +23,13 @@ namespace Serein.Script.Node
|
||||
public ASTNode Value { get; }
|
||||
|
||||
public AssignmentNode(ASTNode target, ASTNode value) => (Target, Value) = (target, value);
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return $"{Target} = {Value}";
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -33,5 +33,10 @@ namespace Serein.Script.Node
|
||||
Operator = op;
|
||||
Right = right;
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return $"({Left} {Operator} {Right})";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,7 +30,11 @@ namespace Serein.Script.Node
|
||||
this.ClassType = className;
|
||||
}
|
||||
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
var p = string.Join(",", Propertys.Select(p => $"{p.Value}"));
|
||||
return $"{ClassType}({p})";
|
||||
}
|
||||
|
||||
|
||||
/* /// <summary>
|
||||
|
||||
@@ -26,6 +26,12 @@ namespace Serein.Script.Node
|
||||
this.Collection = Collection;
|
||||
this.Index = indexValue;
|
||||
}
|
||||
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return $"{Collection}[{Index}]";
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -48,5 +54,10 @@ namespace Serein.Script.Node
|
||||
this.Collection = collection;
|
||||
this.Value = value;
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return $"{Collection} = {Value}";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,6 +41,9 @@ namespace Serein.Script.Node
|
||||
Value = value;
|
||||
}
|
||||
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return $"ctor {Class}.{MemberName} = {Value}";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Security.Claims;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
@@ -26,6 +27,12 @@ namespace Serein.Script.Node
|
||||
FunctionName = functionName;
|
||||
Arguments = arguments;
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
var p = string.Join(",", Arguments.Select(p => $"{p}"));
|
||||
return $"{FunctionName}({p})";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -16,5 +16,11 @@ namespace Serein.Script.Node
|
||||
/// </summary>
|
||||
public string Name { get; }
|
||||
public IdentifierNode(string name) => Name = name;
|
||||
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return $"let {Name}";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,5 +26,10 @@ namespace Serein.Script.Node
|
||||
Object = obj;
|
||||
MemberName = memberName;
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return $"{Object}.{MemberName}";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,5 +31,10 @@ namespace Serein.Script.Node
|
||||
MemberName = memberName;
|
||||
Value = value;
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return $"{Object}.{MemberName} = {Value}";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,5 +32,12 @@ namespace Serein.Script.Node
|
||||
FunctionName = functionName;
|
||||
Arguments = arguments;
|
||||
}
|
||||
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
var p = string.Join(",", Arguments.Select(p => $"{p}"));
|
||||
return $"{Object}.{FunctionName}({p})";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,6 +37,13 @@ namespace Serein.Script.Node
|
||||
CtorAssignments = ctorAssignments;
|
||||
return this;
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
var arg = string.Join(",", Arguments.Select(p => $"{p}"));
|
||||
var ctor_arg = string.Join(",", CtorAssignments.Select(p => $"{p}"));
|
||||
return $"new {Type}({arg}){ctor_arg}";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -18,5 +18,9 @@ namespace Serein.Script.Node
|
||||
TypeName = typeName;
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return $"[type]{TypeName}";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,5 +13,10 @@ namespace Serein.Script.Node
|
||||
{
|
||||
public bool Value { get; }
|
||||
public BooleanNode(bool value) => Value = value;
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return $"{Value}";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,5 +13,9 @@ namespace Serein.Script.Node
|
||||
{
|
||||
Value = char.Parse(value);
|
||||
}
|
||||
public override string ToString()
|
||||
{
|
||||
return $"'{Value}'";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,5 +11,9 @@ namespace Serein.Script.Node
|
||||
/// </summary>
|
||||
public class NullNode : ASTNode
|
||||
{
|
||||
public override string ToString()
|
||||
{
|
||||
return $"Null";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,6 +13,11 @@ namespace Serein.Script.Node
|
||||
{
|
||||
public T Value { get; }
|
||||
public NumberNode(T value) => Value = value;
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return $"{Value}";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -55,6 +55,11 @@ namespace Serein.Script.Node
|
||||
}
|
||||
Value = output.ToString();
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return $"\"{Value}\"";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user