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); }
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); }
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); } }
public void Imported(AnalysisUnit unit) { ModuleDefinition.AddDependency(unit); }
public override ISet <Namespace> GetMember(Node node, AnalysisUnit unit, string name) { ModuleDefinition.AddDependency(unit); return(Scope.CreateVariable(node, unit, name).Types); }