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:
Nitload
2025-04-11 01:39:55 +08:00
parent a4b2e9a805
commit 2692495dc8
11 changed files with 225 additions and 12 deletions
@@ -97,11 +97,23 @@ namespace StgSharp.Script.Express
t,
"An ExpNode for function calling is needed, but a token was popped" );
}
} else if( _context.TryGetProcedure( op.Value, out ExpProcedureSource? p ) )
{
if( !_cache.PopOperand( out Token t, out ExpNode? param ) )
{
node = ExpProcedureCallingNode.CallProcedure( op, p, param );
return node;
} else
{
throw new ExpCompileException(
t,
"An ExpNode for function calling is needed, but a token was popped" );
}
} else if( ExpSchema.BuiltinSchema.TryGetFunction( op.Value, out f ) )
{
if( !_cache.PopOperand( out Token t, out ExpNode? p ) )
if( !_cache.PopOperand( out Token t, out ExpNode? param ) )
{
node = ExpFunctionCallingNode.CallFunction( op, f, p );
node = ExpFunctionCallingNode.CallFunction( op, f, param );
return node;
} else
{
@@ -153,6 +165,12 @@ namespace StgSharp.Script.Express
case ExpKeyword.Assignment:
node = ExpBinaryOperatorNode.Assign( t, left, right );
return true;
case ExpKeyword.InstanceEqual:
node = ExpBinaryOperatorNode.CompareInstanceEqual( t, left, right );
return true;
case ExpKeyword.InstanceNotEqual:
node = ExpBinaryOperatorNode.CompareInstanceNotEqual( t, left, right );
return true;
default:
node = ExpNode.Empty;
return false;