Ejemplo n.º 1
0
        internal void Emit(CodeGenerator /*!*/ codeGenerator)
        {
            attributes.Emit(codeGenerator, this);

            // persists type hint to the [TypeHint] attribute:
            if (resolvedTypeHint != null)
            {
                ParameterBuilder param_builder = routine.Builder.ParameterBuilders[routine.FirstPhpParameterIndex + index];
                DTypeSpec        spec          = resolvedTypeHint.GetTypeSpec(codeGenerator.SourceUnit);
                param_builder.SetCustomAttribute(spec.ToCustomAttributeBuilder());
            }
        }
Ejemplo n.º 2
0
            internal void Emit(FormalParam /*!*/ node, CodeGenerator /*!*/ codeGenerator)
            {
                var attributes = node.Attributes;

                if (attributes != null)
                {
                    attributes.Emit(codeGenerator, new CustomAttributeProvider(node));
                }

                // persists type hint to the [TypeHint] attribute:
                if (resolvedTypeHint != null)
                {
                    ParameterBuilder param_builder = routine.Builder.ParameterBuilders[routine.FirstPhpParameterIndex + index];
                    DTypeSpec        spec          = resolvedTypeHint.GetTypeSpec(codeGenerator.SourceUnit);
                    param_builder.SetCustomAttribute(spec.ToCustomAttributeBuilder());
                }
            }