//FIXME
 public override object Visit(DelegateDeclaration delegateDeclaration, object data)
 {
     //			CodeTypeDelegate codeTypeDelegate = new CodeTypeDelegate(delegateDeclaration.Name);
     //			codeTypeDelegate.Parameters
     //
     //			((CodeNamespace)namespaceDeclarations.Peek()).Types.Add(codeTypeDelegate);
     return null;
 }
 public object Visit(DelegateDeclaration delegateDeclaration, object data)
 {
     DebugOutput(delegateDeclaration);
     AppendAttributes(delegateDeclaration.Attributes);
     AppendIndentation();
     sourceText.Append(GetModifier(delegateDeclaration.Modifier));
     sourceText.Append("delegate ");
     sourceText.Append(GetTypeString(delegateDeclaration.ReturnType));
     sourceText.Append(" ");
     sourceText.Append(delegateDeclaration.Name);
     sourceText.Append("(");
     AppendParameters(delegateDeclaration.Parameters);
     sourceText.Append(");");
     AppendNewLine();
     return null;
 }
	void NonModuleDeclaration(
#line  554 "VBNET.ATG" 
Modifiers m, ArrayList attributes) {

#line  556 "VBNET.ATG" 
		string name = String.Empty;
		ArrayList names = null;
		
		switch (la.kind) {
		case 68: {

#line  559 "VBNET.ATG" 
			m.Check(Modifier.Classes); 
			lexer.NextToken();

#line  562 "VBNET.ATG" 
			TypeDeclaration newType = new TypeDeclaration();
			compilationUnit.AddChild(newType);
			compilationUnit.BlockStart(newType);
			newType.Specials["before"] = lexer.SpecialTracker.RetreiveComments();
			newType.Type = Types.Class;
			newType.Modifier = m.Modifier;
			newType.Attributes = attributes;
			
			Identifier();

#line  570 "VBNET.ATG" 
			newType.Name = t.val; newType.StartLocation = t.EndLocation; 
			EndOfStmt();
			if (la.kind == 111) {
				ClassBaseType(
#line  572 "VBNET.ATG" 
out name);

#line  572 "VBNET.ATG" 
				newType.BaseType = name; 
			}
			while (la.kind == 108) {
				TypeImplementsClause(
#line  573 "VBNET.ATG" 
out names);

#line  573 "VBNET.ATG" 
				newType.BaseInterfaces = names; 
			}
			ClassBody(
#line  574 "VBNET.ATG" 
newType);

#line  576 "VBNET.ATG" 
			compilationUnit.BlockEnd();
			
			break;
		}
		case 122: {
			lexer.NextToken();

#line  580 "VBNET.ATG" 
			m.Check(Modifier.Modules);
			TypeDeclaration newType = new TypeDeclaration();
			newType.Specials["before"] = lexer.SpecialTracker.RetreiveComments();
			compilationUnit.AddChild(newType);
			compilationUnit.BlockStart(newType);
			newType.StartLocation = t.Location;
			newType.Type = Types.Module;
			newType.Modifier = m.Modifier;
			newType.Attributes = attributes;
			
			Identifier();

#line  590 "VBNET.ATG" 
			newType.Name = t.val; newType.StartLocation = t.EndLocation;  
			Expect(1);
			ModuleBody(
#line  592 "VBNET.ATG" 
newType);

#line  594 "VBNET.ATG" 
			newType.EndLocation = t.Location;
			compilationUnit.BlockEnd();
			
			break;
		}
		case 168: {
			lexer.NextToken();

#line  599 "VBNET.ATG" 
			m.Check(Modifier.Structures);
			TypeDeclaration newType = new TypeDeclaration();
			compilationUnit.AddChild(newType);
			compilationUnit.BlockStart(newType);
			newType.Specials["before"] = lexer.SpecialTracker.RetreiveComments();
			newType.StartLocation = t.Location;
			newType.Type = Types.Structure;
			newType.Modifier = m.Modifier;
			newType.Attributes = attributes;
			ArrayList baseInterfaces = new ArrayList();
			
			Identifier();

#line  610 "VBNET.ATG" 
			newType.Name = t.val; newType.StartLocation = t.EndLocation; 
			Expect(1);
			while (la.kind == 108) {
				TypeImplementsClause(
#line  611 "VBNET.ATG" 
out baseInterfaces);
			}
			StructureBody(
#line  612 "VBNET.ATG" 
newType);

#line  614 "VBNET.ATG" 
			newType.EndLocation = t.Location;
			compilationUnit.BlockEnd();
			
			break;
		}
		case 91: {
			lexer.NextToken();

#line  620 "VBNET.ATG" 
			m.Check(Modifier.Enums);
			TypeDeclaration newType = new TypeDeclaration();
			newType.Specials["before"] = lexer.SpecialTracker.RetreiveComments();
			compilationUnit.AddChild(newType);
			compilationUnit.BlockStart(newType);
			
			newType.Type = Types.Enum;
			newType.Modifier = m.Modifier;
			newType.Attributes = attributes;
			
			Identifier();

#line  631 "VBNET.ATG" 
			newType.Name = t.val; newType.StartLocation = t.EndLocation; 
			if (la.kind == 49) {
				lexer.NextToken();
				PrimitiveTypeName(
#line  632 "VBNET.ATG" 
out name);

#line  632 "VBNET.ATG" 
				newType.BaseType = name; 
			}
			Expect(1);
			EnumBody(
#line  634 "VBNET.ATG" 
newType);

#line  636 "VBNET.ATG" 
			newType.EndLocation = t.Location;
			compilationUnit.BlockEnd();
			
			break;
		}
		case 113: {
			lexer.NextToken();

#line  642 "VBNET.ATG" 
			m.Check(Modifier.Interfaces);
			TypeDeclaration newType = new TypeDeclaration();
			compilationUnit.AddChild(newType);
			compilationUnit.BlockStart(newType);
			newType.Specials["before"] = lexer.SpecialTracker.RetreiveComments();
			
			newType.Type = Types.Interface;
			newType.Modifier = m.Modifier;
			newType.Attributes = attributes;
			ArrayList baseInterfaces = new ArrayList();
			
			Identifier();

#line  653 "VBNET.ATG" 
			newType.Name = t.val; newType.StartLocation = t.EndLocation; 
			EndOfStmt();
			while (la.kind == 111) {
				InterfaceBase(
#line  654 "VBNET.ATG" 
out baseInterfaces);

#line  654 "VBNET.ATG" 
				newType.BaseInterfaces = baseInterfaces; 
			}
			InterfaceBody(
#line  655 "VBNET.ATG" 
newType);

#line  657 "VBNET.ATG" 
			newType.EndLocation = t.Location;
			compilationUnit.BlockEnd();
			
			break;
		}
		case 81: {
			lexer.NextToken();

#line  663 "VBNET.ATG" 
			m.Check(Modifier.Delegates);
			DelegateDeclaration delegateDeclr = new DelegateDeclaration();
			ArrayList p = null;
			TypeReference type = null;
			delegateDeclr.Specials["before"] = lexer.SpecialTracker.RetreiveComments();
			delegateDeclr.StartLocation = t.Location;
			delegateDeclr.Modifier = m.Modifier;
			delegateDeclr.Attributes = attributes;
			
			if (la.kind == 169) {
				lexer.NextToken();
				Identifier();

#line  673 "VBNET.ATG" 
				delegateDeclr.Name = t.val; 
				if (la.kind == 25) {
					lexer.NextToken();
					if (StartOf(4)) {
						FormalParameterList(
#line  674 "VBNET.ATG" 
out p);
					}
					Expect(26);

#line  674 "VBNET.ATG" 
					delegateDeclr.Parameters = p; 
				}
			} else if (la.kind == 101) {
				lexer.NextToken();
				Identifier();

#line  676 "VBNET.ATG" 
				delegateDeclr.Name = t.val; 
				if (la.kind == 25) {
					lexer.NextToken();
					if (StartOf(4)) {
						FormalParameterList(
#line  677 "VBNET.ATG" 
out p);
					}
					Expect(26);

#line  677 "VBNET.ATG" 
					delegateDeclr.Parameters = p; 
				}
				if (la.kind == 49) {
					lexer.NextToken();
					TypeName(
#line  678 "VBNET.ATG" 
out type);

#line  678 "VBNET.ATG" 
					delegateDeclr.ReturnType = type; 
				}
			} else SynErr(197);

#line  680 "VBNET.ATG" 
			delegateDeclr.EndLocation = t.EndLocation; 
			Expect(1);

#line  683 "VBNET.ATG" 
			compilationUnit.AddChild(delegateDeclr);
			
			break;
		}
		default: SynErr(198); break;
		}
	}
 public virtual object Visit(DelegateDeclaration delegateDeclaration, object data)
 {
     foreach (AttributeSection a in delegateDeclaration.Attributes) {
         a.AcceptVisitor(this, data);
     }
     if (delegateDeclaration.Parameters != null) {
         foreach (ParameterDeclarationExpression p in delegateDeclaration.Parameters) {
             p.AcceptVisitor(this, data);
         }
     }
     if (delegateDeclaration.ReturnType == null) {
         return data;
     }
     return delegateDeclaration.ReturnType.AcceptVisitor(this, data);
 }