public AstPythonIterable(
     IPythonType iterableType,
     IEnumerable <IPythonType> types,
     IPythonIteratorType iteratorType,
     IPythonModule declModule
     )
 {
     _type           = iterableType;
     IteratorType    = iteratorType;
     DeclaringModule = declModule;
 }
示例#2
0
 public AstPythonLookup(
     IPythonType lookupType,
     IPythonModule declaringModule,
     IEnumerable <IPythonType> keys,
     IEnumerable <IPythonType> values,
     IEnumerable <KeyValuePair <IPythonType, IEnumerable <IPythonType> > > mapping,
     IPythonIteratorType iterator
     ) : base(lookupType, declaringModule)
 {
     KeyTypes     = (keys ?? throw new ArgumentNullException(nameof(keys))).ToArray();
     ValueTypes   = (values ?? throw new ArgumentNullException(nameof(values))).ToArray();
     _mapping     = mapping?.ToDictionary(k => k.Key, k => (IReadOnlyList <IPythonType>)k.Value.ToArray());
     IteratorType = iterator;
 }