Esempio n. 1
0
        public override ScopeMember FindMemberRecursive(string member)
        {
            // Find the member here.
            ScopeMember ret = FindMember(member);

            if (ret != null)
            {
                return(ret);
            }

            // Find the member in the sister namespaces.
            ChelaModule myModule = GetModule();
            string      myname   = GetFullName();

            foreach (ChelaModule refMod in ChelaModule.GetLoadedModules())
            {
                if (refMod == myModule)
                {
                    continue;
                }

                ScopeMember sister = refMod.GetMember(myname);
                if (sister != null && sister.IsNamespace())
                {
                    Namespace test = (Namespace)sister;
                    ret = test.FindMember(member);
                    if (ret != null)
                    {
                        return(ret);
                    }
                }
            }

            // Couldn't find the member.
            return(null);
        }
Esempio n. 2
0
 private bool CheckTypeHint(ScopeMember value, bool typeHint)
 {
     return value != null && (!typeHint || value.IsType() || value.IsNamespace() || value.IsTypeName());
 }