This commit is contained in:
Nitload
2025-08-25 09:50:30 +08:00
parent bd0e31e922
commit 1359ff4ecc
1630 changed files with 738486 additions and 2399 deletions
@@ -45,7 +45,7 @@ using System.Threading.Tasks;
using ExpKeyword = StgSharp.Script.Express.ExpressCompile.Keyword;
namespace StgSharp.Model.Step
namespace StgSharp.Modeling.Step
{
internal partial class StepExpSyntaxAnalyzer : ISyntaxAnalyzer
{
@@ -62,10 +62,24 @@ namespace StgSharp.Model.Step
public StepExpSyntaxAnalyzer()
{
_cache = new CompileStack<ExpSyntaxNode, IExpElementSource>();
_context = new ExpressStepUtil();
}
public ConcurrentQueue<StepEntityDefineSequence> StepEntityInitStatements { get; } = new();
public StepExpSyntaxAnalyzer( ExpSchema context, IExpElementSource local )
{
_cache = new CompileStack<ExpSyntaxNode, IExpElementSource>();
ArgumentNullException.ThrowIfNull( context );
if( context is not ExpSchema_Builtin )
{
_context = context;
} else
{
throw new InvalidCastException( "Not a valid Schema type" );
}
_local = local;
}
public ConcurrentQueue<ExpSyntaxNode> StepEntityInitStatements { get; } = new ConcurrentQueue<ExpSyntaxNode>(
);
/// <summary>
/// Append a token to top of cache. This method will automatically convert token to node
@@ -100,9 +114,6 @@ namespace StgSharp.Model.Step
case TokenFlag.Member:
TryAppendMember( expToken );
break;
case TokenFlag.Enum:
TryAppendEnum( expToken );
break;
default:
break;
}