internal static BuiltinClassInfo GetIteratorTypeFromType(BuiltinClassInfo klass, AnalysisUnit unit) { switch (klass.PythonType.TypeId) { case BuiltinTypeId.List: return(unit.ProjectState.ClassInfos[BuiltinTypeId.ListIterator]); case BuiltinTypeId.Tuple: return(unit.ProjectState.ClassInfos[BuiltinTypeId.TupleIterator]); case BuiltinTypeId.Set: return(unit.ProjectState.ClassInfos[BuiltinTypeId.SetIterator]); case BuiltinTypeId.Str: return(unit.ProjectState.ClassInfos[BuiltinTypeId.StrIterator]); case BuiltinTypeId.Unicode: return(unit.ProjectState.ClassInfos[BuiltinTypeId.UnicodeIterator]); case BuiltinTypeId.Bytes: return(unit.ProjectState.ClassInfos[BuiltinTypeId.BytesIterator]); case BuiltinTypeId.Generator: case BuiltinTypeId.DictKeys: case BuiltinTypeId.DictValues: case BuiltinTypeId.DictItems: case BuiltinTypeId.ListIterator: case BuiltinTypeId.TupleIterator: case BuiltinTypeId.SetIterator: case BuiltinTypeId.StrIterator: case BuiltinTypeId.UnicodeIterator: case BuiltinTypeId.BytesIterator: case BuiltinTypeId.CallableIterator: return(klass); default: return(null); } }
public ListInfo(VariableDef[] indexTypes, BuiltinClassInfo seqType, Node node, IPythonProjectEntry entry) : base(indexTypes, seqType, node, entry) { }
public BaseIteratorValue(BuiltinClassInfo klass) : base(klass) { }
public IteratorValue(IterableValue iterable, BuiltinClassInfo iterType) : base(iterType) { _iterable = iterable; }
public FixedIteratorValue(IAnalysisSet iterable, BuiltinClassInfo klass) : base(klass) { _iterable = iterable; }
public virtual bool IsOfType(BuiltinClassInfo klass) { return(false); }
public StarArgsSequenceInfo(VariableDef[] variableDef, BuiltinClassInfo builtinClassInfo, Node node, ProjectEntry entry) : base(variableDef, builtinClassInfo, node, entry) { }
public IterableValue(VariableDef[] indexTypes, BuiltinClassInfo seqType, Node node) : base(seqType) { IndexTypes = indexTypes; _node = node; }
public SingleIteratorValue(VariableDef indexTypes, BuiltinClassInfo iterType, IPythonProjectEntry declModule) : base(iterType) { _indexTypes = indexTypes; _declModule = declModule; }
public BuiltinInstanceInfo(BuiltinClassInfo classInfo) : base(classInfo.Type, classInfo.ProjectState) { ClassInfo = classInfo; }
public IteratorInfo(VariableDef[] indexTypes, BuiltinClassInfo iterType, Node node) : base(indexTypes, iterType, node) { }
public BaseIterableValue(BuiltinClassInfo classInfo) : base(classInfo) { }
public SequenceInfo(ISet <Namespace>[] indexTypes, BuiltinClassInfo seqType) : base(seqType) { _indexTypes = indexTypes; }
internal SetInfo(BuiltinClassInfo seqType, Node node, ProjectEntry entry, VariableDef[] indexTypes) : base(indexTypes, seqType, node, entry) { }
public TupleBuiltinInstanceInfo(BuiltinClassInfo classObj) : base(classObj, false, false) { }
public BuiltinInstanceInfo(BuiltinClassInfo klass) : base(klass?._type, klass?.ProjectState) { _klass = klass; }
public NumericInstanceInfo(BuiltinClassInfo classInfo) : base(classInfo) { }
public BaseIterableValue(BuiltinClassInfo seqType) : base(seqType) { }
public NumericInstanceInfo(BuiltinClassInfo klass) : base(klass) { }
public SequenceInfo(VariableDef[] indexTypes, BuiltinClassInfo seqType, Node node, ProjectEntry entry) : base(indexTypes, seqType, node) { _declaringModule = entry; _declaringVersion = entry.AnalysisVersion; }
public ListInfo(ISet <Namespace>[] indexTypes, BuiltinClassInfo seqType) : base(indexTypes, seqType) { EnsureAppend(); }