private static ISet<Namespace> EvaluateSet(ExpressionEvaluator ee, Node node) { var n = (SetExpression)node; ISet<Namespace> result; if (!ee.GlobalScope.NodeVariables.TryGetValue(node, out result)) { var values = new HashSet<Namespace>(); foreach (var x in n.Items) { values.Union(ee.Evaluate(x)); } result = new DictionaryInfo(values, values, ee.ProjectState, ee.GlobalScope.ShowClr).SelfSet; ee.GlobalScope.NodeVariables[node] = result; } return result; }
internal DictionaryGetMethod(BuiltinMethodDescriptor method, ProjectState projectState, DictionaryInfo myDict) : base(method, projectState) { _myDict = myDict; }
private static ISet<Namespace> EvaluateDictionary(ExpressionEvaluator ee, Node node) { var n = (DictionaryExpression)node; ISet<Namespace> result; if (!ee.GlobalScope.NodeVariables.TryGetValue(node, out result)) { var keys = new HashSet<Namespace>(); var values = new HashSet<Namespace>(); foreach (var x in n.Items) { foreach (var keyVal in ee.Evaluate(x.SliceStart)) { keys.Add(keyVal); } foreach (var itemVal in ee.Evaluate(x.SliceStop)) { values.Add(itemVal); } } result = new DictionaryInfo(keys, values, ee.ProjectState, ee.GlobalScope.ShowClr).SelfSet; ee.GlobalScope.NodeVariables[node] = result; } return result; }
internal DictionaryGetMethod(BuiltinMethodDescriptor method, ProjectState projectState, DictionaryInfo myDict) : base(method, projectState) { _myDict = myDict; }