Daily update on 20250415-031523 by Nitload Youmu. Additional Message : Add: merge a step specified EXPRESS syntax analyzer and token reader

Change: remove nearly all ixmilia interface, abstact class and supporting classes from step entity calsses, the next is to remove Base classes, and use ones defined in StgSharp instead

Signed-off-by: Nitload <YoumuLiu_NSI@whv0t.onmicrosoft.com>
This commit is contained in:
Nitload
2025-04-15 03:15:23 +08:00
parent 9457309c5a
commit c29993fd84
23 changed files with 1838 additions and 159 deletions
+16 -16
View File
@@ -44,7 +44,7 @@ using ExpKeyword = StgSharp.Script.Express.ExpressCompile.Keyword;
namespace StgSharp.Script.Express
{
public partial class ExpSyntaxAnalyzer
public partial class ExpSyntaxAnalyzer : ISyntaxAnalyzer
{
private const int EndLine = 1;
@@ -95,11 +95,24 @@ namespace StgSharp.Script.Express
}
}
public ExpNode GetNextOperandCache()
{
if( _cache.PopOperand( out Token t, out ExpNode? n ) )
{
return n;
} else
{
// process some rare case here
}
throw new NotImplementedException();
}
/// <summary>
/// Append a token to top of cache. This method will automatically convert token to node
/// if meets separators or operators.
/// </summary>
public void AppendToken_common( Token expToken )
private void AppendToken_common( Token expToken )
{
switch( expToken.Flag )
{
@@ -133,19 +146,6 @@ namespace StgSharp.Script.Express
}
}
public ExpNode GetNextOperandCache()
{
if( _cache.PopOperand( out Token t, out ExpNode? n ) )
{
return n;
} else
{
// process some rare case here
}
throw new NotImplementedException();
}
private CompileDepthMark TryEnterBranch( Token t )
{
if( t.Flag == TokenFlag.String ) {
@@ -153,7 +153,7 @@ namespace StgSharp.Script.Express
}
switch( t.Value )
{
case ExpKeyword.Case:
case ExpKeyword.Case:
return _cache.IncreaseDepth( ( int )ExpCompileStateCode.CaseBranch );
case ExpKeyword.If:
return _cache.IncreaseDepth( ( int )ExpCompileStateCode.IfBranch );