Daily update on 20250302-043034 by Nitload Youmu.

Signed-off-by: Nitload <YoumuLiu_NSI@whv0t.onmicrosoft.com>
This commit is contained in:
Nitload
2025-03-02 04:30:34 +08:00
parent b4b90da372
commit d12bbbd873
18 changed files with 257 additions and 68 deletions
+39 -2
View File
@@ -66,6 +66,11 @@ namespace StgSharp.Script.Express
get;
}
public static ExpInstantiableElementBase Void
{
get => ExpVoidElement.Only;
}
public abstract IScriptSourceProvider SourceProvider
{
get;
@@ -78,9 +83,41 @@ namespace StgSharp.Script.Express
public abstract void Analyse();
public abstract ExpBaseNode CreateInstanceToken();
public abstract ExpBaseNode CreateInstanceNode();
public abstract bool IsConvertable( IExpElementSource targetType );
public abstract bool IsConvertable(
ExpInstantiableElementBase targetType );
private sealed class ExpVoidElement : ExpInstantiableElementBase
{
private static readonly ExpVoidElement _only = new ExpVoidElement();
public override ExpElementType ElementType => ExpElementType.Void;
public static ExpVoidElement Only => _only;
public override IScriptSourceProvider SourceProvider => ScriptSourceTransmitter.Empty;
public override string Name => "void";
public override void Analyse()
{
return;
}
public override ExpBaseNode CreateInstanceNode()
{
return default!;
}
public override bool IsConvertable(
ExpInstantiableElementBase targetType )
{
return false;
}
}
}