Exemple #1
0
        private IBoundExpression ResolveReferencedProjectNamespace()
        {
            /*  Namespace tier 5:
             *  Referenced Project namespace: An accessible procedural module contained in a referenced
             *  project.
             */
            var accessibleModule = _declarationFinder.FindModuleReferencedProject(_project, _module, _name, DeclarationType.ProceduralModule);

            if (accessibleModule != null)
            {
                return(new SimpleNameExpression(accessibleModule, ExpressionClassification.ProceduralModule, _context));
            }
            var defaultInstanceVariableClass = _declarationFinder.FindDefaultInstanceVariableClassReferencedProject(_project, _module, _name);

            if (defaultInstanceVariableClass != null)
            {
                return(new SimpleNameExpression(defaultInstanceVariableClass, ExpressionClassification.Type, _context));
            }
            return(null);
        }
Exemple #2
0
 private IBoundExpression ResolveDefaultInstanceVariableClass(bool lExpressionIsEnclosingProject, Declaration referencedProject)
 {
     if (lExpressionIsEnclosingProject)
     {
         var defaultInstanceVariableClass = _declarationFinder.FindDefaultInstanceVariableClassEnclosingProject(_project, _module, _name);
         if (defaultInstanceVariableClass != null)
         {
             return(new MemberAccessExpression(defaultInstanceVariableClass, ExpressionClassification.Type, _context, _unrestrictedNameContext, _lExpression));
         }
     }
     else
     {
         var defaultInstanceVariableClass = _declarationFinder.FindDefaultInstanceVariableClassReferencedProject(_project, _module, referencedProject, _name);
         if (defaultInstanceVariableClass != null)
         {
             return(new MemberAccessExpression(defaultInstanceVariableClass, ExpressionClassification.Type, _context, _unrestrictedNameContext, _lExpression));
         }
     }
     return(null);
 }