Merge from branch giga

This commit is contained in:
Nitload
2025-08-31 10:42:51 +08:00
parent 1fc687f7d0
commit 1a0ccdd8cb
1619 changed files with 2812 additions and 733136 deletions
@@ -28,37 +28,78 @@
//
//-----------------------------------------------------------------------
//-----------------------------------------------------------------------
using StgSharp.Modeling.Step;
using StgSharp.Model.Step;
using StgSharp.Script;
using StgSharp.Script.Express;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
namespace StgSharp.Modeling.Step
namespace StgSharp.Model.Step
{
public class StepEntityInstanceNode : ExpSyntaxNode
{
private int id;
private StepModel _model;
public StepEntityInstanceNode( Token source, StepModel model ) : base( source ) { }
private StepEntityInstanceNode( Token source ) : base( source ) { }
public override ExpSyntaxNode Left => Empty;
public override ExpSyntaxNode Right => Empty;
public override IExpElementSource EqualityTypeConvert => throw new NotImplementedException();
public override IExpElementSource EqualityTypeConvert => StepEntityType.Source;
private void GetInstance()
public int Id { get; init; }
public static StepEntityInstanceNode Register( Token t )
{
_model
if( t.Value[ 0 ] != '#' ) {
throw new ExpInvalidSyntaxException( "Entity label in STEP should be # + number" );
}
StepEntityInstanceNode node = new StepEntityInstanceNode( t )
{
Id = int.Parse( t.Value.AsSpan( 1 ) ),
};
return node;
}
public static StepEntityInstanceNode RegisterNull( Token t )
{
if( t.Value != "$" ) {
throw new ExpInvalidSyntaxException(
$"Token {t.Value} does not represent a null entity" );
}
StepEntityInstanceNode node = new StepEntityInstanceNode( t )
{
Id = 0,
};
return node;
}
public static StepEntityInstanceNode RegisterRuntimeInference( Token t )
{
if( t.Value != "*" ) {
throw new ExpInvalidSyntaxException(
$"Token {t.Value} does not represent a runtime inferences entity" );
}
StepEntityInstanceNode node = new StepEntityInstanceNode( t )
{
Id = -1,
};
return node;
}
}
internal class StepEntityType : ExpTypeSource
{
private StepEntityType( string typeName ) : base( typeName ) { }
public static StepEntityType Source { get; } = new StepEntityType( "ENTITY" );
}
}