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)); }
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); }
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); } }