Esempio n. 1
0
        internal override PhpTypeCode Emit(CodeGenerator /*!*/ codeGenerator)
        {
            ILEmitter   il      = codeGenerator.IL;
            LinqBuilder builder = new LinqBuilder(codeGenerator);

            builder.DefineContextType();
            builder.EmitNewLinqContext();

            codeGenerator.LinqBuilder = builder;

            LinqOpChain chain    = body.BuildChain();
            var         typecode = chain.Emit(codeGenerator);

            // the result is IEnumerable<object>, let's wrap it and pass out
            il.Emit(OpCodes.Call, Methods.ClrObject_WrapRealObject);

            builder.BakeContextType();

            return(PhpTypeCode.Object);
        }