//        ModifierEnum VisitModifier(ICSharpCode.SharpRefactory.Parser.Modifier m)
 //        {
 //            return (ModifierEnum)m;
 //        }
 public override object Visit(AST.NamespaceDeclaration namespaceDeclaration, object data)
 {
     string name;
     if (currentNamespace.Count == 0) {
         name = namespaceDeclaration.NameSpace;
     } else {
         name = String.Concat((string)currentNamespace.Peek(), '.', namespaceDeclaration.NameSpace);
     }
     currentNamespace.Push(name);
     object ret = namespaceDeclaration.AcceptChildren(this, data);
     currentNamespace.Pop();
     return ret;
 }
 public override object Visit(AST.TypeDeclaration typeDeclaration, object data)
 {
     DefaultRegion region = GetRegion(typeDeclaration.StartLocation, typeDeclaration.EndLocation);
     Class c = new Class(cu, TranslateClassType(typeDeclaration.Type), typeDeclaration.Modifier, region);
     if (currentClass.Count > 0) {
         Class cur = ((Class)currentClass.Peek());
         cur.InnerClasses.Add(c);
         c.FullyQualifiedName = String.Concat(cur.FullyQualifiedName, '.', typeDeclaration.Name);
     } else {
         if (currentNamespace.Count == 0) {
             c.FullyQualifiedName = typeDeclaration.Name;
         } else {
             c.FullyQualifiedName = String.Concat(currentNamespace.Peek(), '.', typeDeclaration.Name);
         }
         cu.Classes.Add(c);
     }
     if (typeDeclaration.BaseType != null) {
         c.BaseTypes.Add(typeDeclaration.BaseType);
     }
     if (typeDeclaration.BaseInterfaces != null) {
         foreach (AST.TypeReference type in typeDeclaration.BaseInterfaces) {
             c.BaseTypes.Add(type.Type);
         }
     }
     currentClass.Push(c);
     object ret = typeDeclaration.AcceptChildren(this, data);
     currentClass.Pop();
     c.UpdateModifier();
     return ret;
 }
 public override object Visit(AST.CompilationUnit compilationUnit, object data)
 {
     //TODO: Imports, Comments
     compilationUnit.AcceptChildren(this, data);
     return cu;
 }