示例#1
0
        public ResFieldDeclBuilder(
            ILazyFactory lazyFactory,
            ILazy <IResMemberLineDecl> resLine,
            SourceRange range,
            Identifier name)
            : base(lazyFactory)
        {
            var resFieldDecl = new ResFieldDecl(
                resLine,
                range,
                name,
                NewLazy(() => _type),
                NewLazy(() => _init));

            SetValue(resFieldDecl);
        }
示例#2
0
        public override IResMemberDecl CreateInheritedDeclImpl(
            ResolveContext resContext,
            IResContainerBuilderRef resContainer,
            ILazy <IResMemberLineDecl> resLine,
            SourceRange range,
            IResMemberRef memberRef)
        {
            var firstRef  = (ResFieldRef)memberRef;
            var firstDecl = firstRef.Decl;

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

            return(result);
        }