Ejemplo n.º 1
0
        protected override Expr VisitARRINIT(ExprArrayInit expr)
        {
            Debug.Assert(expr != null);
            // POSSIBLE ERROR: Multi-d should be an error?
            Expr pTypeOf = CreateTypeOf(((ArrayType)expr.Type).GetElementType());
            Expr args    = GenerateArgsList(expr.OptionalArguments);
            Expr Params  = GenerateParamsArray(args, PredefinedType.PT_EXPRESSION);

            return(GenerateCall(PREDEFMETH.PM_EXPRESSION_NEWARRAYINIT, pTypeOf, Params));
        }
Ejemplo n.º 2
0
        public ExprArrayInit CreateArrayInit(EXPRFLAG nFlags, CType pType, Expr pOptionalArguments, Expr pOptionalArgumentDimensions, int[] pDimSizes)
        {
            Debug.Assert(0 == (nFlags &
                               ~(EXPRFLAG.EXF_MASK_ANY | EXPRFLAG.EXF_ARRAYCONST | EXPRFLAG.EXF_ARRAYALLCONST)));
            ExprArrayInit rval = new ExprArrayInit(pType);

            rval.OptionalArguments          = pOptionalArguments;
            rval.OptionalArgumentDimensions = pOptionalArgumentDimensions;
            rval.DimensionSizes             = pDimSizes;
            rval.DimensionSize = pDimSizes?.Length ?? 0;
            return(rval);
        }
Ejemplo n.º 3
0
 protected virtual Expr VisitARRINIT(ExprArrayInit pExpr)
 {
     return(VisitEXPR(pExpr));
 }