[Mono-devel-list] Re: Patch for full-featured mcs /doc support; without patch

Gaurav Vaish gaurav.vaish at gmail.com
Wed Nov 24 09:06:28 EST 2004


Hi Atsushi,

  Great work! Some comments:

  In decl.cs

+ // strip 'T:' 'M:' 'F:' 'P:' 'E:' etc.
+ // Here, MS ignores its member kind. No idea why.
+ if (cref.Length > 2 && cref [1] == ':')
+   signature = cref.Substring (2).Trim (wsChars);
+ else
+   signature = cref;

  I am not sure, but the reason that I see is that the only place
where discrepancy can be when there's a property name that clashes
with a data-type. However, it will also mean that there's an inner
class/enum/struct/blah with the same name as property which is not
allowed.

  So, it is safe to assume that during searching, you can live without "F:" etc.

  I haven't tested the code, check with something like following:

  public void SomeMethod(string /** <summary>Interesting</summary> */
param1) {... }

  or

  public /// <remarks>something</remarks>
        void /// <summary>Very very interesting </summary>
     ThisIsInteresting() { ...}

<snip from="cs-parser.jay">
: opt_attributes
  opt_modifiers
  type namespace_or_type_name
+  {
+   tmpComment = Lexer.consume_doc_comment ();
+   Lexer.doc_state = XmlCommentState.NG;
+ }
</snip>

  I couldn't locate it as a test-case. From what it seems to me
currently, it may pickup the comments... but not quite sure.

  IMO, if it picks up these comments, move the collection of the
comments to "opt_attributes" or ... well, I also faced this issue.
Right now, I don't have the code with me... don't recall how I handled
it. I can get back on this if required.

  The code otherwise looks pretty ok. I also learnt a few things from
your code that I may directly borrow for my doc-engine. :-)


Cheers,
Gaurav


On Wed, 24 Nov 2004 21:45:19 +0900, Atsushi Eno <atsushi at ximian.com> wrote:
> Hello,
> 
> Finally I finished the complete patch set for /doc features,
> tests and errors, including warning checks and result document
> comparison as long as it makes sense ... except for one thing
> I couldn't complete; cref attribute handling which has no
> information how it is checked.
> 
> Am resending it to the list without the patch files, since
> it was larger than 80k. So I put the files here:
> http://primates.ximian.com/~atsushi/mcs-doc-patches/1024/
> 
> Would you please review this new patch? Am very sorry but I
> significantly changed the code (like adding much changes on
> parser/tokenizer to detech invalid comments, removing XmlElement
> field from member, using XmlWriter directly to output, etc).
> 
> Thanks,
> Atsushi Eno
>



More information about the Mono-devel-list mailing list