public static ImportCollection FromArray(params Boo.Lang.Compiler.Ast.Import[] items)
        {
            ImportCollection collection = new ImportCollection();

            collection.Extend(items);
            return(collection);
        }
示例#2
0
        public static ImportCollection FromArray(params Boo.Lang.Compiler.Ast.Import[] items)
        {
            var collection = new ImportCollection();

            collection.AddRange(items);
            return(collection);
        }
 private void ResolveAssemblyReferences(ImportCollection imports)
 {
     Import[] importArray = imports.ToArray();
     for (int i=0; i<importArray.Length; ++i)
     {
         Import current = importArray[i];
         ReferenceExpression reference = current.AssemblyReference;
         if (null == reference)
             continue;
         try
         {
             reference.Entity = ResolveAssemblyReference(reference);
         }
         catch (Exception x)
         {
             Errors.Add(CompilerErrorFactory.UnableToLoadAssembly(reference, reference.Name, x));
             imports.RemoveAt(i);
         }
     }
 }
 public Boo.Lang.Compiler.Ast.ImportCollection PopRange(int begin)
 {
     Boo.Lang.Compiler.Ast.ImportCollection range = new Boo.Lang.Compiler.Ast.ImportCollection(_parent);
     range.InnerList.Extend(InternalPopRange(begin));
     return(range);
 }