Daily update on 20250313-044921 by Nitload Youmu. Additional Message : Parser to TokenFlag.Member, improvement of exiting StgSharp platform

Signed-off-by: Nitload <YoumuLiu_NSI@whv0t.onmicrosoft.com>
This commit is contained in:
Nitload
2025-03-13 04:49:21 +08:00
parent 9647c2c68a
commit 6222f8c8be
49 changed files with 1509 additions and 288 deletions
@@ -33,6 +33,7 @@ using System.Collections;
using System.Collections.Frozen;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq.Expressions;
using System.Runtime.CompilerServices;
using System.Text;
@@ -88,6 +89,17 @@ namespace StgSharp.Script.Express
return _constants.TryGetValue( name, out instance );
}
public override bool TryGetMember( string name, out ExpNode memberNode )
{
if( _constants.TryGetValue( name,
out ExpElementInstanceBase? node ) ) {
memberNode = node;
return true;
}
memberNode = ExpNode.Empty;
return false;
}
internal void AddConstant( string name, ExpElementInstanceBase value )
{
_constants.Add( name, value );
@@ -63,5 +63,10 @@ namespace StgSharp.Script.Express
throw new NotImplementedException();
}
public override bool TryGetMember( string name, out ExpNode memberNode )
{
throw new NotImplementedException();
}
}
}
@@ -75,5 +75,11 @@ namespace StgSharp.Script.Express
throw new NotImplementedException();
}
public override bool TryGetMember( string name, out ExpNode memberNode )
{
memberNode = ExpNode.Empty;
return false;
}
}
}
@@ -84,5 +84,11 @@ namespace StgSharp.Script.Express
throw new NotImplementedException();
}
public override bool TryGetMember( string name, out ExpNode memberNode )
{
memberNode = ExpNode.Empty;
return false;
}
}
}
+7 -1
View File
@@ -77,7 +77,7 @@ namespace StgSharp.Script.Express
throw new NotImplementedException();
}
public override ExpNode CreateInstanceNode()
public override ExpElementInstanceNode CreateInstanceNode()
{
throw new NotImplementedException();
}
@@ -87,6 +87,12 @@ namespace StgSharp.Script.Express
return type == null || type == ExpVoidType.Only;
}
public override bool TryGetMember( string name, out ExpNode memberNode )
{
memberNode = ExpNode.Empty;
return false;
}
private class ExpVoidType : ExpTypeSource
{