Exemple #1
0
        public override IResMemberDecl CreateInheritedDeclImpl(
            ResolveContext resContext,
            IResContainerBuilderRef resContainer,
            ILazy <IResMemberLineDecl> resLine,
            SourceRange range,
            IResMemberRef originalRef)
        {
            var firstRef  = (ResAttributeRef)originalRef;
            var firstDecl = firstRef.Decl;

            var result = ResAttributeDecl.Build(
                resContext.LazyFactory,
                resLine,
                range,
                firstDecl.Name,
                (builder) =>
            {
                builder.Flags    = firstDecl.Flags;
                builder.Type     = firstRef.Type;
                builder.LazyInit =
                    builder.LazyFactory.New(() => firstRef.Init);
            });

            return(result);
        }
Exemple #2
0
        public ResAttributeDeclBuilder(
            ILazyFactory lazyFactory,
            ILazy <IResMemberLineDecl> line,
            SourceRange range,
            Identifier name)
            : base(lazyFactory)
        {
            var resAttributeDecl = new ResAttributeDecl(
                line,
                range,
                name,
                NewLazy(() => _type),
                NewLazy(() => _lazyInit == null ? null : _lazyInit.Value),
                NewLazy(() => _flags));

            SetValue(resAttributeDecl);
        }