Daily update on 20250304-070522 by Nitload Youmu. Additional Message : None

Signed-off-by: Nitload <YoumuLiu_NSI@whv0t.onmicrosoft.com>
This commit is contained in:
Nitload
2025-03-04 07:05:23 +08:00
parent 825e68853c
commit 5d4f516a28
40 changed files with 299 additions and 233 deletions
@@ -43,10 +43,9 @@ namespace StgSharp.Script.Express
private ExpNode _indexExpression;
public ExpIndexOfNode(
ExpSchema context,
ExpCollectionInstanceBase instance,
ExpNode indexExpression )
private ExpIndexOfNode(
ExpCollectionInstanceBase instance,
ExpNode indexExpression )
: base( ExpCompile.PoolString( "[" ) )
{
_collection = instance;
@@ -60,5 +59,16 @@ namespace StgSharp.Script.Express
public override IExpElementSource EqualityTypeConvert => _collection.EqualityTypeConvert;
public static ExpIndexOfNode Create(
ExpCollectionInstanceBase instance,
ExpNode indexExpression )
{
if( !indexExpression.IsNumber ) {
throw new ExpInvalidTypeException(
"Number", indexExpression.EqualityTypeConvert.Name );
}
return new ExpIndexOfNode( instance, indexExpression );
}
}
}