Daily update on 20250721-223448 by Nitload Youmu. Additional Message : Rename StgSHarp.C to StgSharp.Native. Add SDL to repo.
Signed-off-by: Nitload <YoumuLiu_NSI@whv0t.onmicrosoft.com>
This commit is contained in:
@@ -31,19 +31,29 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Linq.Expressions;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace StgSharp.Script.Express
|
||||
{
|
||||
public class ExpIndexNode : ExpInstanceReferenceNode
|
||||
public class ExpIndexNode : ExpSyntaxNode
|
||||
{
|
||||
|
||||
internal ExpIndexNode( Token t, ExpSyntaxNode node ) : base( t ) { }
|
||||
private const string _codeTemplate = @"[{0}]";
|
||||
|
||||
public override ExpSyntaxNode Left => throw new NotImplementedException();
|
||||
private ExpSyntaxNode _index;
|
||||
|
||||
public override ExpSyntaxNode Right => throw new NotImplementedException();
|
||||
internal ExpIndexNode( Token t, ExpSyntaxNode node )
|
||||
: base( t )
|
||||
{
|
||||
_index = node;
|
||||
CodeConvertTemplate = _codeTemplate;
|
||||
}
|
||||
|
||||
public override ExpSyntaxNode Left => _index;
|
||||
|
||||
public override ExpSyntaxNode Right => Empty;
|
||||
|
||||
public override IExpElementSource EqualityTypeConvert => throw new NotImplementedException();
|
||||
|
||||
@@ -58,4 +68,58 @@ namespace StgSharp.Script.Express
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public class ExpRangeNode : ExpSyntaxNode
|
||||
{
|
||||
|
||||
private const string _codeTemplate = "[{0}..{1}]";
|
||||
|
||||
private ExpSyntaxNode _begin, _end;
|
||||
|
||||
internal ExpRangeNode( Token t, ExpSyntaxNode begin, ExpSyntaxNode end )
|
||||
: base( t )
|
||||
{
|
||||
_begin = begin;
|
||||
_end = end;
|
||||
CodeConvertTemplate = _codeTemplate;
|
||||
}
|
||||
|
||||
public override ExpSyntaxNode Left => _begin;
|
||||
|
||||
public override ExpSyntaxNode Right => _end;
|
||||
|
||||
public override IExpElementSource EqualityTypeConvert => ExpInstantiableElement.Void;
|
||||
|
||||
public static ExpRangeNode RangeNode(
|
||||
Token position,
|
||||
ExpSyntaxNode beginNode,
|
||||
ExpSyntaxNode endNode )
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull( beginNode );
|
||||
ArgumentNullException.ThrowIfNull( endNode );
|
||||
if( ExpNodeFlag.BuiltinType_Int.IsNotInFlag( beginNode.NodeFlag ) ) {
|
||||
throw new ExpInvalidTypeException(
|
||||
position, "Integer", beginNode.EqualityTypeConvert.Name );
|
||||
}
|
||||
if( ExpNodeFlag.BuiltinType_Int.IsNotInFlag( endNode.NodeFlag ) ) {
|
||||
throw new ExpInvalidTypeException(
|
||||
position, "Integer", endNode.EqualityTypeConvert.Name );
|
||||
}
|
||||
return new ExpRangeNode( position, beginNode, endNode );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public class ExpCollectionExpressionNode : ExpSyntaxNode
|
||||
{
|
||||
|
||||
internal ExpCollectionExpressionNode( Token t, ExpTupleNode tupleNode ) : base( t ) { }
|
||||
|
||||
public override ExpSyntaxNode Left => throw new NotImplementedException();
|
||||
|
||||
public override ExpSyntaxNode Right => throw new NotImplementedException();
|
||||
|
||||
public override IExpElementSource EqualityTypeConvert => throw new NotImplementedException();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user