예제 #1
0
 private IAnalysisSet SequenceIter(Node node, AnalysisUnit unit, IAnalysisSet[] args, NameExpression[] keywordArgNames) {
     if (_iterator == null) {
         var types = new [] { new VariableDef() };
         types[0].AddTypes(unit, _indexTypes, false);
         _iterator = new IteratorInfo(types, IteratorInfo.GetIteratorTypeFromType(ClassInfo, unit), node);
     }
     return _iterator ?? AnalysisSet.Empty;
 }
예제 #2
0
 private IAnalysisSet SequenceIter(Node node, AnalysisUnit unit, IAnalysisSet[] args, NameExpression[] keywordArgNames)
 {
     if (_iterator == null)
     {
         var types = new [] { new VariableDef() };
         types[0].AddTypes(unit, _indexTypes, false);
         _iterator = new IteratorInfo(types, IteratorInfo.GetIteratorTypeFromType(ClassInfo, unit), node);
     }
     return(_iterator ?? AnalysisSet.Empty);
 }
예제 #3
0
        private IAnalysisSet DictionaryIterValues(Node node, Analysis.AnalysisUnit unit, IAnalysisSet[] args, NameExpression[] keywordArgNames)
        {
            _keysAndValues.AddDependency(unit);

            if (_valuesIter == null)
            {
                _valuesIter = new IteratorInfo(
                    new[] { ValuesVariable },
                    unit.ProjectState.ClassInfos[BuiltinTypeId.DictValues],
                    node
                    );
            }
            return(_valuesIter);
        }
 private IAnalysisSet IterableIter(Node node, AnalysisUnit unit, IAnalysisSet[] args, NameExpression[] keywordArgNames)
 {
     if (args.Length == 0)
     {
         return(unit.Scope.GetOrMakeNodeValue(
                    node,
                    n => new IteratorInfo(
                        _indexTypes,
                        IteratorInfo.GetIteratorTypeFromType(ClassInfo, unit),
                        n
                        )
                    ));
     }
     return(AnalysisSet.Empty);
 }
예제 #5
0
        private IAnalysisSet DictionaryIterValues(Node node, Analysis.AnalysisUnit unit, IAnalysisSet[] args, NameExpression[] keywordArgNames) {
            _keysAndValues.AddDependency(unit);

            if (_valuesIter == null) {
                _valuesIter = new IteratorInfo(
                    new[] { ValuesVariable },
                    unit.ProjectState.ClassInfos[BuiltinTypeId.DictValues],
                    node
                );
            }
            return _valuesIter;
        }