Exemplo n.º 1
0
        public AType Assign(AType right, AType left, Aplus environment)
        {
            //If the left side is Null then we clone the right side.
            if (left.Type == ATypes.ANull)
            {
                return(right);
            }

            return(right.Indexing(GetIndexes(left, right), 0, true, right.IsMemoryMappedFile));
        }
Exemplo n.º 2
0
        public AType Assign(AType right, AType left, Aplus environment)
        {
            //If the left side is Null then we clone the right side.
            if (left.Type == ATypes.ANull)
            {
                return right;
            }

            return right.Indexing(GetIndexes(left,right),0, true, right.IsMemoryMappedFile);
        }
Exemplo n.º 3
0
        public static AType SimpleIndex(this AType input, List <AType> indexers, int indexpos, AType currentIdx, bool isAssign, bool isMemoryMapped)
        {
            // Get the current item, specified by the currentIdx
            AType item = input[currentIdx];

            if (item.IsArray && indexpos < indexers.Count - 1)
            {
                // If it is an array and we can index further, then do so
                return(item.Indexing(indexers, indexpos + 1, isAssign, isMemoryMapped));
            }
            else
            {
                return(!isAssign && isMemoryMapped?item.Clone() : item);
            }
        }