示例#1
0
        public IAnalysisSet GetModuleMember(Node node, AnalysisUnit unit, string name, bool addRef = true, InterpreterScope linkedScope = null, string linkedName = null) {
            var importedValue = Scope.CreateVariable(node, unit, name, addRef);
            ModuleDefinition.AddDependency(unit);

            if (linkedScope != null) {
                linkedScope.AddLinkedVariable(linkedName ?? name, importedValue);
            }
            return importedValue.GetTypesNoCopy(unit, DeclaringModule);
        }
示例#2
0
 public override IAnalysisSet GetMember(Node node, AnalysisUnit unit, string name) {
     if (unit.ForEval) {
         VariableDef value;
         return Scope.TryGetVariable(name, out value) ? value.Types : AnalysisSet.Empty;
     } else {
         ModuleDefinition.AddDependency(unit);
         return Scope.CreateEphemeralVariable(node, unit, name).Types;
     }
 }
        public override IAnalysisSet GetMember(Node node, AnalysisUnit unit, string name)
        {
            // Must unconditionally call the base implementation of GetMember
            var ignored = base.GetMember(node, unit, name);

            ModuleDefinition.AddDependency(unit);

            return(Scope.CreateEphemeralVariable(node, unit, name).Types);
        }
示例#4
0
文件: ModuleInfo.cs 项目: xNUTs/PTVS
        public override IAnalysisSet GetMember(Node node, AnalysisUnit unit, string name)
        {
            // Must unconditionally call the base implementation of GetMember
            var ignored = base.GetMember(node, unit, name);

            if (unit.ForEval)
            {
                VariableDef value;
                return(Scope.TryGetVariable(name, out value) ? value.Types : AnalysisSet.Empty);
            }
            else
            {
                ModuleDefinition.AddDependency(unit);
                return(Scope.CreateEphemeralVariable(node, unit, name).Types);
            }
        }
示例#5
0
 public void Imported(AnalysisUnit unit) {
     ModuleDefinition.AddDependency(unit);
 }
示例#6
0
        public override ISet <Namespace> GetMember(Node node, AnalysisUnit unit, string name)
        {
            ModuleDefinition.AddDependency(unit);

            return(Scope.CreateVariable(node, unit, name).Types);
        }