コード例 #1
0
		public virtual object VisitUsingDeclaration(UsingDeclaration usingDeclaration, object data) {
			throw new global::System.NotImplementedException("UsingDeclaration");
		}
コード例 #2
0
		public virtual object VisitUsingDeclaration(UsingDeclaration usingDeclaration, object data) {
			Debug.Assert((usingDeclaration != null));
			Debug.Assert((usingDeclaration.Usings != null));
			foreach (Using o in usingDeclaration.Usings) {
				Debug.Assert(o != null);
				o.AcceptVisitor(this, data);
			}
			return null;
		}
コード例 #3
0
		public virtual object VisitUsingDeclaration(UsingDeclaration usingDeclaration, object data) {
			Debug.Assert((usingDeclaration != null));
			Debug.Assert((usingDeclaration.Usings != null));
			for (int i = 0; i < usingDeclaration.Usings.Count; i++) {
				Using o = usingDeclaration.Usings[i];
				Debug.Assert(o != null);
				nodeStack.Push(o);
				o.AcceptVisitor(this, data);
				o = (Using)nodeStack.Pop();
				if (o == null)
					usingDeclaration.Usings.RemoveAt(i--);
				else
					usingDeclaration.Usings[i] = o;
			}
			return null;
		}
コード例 #4
0
ファイル: Parser.cs プロジェクト: ThomasZitzler/ILSpy
	void ImportsStmt() {
		List<Using> usings = new List<Using>();

		Expect(137);
		Location startPos = t.Location;
			Using u;

		ImportClause(out u);
		if (u != null) { usings.Add(u); }
		while (la.kind == 22) {
			Get();
			ImportClause(out u);
			if (u != null) { usings.Add(u); }
		}
		EndOfStmt();
		UsingDeclaration usingDeclaration = new UsingDeclaration(usings);
			usingDeclaration.StartLocation = startPos;
			usingDeclaration.EndLocation   = t.Location;
			AddChild(usingDeclaration);

	}
コード例 #5
0
		public sealed override object VisitUsingDeclaration(UsingDeclaration usingDeclaration, object data) {
			this.BeginVisit(usingDeclaration);
			object result = this.TrackedVisitUsingDeclaration(usingDeclaration, data);
			this.EndVisit(usingDeclaration);
			return result;
		}
コード例 #6
0
		public virtual object TrackedVisitUsingDeclaration(UsingDeclaration usingDeclaration, object data) {
			return base.VisitUsingDeclaration(usingDeclaration, data);
		}
コード例 #7
0
		public override object VisitUsingDeclaration(UsingDeclaration usingDeclaration, object data)
		{
			foreach (Using u in usingDeclaration.Usings) {
				namespaceDeclarations.Peek().Imports.Add(new CodeNamespaceImport(u.Name));
			}
			return null;
		}