示例#1
0
 void ResolveUsingAssemblyReferences()
 {
     foreach (Boo.Lang.Ast.Module module in CompileUnit.Modules)
     {
         UsingCollection usingCollection = module.Using;
         Using[]         usingArray      = usingCollection.ToArray();
         for (int i = 0; i < usingArray.Length; ++i)
         {
             Using u = usingArray[i];
             ReferenceExpression reference = u.AssemblyReference;
             if (null != reference)
             {
                 try
                 {
                     Assembly asm = Assembly.LoadWithPartialName(reference.Name);
                     CompilerParameters.References.Add(asm);
                     BindingManager.Bind(reference, new Bindings.AssemblyBinding(asm));
                 }
                 catch (Exception x)
                 {
                     Errors.UnableToLoadAssembly(reference, reference.Name, x);
                     usingCollection.RemoveAt(i);
                 }
             }
         }
     }
 }
		public Scope ()
		{
			m_scopes = new ScopeCollection (this);
			m_usings = new UsingCollection (this);
			m_constants = new ConstantCollection (this);
			m_variables = new VariableCollection (this);
		}
示例#3
0
 public Scope()
 {
     m_scopes    = new ScopeCollection(this);
     m_usings    = new UsingCollection(this);
     m_constants = new ConstantCollection(this);
     m_variables = new VariableCollection(this);
 }
示例#4
0
 protected ModuleImpl(LexicalInfo lexicalInfo) : base(lexicalInfo)
 {
     _using  = new UsingCollection(this);
     Globals = new Block();
 }
示例#5
0
 protected ModuleImpl(LexicalInfo lexicalInfo, NamespaceDeclaration namespace_) : base(lexicalInfo)
 {
     _using    = new UsingCollection(this);
     Globals   = new Block();
     Namespace = namespace_;
 }
示例#6
0
 protected ModuleImpl(NamespaceDeclaration namespace_)
 {
     _using    = new UsingCollection(this);
     Globals   = new Block();
     Namespace = namespace_;
 }
示例#7
0
 protected ModuleImpl()
 {
     _using  = new UsingCollection(this);
     Globals = new Block();
 }