mirror of
https://gitee.com/langsisi_admin/serein-flow
synced 2026-04-22 07:46:34 +08:00
为Serein.Script增加类型分析,增加了更加详细的Number类型节点,优化了对象节点的链式表达式,修复了Lexer分析词法时,部分Token代码属性错误的问题。
This commit is contained in:
@@ -87,9 +87,11 @@ namespace Serein.Script
|
||||
|
||||
public static Type EvaluateType(Type leftType, string op, Type rightType)
|
||||
{
|
||||
|
||||
if (leftType == null || rightType == null)
|
||||
throw new ArgumentNullException("操作数类型不能为 null");
|
||||
|
||||
|
||||
// 字符串拼接
|
||||
if (op == "+" && (leftType == typeof(string) || rightType == typeof(string)))
|
||||
return typeof(string);
|
||||
|
||||
Reference in New Issue
Block a user