コード例 #1
0
        BoundTypeRef BindTypeRef(AST.TypeRef tref)
        {
            var bound = new BoundTypeRef(tref);

            if (tref is AST.IndirectTypeRef)
            {
                bound.TypeExpression = BindExpression(((AST.IndirectTypeRef)tref).ClassNameVar);
            }

            return(bound);
        }
コード例 #2
0
ファイル: TypeRefContext.cs プロジェクト: ruo2012/peachpie
        /// <summary>
        /// Gets type mask corresponding to given TypeRef within this context.
        /// </summary>
        public TypeRefMask GetTypeMask(AST.TypeRef /*!*/ tref, bool includesSubclasses = true)
        {
            Contract.ThrowIfNull(tref);

            var dtype = tref as AST.DirectTypeRef;

            if (dtype != null)
            {
                return(GetTypeMask(dtype.ClassName, includesSubclasses));
            }
            else
            {
                var itype = tref as AST.IndirectTypeRef;
                if (itype != null)
                {
                    return(GetTypeMask(itype, includesSubclasses));
                }
            }

            //
            return(TypeRefMask.AnyType);
        }