Daily update on 20250426-091836 by Nitload Youmu. Additional Message : none

Signed-off-by: Nitload <YoumuLiu_NSI@whv0t.onmicrosoft.com>
This commit is contained in:
Nitload
2025-04-26 09:18:36 +08:00
parent a0f7476291
commit a6411e2f25
21 changed files with 1763 additions and 7 deletions
@@ -33,6 +33,8 @@ namespace StgSharp.Script
public interface IScriptTokenReader
{
bool IsEmpty { get; }
Token ReadToken();
bool TryReadToken( out Token t );
@@ -54,6 +54,8 @@ namespace StgSharp.Script.Express
public override ExpElementType ElementType => ExpElementType.Function;
public IExpElementSource ReturningType { get; protected set; }
public override IScriptSourceProvider SourceProvider => _transmitter;
public override string Name => _name;
@@ -61,6 +61,8 @@ namespace StgSharp.Script.Express
public override ExpSyntaxNode Right => _right;
public string Operator { get; private set; }
public static ExpBinaryOperatorNode Add(
Token source,
ExpSyntaxNode left,
@@ -93,6 +95,7 @@ namespace StgSharp.Script.Express
{
_returnType = ExpInstantiableElement.Void,
_nodeFlag = ExpNodeFlag.Operator_Binary | left._nodeFlag,
Operator = "=",
CodeConvertTemplate = "{0} = {1}",
};
}
@@ -111,11 +114,11 @@ namespace StgSharp.Script.Express
}
public static ExpBinaryOperatorNode CompareInstanceNotEqual(
Token nsource,
Token source,
ExpSyntaxNode left,
ExpSyntaxNode right )
{
return new ExpBinaryOperatorNode( nsource, left, right )
return new ExpBinaryOperatorNode( source, left, right )
{
_returnType = ExpressCompile.ExpBool,
_nodeFlag = ExpNodeFlag.BuiltinType_Boolean | ExpNodeFlag.Operator_Binary,
@@ -128,13 +131,13 @@ namespace StgSharp.Script.Express
ExpSyntaxNode left,
ExpSyntaxNode right )
{
if( right is not ExpMetaRefNode metaref ) {
if( right is not ExpMetaRefNode metaRef ) {
throw new ExpInvalidTypeException(
"<source of element>", right.EqualityTypeConvert.Name );
}
return new ExpBinaryOperatorNode( source, left, right )
{
_returnType = metaref.SourceRef,
_returnType = metaRef.SourceRef,
_nodeFlag = ExpNodeFlag.Operator_Binary,
/*
* 0. instance to convert
@@ -65,6 +65,9 @@ namespace StgSharp.Script.Express
ExpMetaRefNode type,
ExpSyntaxNode init )
{
if( init is ExpTupleNode tupleNode ) {
init = tupleNode.Right;
}
ExpElementInitializingNode node = new ExpElementInitializingNode( source, type, init );
return node;
}
@@ -58,8 +58,7 @@ namespace StgSharp.Script.Express
public ExpFunctionSource FunctionCaller => _function;
public override ExpInstantiableElement EqualityTypeConvert => throw new NotImplementedException(
);
public override ExpInstantiableElement EqualityTypeConvert => _function.;
public override ExpSyntaxNode Left => Empty;
@@ -75,6 +74,9 @@ namespace StgSharp.Script.Express
ExpFunctionSource function,
ExpSyntaxNode param )
{
if( param is ExpTupleNode ) {
param = param.Right;
}
return new ExpFunctionCallingNode( source, function, param );
}