daily update on 20250214 by nitload youmu, building syntax analysor, tough!

This commit is contained in:
Nitload
2025-02-14 13:30:17 +08:00
parent c23b640cae
commit ccef0de6f6
68 changed files with 2594 additions and 913 deletions
@@ -71,6 +71,8 @@ namespace StgSharp.Script.Express
public abstract IEnumerator<ExpElementInstanceBase> GetEnumerator();
public abstract bool IsConvertable( IExpElementSource targetType );
IEnumerator IEnumerable.GetEnumerator()
{
return GetEnumerator();
@@ -102,7 +104,7 @@ namespace StgSharp.Script.Express
public override int Count => _collection.Length;
public override string Name => ExpCompile.AddOrGetString( "ARRAY" );
public override string Name => ExpCompile.PoolString( "ARRAY" );
public override IEnumerator<ExpElementInstanceBase> GetEnumerator()
{
@@ -110,6 +112,11 @@ namespace StgSharp.Script.Express
.GetEnumerator();
}
public override bool IsConvertable( IExpElementSource targetType )
{
throw new NotImplementedException();
}
}
public class ExpBag : ExpCollectionBase
@@ -122,13 +129,18 @@ namespace StgSharp.Script.Express
public override int Count => _collection.Count;
public override string Name => ExpCompile.AddOrGetString( "BAG" );
public override string Name => ExpCompile.PoolString( "BAG" );
public override IEnumerator<ExpElementInstanceBase> GetEnumerator()
{
return _collection.GetEnumerator();
}
public override bool IsConvertable( IExpElementSource targetType )
{
throw new NotImplementedException();
}
}
public sealed class ExpList : ExpCollectionBase
@@ -141,13 +153,18 @@ namespace StgSharp.Script.Express
public override int Count => _collection.Count;
public override string Name => ExpCompile.AddOrGetString( "LIST" );
public override string Name => ExpCompile.PoolString( "LIST" );
public override IEnumerator<ExpElementInstanceBase> GetEnumerator()
{
return _collection.GetEnumerator();
}
public override bool IsConvertable( IExpElementSource targetType )
{
throw new NotImplementedException();
}
}
public class ExpSet : ExpCollectionBase
@@ -159,7 +176,7 @@ namespace StgSharp.Script.Express
public override int Count => _collection.Count;
public override string Name => ExpCompile.AddOrGetString( "SET" );
public override string Name => ExpCompile.PoolString( "SET" );
public void Add( ExpElementInstanceBase token )
{
@@ -177,5 +194,10 @@ namespace StgSharp.Script.Express
.GetEnumerator();
}
public override bool IsConvertable( IExpElementSource targetType )
{
throw new NotImplementedException();
}
}
}
@@ -53,6 +53,12 @@ namespace StgSharp.Script.Express
get => _memberType;
}
public override ExpToken Left => null!;
public override ExpToken Right => null!;
public override ExpToken Next => null!;
public int MinCapacity => _range.min;
public int MaxCapacity => _range.max;
@@ -72,6 +78,14 @@ namespace StgSharp.Script.Express
public override ExpCollectionBase CollectionValue => _collection;
public override ExpToken Next
{
set => throw new NotImplementedException();
}
public override IExpElementSource EqualityTypeConvert => throw new NotImplementedException(
);
}
public sealed class ExpBagInstance : ExpCollectionInstanceBase
@@ -87,6 +101,14 @@ namespace StgSharp.Script.Express
public override ExpCollectionBase CollectionValue => _collection;
public override ExpToken Next
{
set => throw new NotImplementedException();
}
public override IExpElementSource EqualityTypeConvert => throw new NotImplementedException(
);
}
public sealed class ExpListInstance : ExpCollectionInstanceBase
@@ -102,6 +124,14 @@ namespace StgSharp.Script.Express
public override ExpCollectionBase CollectionValue => _collection;
public override ExpToken Next
{
set => throw new NotImplementedException();
}
public override IExpElementSource EqualityTypeConvert => throw new NotImplementedException(
);
}
public sealed class ExpArrayInstance : ExpCollectionInstanceBase
@@ -120,5 +150,12 @@ namespace StgSharp.Script.Express
public override ExpCollectionBase CollectionValue => _collection;
public override ExpToken Next
{
set => throw new NotImplementedException();
}
public override IExpElementSource EqualityTypeConvert => _collection;
}
}