Daily update on 20250325-164701 by Nitload Youmu. Additional Message : Lineaar line and multi-linear line compile full function. String literal parsing improve.

Signed-off-by: Nitload <YoumuLiu_NSI@whv0t.onmicrosoft.com>
This commit is contained in:
Nitload
2025-03-25 16:47:02 +08:00
parent ffd5825a05
commit 469cb88472
29 changed files with 414 additions and 273 deletions
+9 -11
View File
@@ -47,17 +47,13 @@ namespace StgSharp
: base( name, source )
{
LocalVariables.Add(
"a",
ExpElementInstanceBase.CreateLiteral( new Token( "1", 0, 0, TokenFlag.Number ) ) );
"a", new ExpIntNode( new Token( "a", 0, 0, TokenFlag.Number ), 1, false ) );
LocalVariables.Add(
"b",
ExpElementInstanceBase.CreateLiteral( new Token( "1", 0, 0, TokenFlag.Number ) ) );
"b", new ExpIntNode( new Token( "b", 0, 0, TokenFlag.Number ), 1, false ) );
LocalVariables.Add(
"c",
ExpElementInstanceBase.CreateLiteral( new Token( "1", 0, 0, TokenFlag.Number ) ) );
"c", new ExpIntNode( new Token( "c", 0, 0, TokenFlag.Number ), 1, false ) );
LocalVariables.Add(
"d",
ExpElementInstanceBase.CreateLiteral( new Token( "1", 0, 0, TokenFlag.Number ) ) );
"d", new ExpIntNode( new Token( "d", 0, 0, TokenFlag.Number ), 1, false ) );
}
}
@@ -77,7 +73,7 @@ namespace StgSharp
return;
}
public override bool TryGetConst( string name, out ExpElementInstanceBase c )
public override bool TryGetConst( string name, out ExpElementInstance c )
{
c = null;
return false;
@@ -127,9 +123,11 @@ namespace StgSharp
{
ExpressCompile.InitCompile();
ScriptSourceTransmitter transmitter = new ScriptSourceTransmitter( "END", 0 );
transmitter.WriteLine( @"a := ( b + c + d * 2 ) * d;" );
//transmitter.WriteLine( @"a := b + (c + d) * a;" );
//Console.WriteLine( @$"a := ( b * E + d * 2 ) * d;" );
transmitter.WriteLine( @$"a := ( b * E + d * 2 ) * d;" );
transmitter.WriteLine( @"a := b + (c + d) * a;" );
transmitter.EndWriting();
ExpSourceReader reader = new ExpSourceReader( transmitter );
/**/