Re: Parser for VB.NET - namespaces
"Dimitri van Heesch" <[email protected]>
| Newsgroups | gmane.text.doxygen.devel |
|---|---|
| Message-ID | <[email protected]> |
On 4/12/06, James Bursa <[email protected]> wrote: > > I have started implementing support for VB.NET for Doxygen. The patch and > scanner for this are attached. Would there be interest in including this > in Doxygen? I think so. The generated documentation from this doesn't correctly show namespaces. > For example, with this source > > 1 Namespace N > 2 Public Class C > 3 Public Sub S() > 4 End Sub > 5 End Class > 6 End Namespace > > the namespace N is documented as empty and class C has no namespace (with > EXTRACT_ALL = YES). The tree of Entry that is being constructed in > vbscanner.l contains C as a CLASS_SEC, as a child of N as a NAMESPACE_SEC. > What am I doing wrong? The class is not a child Entry of the namespace as far as I can see. What I typically do: - Copy the contents of the namespace to current->program - in a second pass (so restarting the lexical scanner) parse the body of the namespace or class (one should do this recursively to support nested classes in nested namespaces...) Look at parseCompounds() versus parseMain() in src/pyscanner.l for an example. Regards, Dimitri