Ejemplo n.º 1
0
        public Enum(TypeContainer parent, FullNamedExpression type, Modifiers mod_flags, MemberName name, Attributes attrs)
            : base(parent, name, attrs, MemberKind.Enum)
        {
            underlying_type_expr = type;
            var accmods = IsTopLevel ? Modifiers.INTERNAL : Modifiers.PRIVATE;

            ModFlags = ModifiersExtensions.Check(AllowedModifiers, mod_flags, accmods, Location, Report);
            spec     = new EnumSpec(null, this, null, null, ModFlags);
        }
Ejemplo n.º 2
0
        public Delegate(TypeContainer parent, FullNamedExpression type, Modifiers mod_flags, MemberName name, ParametersCompiled param_list,
                        Attributes attrs)
            : base(parent, name, attrs, MemberKind.Delegate)

        {
            this.ReturnType = type;
            ModFlags        = ModifiersExtensions.Check(AllowedModifiers, mod_flags,
                                                        IsTopLevel ? Modifiers.INTERNAL :
                                                        Modifiers.PRIVATE, name.Location, Report);
            parameters = param_list;
            spec       = new TypeSpec(Kind, null, this, null, ModFlags | Modifiers.SEALED);
        }