Пример #1
0
            public override INamespaceSet Call(Node node, AnalysisUnit unit, INamespaceSet[] args, NameExpression[] keywordArgNames)
            {
                _myDict._keysAndValues.AddDependency(unit);

                if (_list == null) {
                    _list = new IteratorInfo(new[] { _myDict.KeyValueTupleVariable }, unit.ProjectState._dictItemsType, node);
                }
                return _list;
            }
Пример #2
0
            public override INamespaceSet Call(Node node, AnalysisUnit unit, INamespaceSet[] args, NameExpression[] keywordArgNames)
            {
                _myDict._keysAndValues.AddDependency(unit);

                if (_list == null) {
                    var valuesVar = new VariableDef();
                    _myDict._keysAndValues.CopyValuesTo(valuesVar);
                    _list = new IteratorInfo(new[] { valuesVar }, unit.ProjectState._dictValuesType, node);
                }
                return _list;
            }
Пример #3
0
 public IterBoundBuiltinMethodInfo(IterableInfo iterable, BuiltinMethodInfo method)
     : base(method)
 {
     _indexTypes = iterable.IndexTypes;
     _iterClass = IteratorInfo.GetIteratorTypeFromType(iterable.ClassInfo, iterable.ClassInfo.ProjectState._evalUnit);
 }