Daily update on 20250405-231604 by Nitload Youmu. Additional Message : most of repeat block analyzer complete

Signed-off-by: Nitload <YoumuLiu_NSI@whv0t.onmicrosoft.com>
This commit is contained in:
Nitload
2025-04-05 23:16:04 +08:00
parent 1a1db3554b
commit c8f426d2e8
12 changed files with 498 additions and 90 deletions
@@ -28,6 +28,8 @@
//
//-----------------------------------------------------------------------
//-----------------------------------------------------------------------
using Microsoft.CodeAnalysis.CSharp.Syntax;
using System;
using System.Collections.Generic;
using System.Linq;
@@ -102,6 +104,9 @@ namespace StgSharp.Script.Express
if( TryParseInstance( t ) ) {
return true;
}
if( TryParseKeyword( t ) ) {
return true;
}
//Many thing miss here
@@ -230,9 +235,26 @@ namespace StgSharp.Script.Express
{
_cache.PushOperand( ExpInstanceReferenceNode.MakeReferenceFrom( t, instance ) );
return true;
} else if( _tempVariableInLoops.TryGetValue( t.Value, out instance ) ) {
_cache.PushOperand( ExpInstanceReferenceNode.MakeReferenceFrom( t, instance ) );
}
return false;
}
private bool TryParseKeyword( Token t )
{
switch( t.Value )
{
case ExpKeyword.Return:
_cache.PushOperator( t );
return true;
case ExpKeyword.Skip:
_cache.PushOperand( ExpProcedureControlNode.Skip( t ) );
return true;
default:
return false;
}
}
}
}