[csdoc-patches] CVS: csdoc/src/csdoc ChangeLog,1.4,1.5 cs-parser.jay,1.3,1.4 cs-tokenizer.cs,1.3,1.4
Status: Planning
Brought to you by:
mastergaurav
From: Gaurav V. <mas...@us...> - 2003-02-20 14:26:15
|
Update of /cvsroot/csdoc/csdoc/src/csdoc In directory sc8-pr-cvs1:/tmp/cvs-serv26570 Modified Files: ChangeLog cs-parser.jay cs-tokenizer.cs Log Message: 2003-02-20 * cs-parser.jay, * cs-tokenizer.cs : Don't save any comment after you hit start of any type (class, method, inteface, property. Anything). Index: ChangeLog =================================================================== RCS file: /cvsroot/csdoc/csdoc/src/csdoc/ChangeLog,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- ChangeLog 20 Feb 2003 13:54:48 -0000 1.4 +++ ChangeLog 20 Feb 2003 14:26:11 -0000 1.5 @@ -1,6 +1,13 @@ 2003-02-20 Gaurav Vaish <mastergaurav AT users DOT sf DOT net> + * cs-parser.jay, + * cs-tokenizer.cs : Don't save any comment after + you hit start of any type (class, method, + inteface, property. Anything). + +2003-02-20 Gaurav Vaish <mastergaurav AT users DOT sf DOT net> + * cs-parser.jay : Save document for more types. * cs-tokenizer.jay : Keep adding to comments. * driver.cs : Trying to see if I am getting more Index: cs-parser.jay =================================================================== RCS file: /cvsroot/csdoc/csdoc/src/csdoc/cs-parser.jay,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- cs-parser.jay 20 Feb 2003 13:54:48 -0000 1.3 +++ cs-parser.jay 20 Feb 2003 14:26:12 -0000 1.4 @@ -422,8 +422,8 @@ // opt_attributes - : /* empty */ - | attribute_sections { $$ = $1; } + : /* empty */ { lexer.StopCollectngDocs(); } + | { lexer.StopCollectngDocs(); } attribute_sections { $$ = $2; } ; attribute_sections @@ -1268,7 +1268,7 @@ $$ = new InterfaceIndexer ((Expression) $3, (Parameters) $6, do_get, do_set, (bool) $2, (Attributes) $1, lexer.Location); - lexer.SaveDocumentFor((IntefaceIndexer)$$); + lexer.SaveDocumentFor((InterfaceIndexer)$$); } ; @@ -1282,7 +1282,7 @@ // Note again, checking is done in semantic analysis current_container.AddOperator (op); - lexer.SaveDocumentFor(new_interface); + lexer.SaveDocumentFor(op); current_local_parameters = null; } Index: cs-tokenizer.cs =================================================================== RCS file: /cvsroot/csdoc/csdoc/src/csdoc/cs-tokenizer.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- cs-tokenizer.cs 20 Feb 2003 13:54:48 -0000 1.3 +++ cs-tokenizer.cs 20 Feb 2003 14:26:12 -0000 1.4 @@ -59,6 +59,7 @@ private Hashtable documentationStrings = new Hashtable(); private string commentString = ""; + private bool isCollectingDocs = true; public void SaveDocumentFor(object new_class) { @@ -66,6 +67,12 @@ documentationStrings[new_class] = commentString; //System.Console.WriteLine("Document for {0}:\n\n{1}", new_class.ToString(), commentString); commentString = ""; + isCollectingDocs = true; + } + + public void StopCollectngDocs() + { + isCollectingDocs = false; } public Hashtable Documentation @@ -1622,14 +1629,17 @@ if (d == '/'){ getChar (); // Modified by Gaurav Vaish - commentString += "//"; + if(isCollectingDocs) + commentString += "//"; while ((d = getChar ()) != -1 && (d != '\n') && d != '\r') { - commentString += (char)d; + if(isCollectingDocs) + commentString += (char)d; col++; } if (d == '\n'){ - commentString += '\n'; + if(isCollectingDocs) + commentString += '\n'; line++; ref_line++; col = 0; @@ -1640,15 +1650,18 @@ } else if (d == '*'){ getChar (); - commentString += "/*"; + if(isCollectingDocs) + commentString += "/*"; while ((d = getChar ()) != -1){ if (d == '*' && peekChar () == '/'){ - commentString += "*/"; + if(isCollectingDocs) + commentString += "*/"; getChar (); col++; break; } - commentString += (char)d; + if(isCollectingDocs) + commentString += (char)d; if (d == '\n'){ line++; ref_line++; |