HLSF full functionally available. Working on Matrix.
Signed-off-by: Youmu Liu <105042599+Nitload-NSI@users.noreply.github.com>
This commit is contained in:
@@ -43,7 +43,7 @@ namespace StgSharp.Model.Step
|
||||
|
||||
private ExpSyntaxNode _begin;
|
||||
|
||||
public StepComplexEntityNode( ExpSyntaxNode node )
|
||||
private StepComplexEntityNode( ExpSyntaxNode node )
|
||||
: base( node.Source )
|
||||
{
|
||||
_begin = node;
|
||||
@@ -53,9 +53,9 @@ namespace StgSharp.Model.Step
|
||||
|
||||
public override ExpSyntaxNode Right => _begin;
|
||||
|
||||
public override IExpElementSource EqualityTypeConvert => throw new NotImplementedException();
|
||||
public override IExpElementSource EqualityTypeConvert => StepEntityType.Source;
|
||||
|
||||
public StepComplexEntityNode FromTuple( ExpSyntaxNode node )
|
||||
public static StepComplexEntityNode FromTuple( ExpSyntaxNode node )
|
||||
{
|
||||
if( node is not ExpTupleNode tuple ) {
|
||||
throw new ExpInvalidSyntaxException( "Node to convert is not a complex" );
|
||||
|
||||
@@ -30,7 +30,6 @@
|
||||
//-----------------------------------------------------------------------
|
||||
using Microsoft.CodeAnalysis.CSharp.Syntax;
|
||||
|
||||
using StgSharp.Modeling.Step;
|
||||
using StgSharp.Script;
|
||||
using StgSharp.Script.Express;
|
||||
|
||||
@@ -41,7 +40,7 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace StgSharp.Model.Step.SyntaxNode
|
||||
namespace StgSharp.Model.Step
|
||||
{
|
||||
public class StepEntityInitCaller : ExpFunctionSource
|
||||
{
|
||||
|
||||
@@ -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" );
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace StgSharp.Modeling.Step
|
||||
namespace StgSharp.Model.Step
|
||||
{
|
||||
internal class StepExpEnumValueNode : ExpSyntaxNode
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user