public AstIfNull(IAstRef value, IAstRefOrValue ifNullValue) { _value = value; _ifNullValue = ifNullValue; if (!_value.itemType.IsAssignableFrom(_ifNullValue.itemType)) { throw new EmitMapperException("Incorrect ifnull expression"); } }
/// <summary> /// Reads the array item r a. /// </summary> /// <param name="array">The array.</param> /// <param name="index">The index.</param> /// <returns>An IAstRefOrAddr.</returns> public static IAstRefOrAddr ReadArrayItemRA(IAstRef array, int index) { if (array.ItemType.IsValueType) { return new AstReadArrayItemAddr { Array = array, Index = index } } ; return(new AstReadArrayItemRef { Array = array, Index = index }); }
public static IAstRefOrAddr ReadArrayItemRA(IAstRef array, int index) { if (array.itemType.IsValueType) { return(new AstReadArrayItemAddr() { array = array, index = index }); } else { return(new AstReadArrayItemRef() { array = array, index = index }); } }
public static IAstRefOrValue ReadArrayItemRV(IAstRef array, int index) { if (array.itemType.IsValueType) { return new AstReadArrayItemValue() { array = array, index = index }; } else { return new AstReadArrayItemRef() { array = array, index = index }; } }
public static IAstRefOrValue ReadArrayItemRV(IAstRef array, int index) { if (array.itemType.IsValueType()) { return(new AstReadArrayItemValue() { array = array, index = index }); } else { return(new AstReadArrayItemRef() { array = array, index = index }); } }