Daily update on 20250323-151439 by Nitload Youmu. Additional Message : none
Signed-off-by: Nitload <YoumuLiu_NSI@whv0t.onmicrosoft.com>
This commit is contained in:
@@ -50,7 +50,7 @@ namespace StgSharp.Script.Express
|
||||
{
|
||||
_sourceProvider = sourceProvider;
|
||||
_constants = new Dictionary<string, ExpElementInstanceBase>(
|
||||
ExpCompile.Multiplexer );
|
||||
ExpressCompile.Multiplexer );
|
||||
}
|
||||
|
||||
public override ExpElementType ElementType => ExpElementType.Const;
|
||||
@@ -59,7 +59,7 @@ namespace StgSharp.Script.Express
|
||||
|
||||
public override string Name
|
||||
{
|
||||
get => ExpCompile.KeyWord.Constant;
|
||||
get => ExpressCompile.KeyWord.Constant;
|
||||
}
|
||||
|
||||
public override void Analyse()
|
||||
|
||||
@@ -48,6 +48,18 @@ namespace StgSharp.Script.Express
|
||||
_transmitter = transmitter;
|
||||
}
|
||||
|
||||
public Dictionary<string, ExpElementInstanceBase> FuncParams
|
||||
{
|
||||
get;
|
||||
init;
|
||||
} = new Dictionary<string, ExpElementInstanceBase>();
|
||||
|
||||
public Dictionary<string, ExpElementInstanceBase> LocalVariables
|
||||
{
|
||||
get;
|
||||
init;
|
||||
} = new Dictionary<string, ExpElementInstanceBase>();
|
||||
|
||||
public override ExpElementType ElementType => ExpElementType.Function;
|
||||
|
||||
public override IScriptSourceProvider SourceProvider => _transmitter;
|
||||
@@ -77,6 +89,16 @@ namespace StgSharp.Script.Express
|
||||
|
||||
public override bool TryGetMember( string name, out ExpNode memberNode )
|
||||
{
|
||||
if( FuncParams.TryGetValue(
|
||||
name, out ExpElementInstanceBase? param ) ) {
|
||||
memberNode = param;
|
||||
return true;
|
||||
}
|
||||
if( LocalVariables.TryGetValue(
|
||||
name, out ExpElementInstanceBase? variable ) ) {
|
||||
memberNode = variable;
|
||||
return true;
|
||||
}
|
||||
memberNode = ExpNode.Empty;
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user