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:
@@ -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 );
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user