protected override Expr VisitARRAYINDEX(ExprArrayIndex pExpr) { Debug.Assert(pExpr != null); Expr arr = Visit(pExpr.Array); Expr args = GenerateIndexList(pExpr.Index); if (args is ExprList) { Expr Params = GenerateParamsArray(args, PredefinedType.PT_EXPRESSION); return(GenerateCall(PREDEFMETH.PM_EXPRESSION_ARRAYINDEX2, arr, Params)); } return(GenerateCall(PREDEFMETH.PM_EXPRESSION_ARRAYINDEX, arr, args)); }
public ExprArrayIndex CreateArrayIndex(Expr pArray, Expr pIndex) { CType pType = pArray.Type; if (pType != null && pType.IsArrayType()) { pType = pType.AsArrayType().GetElementType(); } else if (pType == null) { pType = GetTypes().GetReqPredefAgg(PredefinedType.PT_INT).getThisType(); } ExprArrayIndex pResult = new ExprArrayIndex(pType); pResult.Array = pArray; pResult.Index = pIndex; return(pResult); }
protected virtual Expr VisitARRAYINDEX(ExprArrayIndex pExpr) { return(VisitEXPR(pExpr)); }