Daily update on 20250304-070522 by Nitload Youmu. Additional Message : None
Signed-off-by: Nitload <YoumuLiu_NSI@whv0t.onmicrosoft.com>
This commit is contained in:
@@ -58,7 +58,7 @@ namespace StgSharp.Script.Express
|
||||
|
||||
public override IExpElementSource EqualityTypeConvert => _operand.EqualityTypeConvert;
|
||||
|
||||
public static ExpUnaryOperatorNode UnaryNotNegation( ExpNode operand )
|
||||
public static ExpUnaryOperatorNode UnaryNegation( ExpNode operand )
|
||||
{
|
||||
if( !operand.IsNumber ) {
|
||||
throw new ExpInvalidTypeException(
|
||||
@@ -73,5 +73,19 @@ namespace StgSharp.Script.Express
|
||||
};
|
||||
}
|
||||
|
||||
public static ExpUnaryOperatorNode UnaryNot( ExpNode operand )
|
||||
{
|
||||
if( ( operand._nodeFlag | ( ExpNodeFlag.BuiltinType_Logic | ExpNodeFlag.BuiltinType_Logic ) ) ==
|
||||
0 ) {
|
||||
throw new ExpInvalidTypeException(
|
||||
"Bool or Logic", operand.EqualityTypeConvert.Name );
|
||||
}
|
||||
return new ExpUnaryOperatorNode( ExpCompile.KeyWord.NOT )
|
||||
{
|
||||
_nodeFlag = ExpNodeFlag.Operator_Unary | ExpNodeFlag.BuiltinType_Logic,
|
||||
CodeConvertTemplate = "! {0}",
|
||||
};
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user