Daily update on 20250302-043034 by Nitload Youmu.
Signed-off-by: Nitload <YoumuLiu_NSI@whv0t.onmicrosoft.com>
This commit is contained in:
@@ -116,6 +116,11 @@ namespace StgSharp.Script.Express
|
||||
return new ExpNodeNextEnumerator( this );
|
||||
}
|
||||
|
||||
public static bool IsNullOrEmpty( ExpBaseNode node )
|
||||
{
|
||||
return node == ExpEmptyNode._only || node == null;
|
||||
}
|
||||
|
||||
public static bool VerifyTypeConvertable(
|
||||
ExpBaseNode left,
|
||||
ExpBaseNode right )
|
||||
@@ -149,8 +154,7 @@ namespace StgSharp.Script.Express
|
||||
|
||||
public override ExpBaseNode Right => _only;
|
||||
|
||||
public override IExpElementSource EqualityTypeConvert => throw new NotImplementedException(
|
||||
);
|
||||
public override ExpInstantiableElementBase EqualityTypeConvert => ExpInstantiableElementBase.Void;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ namespace StgSharp.Script.Express
|
||||
|
||||
private ExpBaseNode _left;
|
||||
private ExpBaseNode _right;
|
||||
private ExpTypeSource _returnType;
|
||||
private ExpInstantiableElementBase _returnType;
|
||||
|
||||
public ExpBinaryOperatorNode( string name ) : base( name, null! ) { }
|
||||
|
||||
@@ -66,7 +66,7 @@ namespace StgSharp.Script.Express
|
||||
|
||||
public override ExpBaseNode Right => _right;
|
||||
|
||||
public override IExpElementSource EqualityTypeConvert => _returnType;
|
||||
public override ExpInstantiableElementBase EqualityTypeConvert => _returnType;
|
||||
|
||||
public static ExpBinaryOperatorNode Add(
|
||||
ExpBaseNode left,
|
||||
@@ -87,6 +87,23 @@ namespace StgSharp.Script.Express
|
||||
};
|
||||
}
|
||||
|
||||
public static ExpBinaryOperatorNode Assign(
|
||||
ExpBaseNode left,
|
||||
ExpBaseNode right )
|
||||
{
|
||||
if( left.EqualityTypeConvert != right.EqualityTypeConvert ) {
|
||||
throw new ExpInvalidTypeException(
|
||||
left.EqualityTypeConvert.Name,
|
||||
right.EqualityTypeConvert.Name );
|
||||
}
|
||||
return new ExpBinaryOperatorNode( ExpCompile.KeyWord.Assignment )
|
||||
{
|
||||
_returnType = ExpTypeSource.,
|
||||
_nodeFlag = ExpNodeFlag.Operator_Binary | left._nodeFlag,
|
||||
CodeConvertTemplate = "{0} & {1}",
|
||||
};
|
||||
}
|
||||
|
||||
public static ExpBinaryOperatorNode Div(
|
||||
ExpBaseNode left,
|
||||
ExpBaseNode right )
|
||||
|
||||
@@ -52,7 +52,7 @@ namespace StgSharp.Script.Express
|
||||
{
|
||||
_parameter = firstParameter;
|
||||
if( !context.TryGetFunction( functionName, out _function ) ) {
|
||||
foreach( var item in context. ) { }
|
||||
foreach( var item in context. ) { }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@ namespace StgSharp.Script.Express
|
||||
|
||||
public override ExpBaseNode Right => _parameter;
|
||||
|
||||
public override IExpElementSource EqualityTypeConvert => throw new NotImplementedException(
|
||||
public override ExpInstantiableElementBase EqualityTypeConvert => throw new NotImplementedException(
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
@@ -93,7 +93,7 @@ namespace StgSharp.Script.Express
|
||||
}
|
||||
}
|
||||
|
||||
public override ExpBaseNode Left => ExpBaseNode;
|
||||
public override ExpBaseNode Left => Empty;
|
||||
|
||||
public override ExpBaseNode Right => throw new NotImplementedException();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user