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
+10 -22
View File
@@ -40,25 +40,17 @@ namespace StgSharp.Script.Express
private ScriptSourceTransmitter _transmitter;
private string _name;
public ExpFunctionSource(
string name,
ScriptSourceTransmitter transmitter )
public ExpFunctionSource( string name, ScriptSourceTransmitter transmitter )
{
_name = name;
_transmitter = transmitter;
}
public Dictionary<string, ExpElementInstanceBase> FuncParams
{
get;
init;
} = new Dictionary<string, ExpElementInstanceBase>();
public Dictionary<string, ExpElementInstance> FuncParams { get; init; } = new Dictionary<string, ExpElementInstance>(
);
public Dictionary<string, ExpElementInstanceBase> LocalVariables
{
get;
init;
} = new Dictionary<string, ExpElementInstanceBase>();
public Dictionary<string, ExpElementInstance> LocalVariables { get; init; } = new Dictionary<string, ExpElementInstance>(
);
public override ExpElementType ElementType => ExpElementType.Function;
@@ -66,11 +58,7 @@ namespace StgSharp.Script.Express
public override string Name => _name;
public string CallingFormat
{
get;
private set;
}
public string CallingFormat { get; private set; }
public override void Analyse()
{
@@ -89,13 +77,13 @@ namespace StgSharp.Script.Express
public override bool TryGetMember( string name, out ExpNode memberNode )
{
if( FuncParams.TryGetValue(
name, out ExpElementInstanceBase? param ) ) {
if( FuncParams.TryGetValue( name, out ExpElementInstance? param ) )
{
memberNode = param;
return true;
}
if( LocalVariables.TryGetValue(
name, out ExpElementInstanceBase? variable ) ) {
if( LocalVariables.TryGetValue( name, out ExpElementInstance? variable ) )
{
memberNode = variable;
return true;
}