Update of /cvsroot/csdoc/csdoc/src/csdoc
In directory sc8-pr-cvs1:/tmp/cvs-serv19835
Modified Files:
ChangeLog class.cs cs-tokenizer.cs driver.cs
Log Message:
2003-02-21
* class.cs, cs-0tokenizer.cs : Added my name as author.
* driver.cs : Playing with the stuff.
Index: ChangeLog
===================================================================
RCS file: /cvsroot/csdoc/csdoc/src/csdoc/ChangeLog,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- ChangeLog 21 Feb 2003 07:08:53 -0000 1.7
+++ ChangeLog 21 Feb 2003 11:29:55 -0000 1.8
@@ -1,6 +1,11 @@
2003-02-21 Gaurav Vaish <mastergaurav AT users DOT sf DOT net>
+ * class.cs, cs-0tokenizer.cs : Added my name as author.
+ * driver.cs : Playing with the stuff.
+
+2003-02-21 Gaurav Vaish <mastergaurav AT users DOT sf DOT net>
+
* cs-tokenizer.cs : Reset comment if there is a blank
line between the comment and actual code.
* driver.cs : Get all types from RootContext.
Index: class.cs
===================================================================
RCS file: /cvsroot/csdoc/csdoc/src/csdoc/class.cs,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- class.cs 19 Feb 2003 05:50:11 -0000 1.1
+++ class.cs 21 Feb 2003 11:29:55 -0000 1.2
@@ -1,12 +1,13 @@
//
// class.cs: Class and Struct handlers
//
-// Authors: Miguel de Icaza (mi...@gn...)
-// Martin Baulig (ma...@gn...)
//
-// Licensed under the terms of the GNU GPL
+// Author: Gaurav Vaish <mas...@us...>
//
-// (C) 2001, 2002 Ximian, Inc (http://www.ximian.com)
+// Licensed under the terms of the GNU GPL.
+//
+// (C) 2003 Gaurav Vaish
+// Original Authors: Miguel, Ravi, Martin
//
//
// 2002-10-11 Miguel de Icaza <mi...@xi...>
Index: cs-tokenizer.cs
===================================================================
RCS file: /cvsroot/csdoc/csdoc/src/csdoc/cs-tokenizer.cs,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- cs-tokenizer.cs 21 Feb 2003 07:08:53 -0000 1.5
+++ cs-tokenizer.cs 21 Feb 2003 11:29:55 -0000 1.6
@@ -2,11 +2,12 @@
// cs-tokenizer.cs: The Tokenizer for the C# compiler
// This also implements the preprocessor
//
-// Author: Miguel de Icaza (mi...@gn...)
+// Author: Gaurav Vaish <mas...@us...>
//
-// Licensed under the terms of the GNU GPL
+// Licensed under the terms of the GNU GPL.
//
-// (C) 2001, 2002 Ximian, Inc (http://www.ximian.com)
+// (C) 2003 Gaurav Vaish
+// Original Authors: Miguel, Ravi, Martin
//
/*
Index: driver.cs
===================================================================
RCS file: /cvsroot/csdoc/csdoc/src/csdoc/driver.cs,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- driver.cs 21 Feb 2003 07:08:53 -0000 1.5
+++ driver.cs 21 Feb 2003 11:29:56 -0000 1.6
@@ -1,14 +1,11 @@
//
-// driver.cs: The compiler command line driver.
-//
// Author: Gaurav Vaish <mas...@us...>
//
-// Licensed under the terms of the GNU GPL
+// Licensed under the terms of the GNU GPL.
//
// (C) 2003 Gaurav Vaish
+// Original Authors: Miguel, Ravi, Martin
//
-// Original author: Miguel de Icaza (mi...@gn...)
-// Original (C): 2001, Ximian Inc
namespace Mono.CSharp
{
@@ -513,18 +510,51 @@
foreach(object current in tree)
{
string dispName = "";
+ string baseNames = "";
if(current is Class)
- dispName = ((Class)current).Name;
+ {
+ baseNames = DisplayClass((Class)current);
+ dispName = ((Class)current).Name + baseNames;
+ }
else if(current is Struct)
dispName = ((Struct)current).Name;
Console.WriteLine("<type>: " + current.GetType().ToString() + "->" + dispName);
}
- foreach(Interface interf in tc.Interfaces)
- {
- Console.WriteLine("<type>: " + interf.GetType().ToString() + "->" + interf.Name);
- }
+ Console.WriteLine("\n-----Finished with structs and classes-----\n");
+ if(tc.Interfaces != null)
+ foreach(Interface interf in tc.Interfaces)
+ {
+ Console.WriteLine("<type>: " + interf.GetType().ToString() + "->" + interf.Name);
+ }
+ Console.WriteLine("\n-----Finished with inteface -----\n");
+ if(tc.Enums != null)
+ foreach(Mono.CSharp.Enum e in tc.Enums)
+ {
+ Console.WriteLine("<type>: " + e.GetType().ToString() + "->" + e.Name);
+ }
return (Report.Errors == 0);
+ }
+
+ static string DisplayClass(Class klass)
+ {
+ string retVal = ": ";
+ ArrayList b = klass.Bases;
+ if(b == null || b.Count == 0)
+ {
+ Console.WriteLine("------- No Bases -------");
+ return String.Empty;
+ }
+ foreach(object tc in b)
+ {
+ //if(tc is Class)
+ // retVal += (((Class)tc).Name + ", ");
+ //else if(tc is Interface)
+ // retVal += (((Interface)tc).Name + ", ");
+ //else
+ retVal += (tc.ToString() + ", ");
+ }
+ return retVal.Substring(0, retVal.Length - 2);
}
}
}
|