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
@@ -1,6 +1,6 @@
//-----------------------------------------------------------------------
//-----------------------------------------------------------------------
// file="GenerateOperatorToken.cs"
// file="ExpNodeGenerator.Operator.cs"
// Project: StgSharp
// AuthorGroup: Nitload Space
// Copyright (c) Nitload Space. All rights reserved.
@@ -54,16 +54,16 @@ namespace StgSharp.Script.Express
ExpNode right = GetNextOperandCache();
switch( t.Value ) {
case ExpCompile.KeyWord.ADD:
node = ExpBinaryOperatorNode.Add( left, right );
node = ExpBinaryOperatorNode.Add( t, left, right );
return true;
case ExpCompile.KeyWord.SUB:
node = ExpBinaryOperatorNode.Sub( left, right );
node = ExpBinaryOperatorNode.Sub( t, left, right );
return true;
case ExpCompile.KeyWord.MUL:
node = ExpBinaryOperatorNode.Mul( left, right );
node = ExpBinaryOperatorNode.Mul( t, left, right );
return true;
case ExpCompile.KeyWord.DIV:
node = ExpBinaryOperatorNode.Div( left, right );
node = ExpBinaryOperatorNode.Div( t, left, right );
return true;
default:
node = ExpNode.Empty;
@@ -76,13 +76,13 @@ namespace StgSharp.Script.Express
ExpNode operand = GetNextOperandCache();
switch( t.Value ) {
case ExpCompile.KeyWord.UnaryPlus:
node = ExpUnaryOperatorNode.UnaryPlus( operand );
node = ExpUnaryOperatorNode.UnaryPlus( t, operand );
return true;
case ExpCompile.KeyWord.UnaryMinus:
node = ExpUnaryOperatorNode.UnaryMinus( operand );
node = ExpUnaryOperatorNode.UnaryMinus( t, operand );
return true;
case ExpCompile.KeyWord.NOT:
node = ExpUnaryOperatorNode.UnaryNot( operand );
node = ExpUnaryOperatorNode.UnaryNot( t, operand );
return true;
default:
node = ExpNode.Empty;