Пример #1
0
        public override TypeReference Clone()
        {
            InnerClassTypeReference c = new InnerClassTypeReference(baseType.Clone(), Type, new List <TypeReference>());

            CopyFields(this, c);
            return(c);
        }
Пример #2
0
		public virtual object VisitInnerClassTypeReference(InnerClassTypeReference innerClassTypeReference, object data) {
			Debug.Assert((innerClassTypeReference != null));
			Debug.Assert((innerClassTypeReference.GenericTypes != null));
			Debug.Assert((innerClassTypeReference.BaseType != null));
			foreach (TypeReference o in innerClassTypeReference.GenericTypes) {
				Debug.Assert(o != null);
				o.AcceptVisitor(this, data);
			}
			return innerClassTypeReference.BaseType.AcceptVisitor(this, data);
		}
Пример #3
0
	void TypeName(
#line  2322 "Frames/cs.ATG" 
out TypeReference typeRef, bool canBeUnbound) {

#line  2323 "Frames/cs.ATG" 
		List<TypeReference> typeArguments = null;
		string alias = null;
		string qualident;
		Location startLocation = la.Location;
		
		if (
#line  2329 "Frames/cs.ATG" 
IdentAndDoubleColon()) {
			Identifier();

#line  2330 "Frames/cs.ATG" 
			alias = t.val; 
			Expect(10);
		}
		Qualident(
#line  2333 "Frames/cs.ATG" 
out qualident);
		if (la.kind == 23) {
			TypeArgumentList(
#line  2334 "Frames/cs.ATG" 
out typeArguments, canBeUnbound);
		}

#line  2336 "Frames/cs.ATG" 
		if (alias == null) {
		typeRef = new TypeReference(qualident, typeArguments);
		} else if (alias == "global") {
			typeRef = new TypeReference(qualident, typeArguments);
			typeRef.IsGlobal = true;
		} else {
			typeRef = new TypeReference(alias + "." + qualident, typeArguments);
		}
		
		while (
#line  2345 "Frames/cs.ATG" 
DotAndIdent()) {
			Expect(15);

#line  2346 "Frames/cs.ATG" 
			typeArguments = null; 
			Qualident(
#line  2347 "Frames/cs.ATG" 
out qualident);
			if (la.kind == 23) {
				TypeArgumentList(
#line  2348 "Frames/cs.ATG" 
out typeArguments, canBeUnbound);
			}

#line  2349 "Frames/cs.ATG" 
			typeRef = new InnerClassTypeReference(typeRef, qualident, typeArguments); 
		}

#line  2351 "Frames/cs.ATG" 
		typeRef.StartLocation = startLocation; 
	}
		public sealed override object VisitInnerClassTypeReference(InnerClassTypeReference innerClassTypeReference, object data) {
			this.BeginVisit(innerClassTypeReference);
			object result = this.TrackedVisitInnerClassTypeReference(innerClassTypeReference, data);
			this.EndVisit(innerClassTypeReference);
			return result;
		}
		public virtual object TrackedVisitInnerClassTypeReference(InnerClassTypeReference innerClassTypeReference, object data) {
			return base.VisitInnerClassTypeReference(innerClassTypeReference, data);
		}
Пример #6
0
	void NonArrayTypeName(
#line  2420 "VBNET.ATG" 
out TypeReference typeref, bool canBeUnbound) {

#line  2422 "VBNET.ATG" 
		string name;
		typeref = null;
		bool isGlobal = false;
		
		if (StartOf(10)) {
			if (la.kind == 117) {
				lexer.NextToken();
				Expect(16);

#line  2427 "VBNET.ATG" 
				isGlobal = true; 
			}
			QualIdentAndTypeArguments(
#line  2428 "VBNET.ATG" 
out typeref, canBeUnbound);

#line  2429 "VBNET.ATG" 
			typeref.IsGlobal = isGlobal; 
			while (la.kind == 16) {
				lexer.NextToken();

#line  2430 "VBNET.ATG" 
				TypeReference nestedTypeRef; 
				QualIdentAndTypeArguments(
#line  2431 "VBNET.ATG" 
out nestedTypeRef, canBeUnbound);

#line  2432 "VBNET.ATG" 
				typeref = new InnerClassTypeReference(typeref, nestedTypeRef.Type, nestedTypeRef.GenericTypes); 
			}
		} else if (la.kind == 154) {
			lexer.NextToken();

#line  2435 "VBNET.ATG" 
			typeref = new TypeReference("System.Object", true); 
			if (la.kind == 21) {
				lexer.NextToken();

#line  2439 "VBNET.ATG" 
				List<TypeReference> typeArguments = new List<TypeReference>(1);
				if (typeref != null) typeArguments.Add(typeref);
				typeref = new TypeReference("System.Nullable", typeArguments) { IsKeyword = true };
				
			}
		} else if (StartOf(11)) {
			PrimitiveTypeName(
#line  2445 "VBNET.ATG" 
out name);

#line  2445 "VBNET.ATG" 
			typeref = new TypeReference(name, true); 
			if (la.kind == 21) {
				lexer.NextToken();

#line  2449 "VBNET.ATG" 
				List<TypeReference> typeArguments = new List<TypeReference>(1);
				if (typeref != null) typeArguments.Add(typeref);
				typeref = new TypeReference("System.Nullable", typeArguments) { IsKeyword = true };
				
			}
		} else SynErr(236);
	}
Пример #7
0
		public override TypeReference Clone()
		{
			InnerClassTypeReference c = new InnerClassTypeReference(baseType.Clone(), Type, new List<TypeReference>());
			CopyFields(this, c);
			return c;
		}
		public virtual object VisitInnerClassTypeReference(InnerClassTypeReference innerClassTypeReference, object data) {
			Debug.Assert((innerClassTypeReference != null));
			Debug.Assert((innerClassTypeReference.GenericTypes != null));
			Debug.Assert((innerClassTypeReference.BaseType != null));
			for (int i = 0; i < innerClassTypeReference.GenericTypes.Count; i++) {
				TypeReference o = innerClassTypeReference.GenericTypes[i];
				Debug.Assert(o != null);
				nodeStack.Push(o);
				o.AcceptVisitor(this, data);
				o = (TypeReference)nodeStack.Pop();
				if (o == null)
					innerClassTypeReference.GenericTypes.RemoveAt(i--);
				else
					innerClassTypeReference.GenericTypes[i] = o;
			}
			nodeStack.Push(innerClassTypeReference.BaseType);
			innerClassTypeReference.BaseType.AcceptVisitor(this, data);
			innerClassTypeReference.BaseType = ((TypeReference)(nodeStack.Pop()));
			return null;
		}
		public virtual object VisitInnerClassTypeReference(InnerClassTypeReference innerClassTypeReference, object data) {
			throw new global::System.NotImplementedException("InnerClassTypeReference");
		}