Ejemplo n.º 1
0
		public void AddUsing (UsingClause un)
		{
			if (DeclarationFound){
				Compiler.Report.Error (1529, un.Location, "A using clause must precede all other namespace elements except extern alias declarations");
			}

			if (clauses == null)
				clauses = new List<UsingClause> ();

			clauses.Add (un);
		}
Ejemplo n.º 2
0
		public virtual void Visit (UsingClause usingClause)
		{
		}
Ejemplo n.º 3
0
		void Warning_DuplicateEntry (UsingClause entry)
		{
			Compiler.Report.Warning (105, 3, entry.Location,
				"The using directive for `{0}' appeared previously in this namespace",
				entry.ResolvedExpression.GetSignatureForError ());
		}
Ejemplo n.º 4
0
			public override void Visit(UsingClause un)
			{
				var ud = new UsingDeclaration();
				var loc = LocationsBag.GetLocations(un);
				ud.AddChild(new CSharpTokenNode(Convert(un.Location), UsingDeclaration.UsingKeywordRole), UsingDeclaration.UsingKeywordRole);
				if (un.NamespaceExpression != null)
					ud.AddChild(ConvertToType(un.NamespaceExpression), UsingDeclaration.ImportRole);
				if (loc != null)
					ud.AddChild(new CSharpTokenNode(Convert(loc [0]), Roles.Semicolon), Roles.Semicolon);
				AddToNamespace(ud);
			}