Daily update on 20250410-000303 by Nitload Youmu. Additional Message : adding support to type operation, to operate
Signed-off-by: Nitload <YoumuLiu_NSI@whv0t.onmicrosoft.com>
This commit is contained in:
@@ -89,6 +89,23 @@ namespace StgSharp.Script.Express
|
||||
};
|
||||
}
|
||||
|
||||
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 );
|
||||
}
|
||||
return new ExpBinaryOperatorNode( source, left, right )
|
||||
{
|
||||
_returnType = metaref.SourceRef,
|
||||
_nodeFlag = ExpNodeFlag.Operator_Binary,
|
||||
/*
|
||||
* 0. instance to convert
|
||||
* 1. target type
|
||||
*/
|
||||
CodeConvertTemplate = @"({0} as {1})"
|
||||
};
|
||||
}
|
||||
|
||||
public static ExpBinaryOperatorNode Div( Token source, ExpNode left, ExpNode right )
|
||||
{
|
||||
if( !left.IsNumber && !right.IsNumber ) {
|
||||
|
||||
Reference in New Issue
Block a user