Example #1
0
 IResMemberRef IResContainerBuilderRef.CreateMemberRef(SourceRange range, IResMemberDecl memberDecl)
 {
     return(memberDecl.MakeRef(
                range,
                new ResMemberBind(
                    range,
                    new ResVarRef(range, _container.ThisParameter, _container.ThisPipeline),
                    new ResMemberSpec(range, _container.ThisPipeline, memberDecl))));
 }
 public ResGlobalMemberTerm(
     SourceRange range,
     ILazy<IResModuleDecl> module,
     IResMemberDecl decl)
 {
     _range = range;
     _module = module;
     _decl = decl;
     _subst = new Substitution();
 }
Example #3
0
 private MidMemberDecl EmitMemberDecl(
     object parent,
     IResMemberDecl resMemberDecl,
     MidEmitEnv env)
 {
     return(EmitMemberDeclImpl(
                (dynamic)parent,
                (dynamic)resMemberDecl,
                env));
 }
Example #4
0
 public ResGlobalMemberTerm(
     SourceRange range,
     ILazy <IResModuleDecl> module,
     IResMemberDecl decl)
 {
     _range  = range;
     _module = module;
     _decl   = decl;
     _subst  = new Substitution();
 }
Example #5
0
        private IMidMemberRef LookupMemberImpl(
            IMidMemberRef container,
            MidVal obj,
            IResMemberDecl resDecl,
            MidEmitEnv env)
        {
            var midDecl = container.LookupMemberDecl(resDecl);

            return(midDecl.CreateRef(new MidMemberBind(obj, midDecl)));
        }
        public override MidMemberDecl LookupMemberDecl(
            IResMemberDecl resMemberDecl)
        {
            Force();

            MidMemberDecl result;
            if (_members.TryGetValue(resMemberDecl, out result))
                return result;

            return null;
        }
Example #7
0
        IResMemberRef IResContainerBuilderRef.CreateMemberRef(SourceRange range, IResMemberDecl memberDecl)
        {
            var resGesGenericDecl = _genericDeclBuilder.Value;
            var resGenericRef     = (IResGenericRef)_outerContainerBuilder.CreateMemberRef(range, resGesGenericDecl);

            return(memberDecl.MakeRef(
                       range,
                       new ResMemberGenericApp(
                           resGenericRef,
                           (from p in resGenericRef.Parameters
                            select p.MakeArg(range)).ToArray())));
        }
        public ResMemberSpec(
            SourceRange range,
            IResContainerRef container,
            IResMemberDecl decl)
        {
            if (decl == null)
                throw new ArgumentNullException("decl");

            _range = range;
            _container = container;
            _decl = decl;
        }
Example #9
0
        IResMemberRef IResContainerBuilderRef.CreateMemberRef(SourceRange range, IResMemberDecl memberDecl)
        {
            throw new NotImplementedException();

            /*
             * return memberDecl.MakeRef(
             *  range,
             *  new ResMemberBind(
             *      range,
             *      new ResVarRef(range, ThisParameter, this),
             *      new ResMemberSpec(range, this, memberDecl)));
             */
        }
Example #10
0
        public override MidMemberDecl LookupMemberDecl(
            IResMemberDecl resMemberDecl)
        {
            Force();

            MidMemberDecl result;

            if (_members.TryGetValue(resMemberDecl, out result))
            {
                return(result);
            }

            return(null);
        }
Example #11
0
        public ResMemberSpec(
            SourceRange range,
            IResContainerRef container,
            IResMemberDecl decl)
        {
            if (decl == null)
            {
                throw new ArgumentNullException("decl");
            }

            _range     = range;
            _container = container;
            _decl      = decl;
        }
Example #12
0
        private IMidMemberRef LookupMemberImpl(
            MidConceptClassRef container,
            MidConceptVal obj,
            IResMemberDecl resMemberDecl,
            MidEmitEnv env)
        {
            var resMembersDecls = container.Decl.Members.ToArray();
            var midMemberRefs   = obj.MemberRefs.ToArray();

            int memberDeclCount = resMembersDecls.Length;

            for (int ii = 0; ii < memberDeclCount; ++ii)
            {
                if (resMembersDecls[ii] == resMemberDecl)
                {
                    return(midMemberRefs[ii]);
                }
            }

            throw new NotImplementedException();
        }
 public MidMemberDecl LookupMemberDecl(IResMemberDecl resMemberDecl)
 {
     return _decl.LookupMemberDecl(resMemberDecl);
 }
Example #14
0
 public virtual void InsertMemberDecl(
     IResMemberDecl resMemberDecl,
     MidMemberDecl midMemberDecl)
 {
     _members[resMemberDecl] = midMemberDecl;
 }
 public virtual void InsertMemberDecl(
     IResMemberDecl resMemberDecl,
     MidMemberDecl midMemberDecl)
 {
     _members[resMemberDecl] = midMemberDecl;
 }
 public virtual MidMemberDecl LookupMemberDecl(
     IResMemberDecl resMemberDecl)
 {
     throw new NotImplementedException();
 }
Example #17
0
 public static bool IsImplicit(
     this IResMemberDecl decl)
 {
     return(decl.Line.Tags.Any(
                (tag) => tag is ResImplicitTag));
 }
Example #18
0
 public MidMemberDecl LookupMemberDecl(IResMemberDecl resMemberDecl)
 {
     return(_decl.LookupMemberDecl(resMemberDecl));
 }
Example #19
0
 public MidMemberDecl LookupMemberDecl(IResMemberDecl resMemberDecl)
 {
     throw new NotImplementedException();
 }
Example #20
0
 public static bool IsConcrete(
     this IResMemberDecl decl)
 {
     return(decl.Line.Tags.Any(
                (tag) => tag is ResConcreteTag));
 }