Daily update on 20250310-064733 by Nitload Youmu. Additional Message : Change: Generic node removed, five non-generic node as replacement

Change: Preprocess to token scheduled, less dependency on type prediction, which put to LINK or C# compiling pase
Design: the EXPRESS lang feature "FIXED" keyword not supported, builtin type binary not supported, not used in STEP AP203 and much too complex to make a full marshal implementation in C#.
Add: Node generating method to generate literal node

Signed-off-by: Nitload <YoumuLiu_NSI@whv0t.onmicrosoft.com>
This commit is contained in:
Nitload
2025-03-10 06:47:33 +08:00
parent 6f494f25ef
commit 16b813646d
31 changed files with 387 additions and 217 deletions
@@ -40,7 +40,7 @@ namespace StgSharp.Script.Express
protected internal (int min, int max) _range;
protected internal ExpElementType _memberType;
protected ExpCollectionInstanceBase( string name ) : base( name ) { }
protected ExpCollectionInstanceBase( Token source ) : base( source ) { }
public abstract ExpCollectionBase CollectionValue
{
@@ -67,8 +67,8 @@ namespace StgSharp.Script.Express
private ExpSet _collection;
public ExpSetInstance( string name, ExpSet set, ExpSchema context )
: base( name )
public ExpSetInstance( Token source, ExpSet set )
: base( source )
{
_collection = set;
}
@@ -85,8 +85,8 @@ namespace StgSharp.Script.Express
private ExpBag _collection;
public ExpBagInstance( string name, ExpBag bag, ExpSchema context )
: base( name )
public ExpBagInstance( Token source, ExpBag bag )
: base( source )
{
_collection = bag;
}
@@ -103,8 +103,8 @@ namespace StgSharp.Script.Express
private ExpList _collection;
public ExpListInstance( string name, ExpList list, ExpSchema context )
: base( name )
public ExpListInstance( Token source, ExpList list )
: base( source )
{
_collection = list;
}
@@ -121,11 +121,8 @@ namespace StgSharp.Script.Express
private ExpArray _collection;
public ExpArrayInstance(
string name,
ExpArray array,
ExpSchema context )
: base( name )
public ExpArrayInstance( Token source, ExpArray array )
: base( source )
{
_collection = array;
}
@@ -69,6 +69,18 @@ namespace StgSharp.Script.Express
public override string ToString() => _value.ToString();
public static bool TryParse(
ReadOnlySpan<char> value,
out ExpLogic result )
{
if( Enum.TryParse<ExpLogicValue>( value, out ExpLogicValue e ) ) {
result = new ExpLogic( e );
return true;
}
result = default;
return false;
}
// NOT !
public static ExpLogic operator !( ExpLogic a )
{