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:
@@ -51,10 +51,11 @@ namespace StgSharp.Script
|
||||
private Token[] _tokenArray = new Token[4];
|
||||
|
||||
private int _nodeCount,_tokenCount, _operatorCount;
|
||||
private RandomAccessibleStack<CompileDepthMark> _depthStack = new RandomAccessibleStack<CompileDepthMark>(
|
||||
);
|
||||
|
||||
private RandomAccessibleStack<OperandIndex> _isNode = new RandomAccessibleStack<OperandIndex>(
|
||||
8 );
|
||||
private Stack<CompileDepthMark> _depthStack = new Stack<CompileDepthMark>();
|
||||
private Stack<Stack<TNode>> _statementCache = new Stack<Stack<TNode>>();
|
||||
private TNode _lastNode;
|
||||
|
||||
@@ -92,8 +93,6 @@ namespace StgSharp.Script
|
||||
get => _statementCache.Peek();
|
||||
}
|
||||
|
||||
public Stack<CompileDepthMark> DepthStack => _depthStack;
|
||||
|
||||
public void DecreaseDepth()
|
||||
{
|
||||
CompileDepthMark mark = _depthStack.Pop();
|
||||
@@ -123,6 +122,7 @@ namespace StgSharp.Script
|
||||
out TNode operandNode )
|
||||
{
|
||||
OperandIndex index = _isNode[ i ];
|
||||
|
||||
_depthStack.Contains( depth );
|
||||
if( index.IsNode )
|
||||
{
|
||||
|
||||
@@ -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();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ using System.Reflection;
|
||||
[assembly: System.Reflection.AssemblyCompanyAttribute("StgSharp.Script")]
|
||||
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
|
||||
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+74c01effe4cabbc9d0e2e87b0d295bb29d7c62ba")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+c624a8ca38fb17f15f058e4007e9bb1570161c3c")]
|
||||
[assembly: System.Reflection.AssemblyProductAttribute("StgSharp.Script")]
|
||||
[assembly: System.Reflection.AssemblyTitleAttribute("StgSharp.Script")]
|
||||
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
||||
|
||||
@@ -1 +1 @@
|
||||
{"documents":{"D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\内核源代码\\*":"https://raw.githubusercontent.com/Nitload-NSI/CCD_Github/74c01effe4cabbc9d0e2e87b0d295bb29d7c62ba/*"}}
|
||||
{"documents":{"D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\内核源代码\\*":"https://raw.githubusercontent.com/Nitload-NSI/CCD_Github/c624a8ca38fb17f15f058e4007e9bb1570161c3c/*"}}
|
||||
Reference in New Issue
Block a user