Daily update on 20250411-013955 by Nitload Youmu. Additional Message : none
Signed-off-by: Nitload <YoumuLiu_NSI@whv0t.onmicrosoft.com>
This commit is contained in:
@@ -28,6 +28,8 @@
|
||||
//
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
using Microsoft.CodeAnalysis.CSharp;
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data.Common;
|
||||
@@ -89,10 +91,40 @@ namespace StgSharp.Script.Express
|
||||
};
|
||||
}
|
||||
|
||||
public static ExpBinaryOperatorNode ConvertElement( Token source, ExpNode left, ExpNode right )
|
||||
public static ExpBinaryOperatorNode CompareInstanceEqual(
|
||||
Token source,
|
||||
ExpNode left,
|
||||
ExpNode right )
|
||||
{
|
||||
return new ExpBinaryOperatorNode( source, left, right )
|
||||
{
|
||||
_returnType = ExpressCompile.ExpBool,
|
||||
_nodeFlag = ExpNodeFlag.BuiltinType_Boolean | ExpNodeFlag.Operator_Binary,
|
||||
CodeConvertTemplate = "!ReferenceEquals({0}, {1})",
|
||||
};
|
||||
}
|
||||
|
||||
public static ExpBinaryOperatorNode CompareInstanceNotEqual(
|
||||
Token nsource,
|
||||
ExpNode left,
|
||||
ExpNode right )
|
||||
{
|
||||
return new ExpBinaryOperatorNode( nsource, left, right )
|
||||
{
|
||||
_returnType = ExpressCompile.ExpBool,
|
||||
_nodeFlag = ExpNodeFlag.BuiltinType_Boolean | ExpNodeFlag.Operator_Binary,
|
||||
CodeConvertTemplate = "ReferenceEquals({0}, {1})",
|
||||
};
|
||||
}
|
||||
|
||||
public static ExpBinaryOperatorNode ConvertElement(
|
||||
Token source,
|
||||
ExpNode left,
|
||||
ExpNode right )
|
||||
{
|
||||
if( right is not ExpMetaRefNode metaref ) {
|
||||
throw new ExpInvalidTypeException( "<source of element>", right.EqualityTypeConvert.Name );
|
||||
throw new ExpInvalidTypeException(
|
||||
"<source of element>", right.EqualityTypeConvert.Name );
|
||||
}
|
||||
return new ExpBinaryOperatorNode( source, left, right )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user