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
@@ -56,17 +56,36 @@ namespace StgSharp.Script.Express
public abstract class ExpElementInstanceBase : ExpNode
{
protected ExpElementInstanceBase( string name ) : base( name ) { }
protected ExpElementInstanceBase( Token source ) : base( source ) { }
public ExpElementType ElementType
{
get;
}
public override ExpNode Left => Empty;
public override ExpNode Right => Empty;
public abstract string TypeName
{
get;
}
public static ExpElementInstanceBase CreateLiteral( Token t )
{
if( int.TryParse( t.Value, out int _int ) ) {
return new ExpIntNode( t, _int );
} else if( float.TryParse( t.Value, out float _float ) ) {
return new ExpRealNumberNode( t, _float );
} else if( bool.TryParse( t.Value, out bool _bool ) ) {
return new ExpBoolNode( t, _bool );
} else if( ExpLogic.TryParse( t.Value, out ExpLogic _logic ) ) {
return new ExpLogicValueNode( t, _logic );
} else {
return new ExpStringNode( t, t.Value );
}
}
}
}