diff options
author | Dimitri van Heesch <dimitri@stack.nl> | 2014-07-13 18:34:05 (GMT) |
---|---|---|
committer | Dimitri van Heesch <dimitri@stack.nl> | 2014-07-13 18:34:05 (GMT) |
commit | 75bc849623abb2e86e9c16c3d07aa86eca6921f2 (patch) | |
tree | 7bb2b3b86c2c142dd274dc5fea1604e511433e09 /src/tclscanner.l | |
parent | fdf0ac23b2730262996f059274e197a954a29d49 (diff) | |
parent | 5ec66c2286d7cedbdbb0930fe0e293b050c91d24 (diff) | |
download | Doxygen-75bc849623abb2e86e9c16c3d07aa86eca6921f2.zip Doxygen-75bc849623abb2e86e9c16c3d07aa86eca6921f2.tar.gz Doxygen-75bc849623abb2e86e9c16c3d07aa86eca6921f2.tar.bz2 |
Merge pull request #190 from wtschueller/fix705503
Bug 705503 - TCL: Documentation of oo::define is not working
Diffstat (limited to 'src/tclscanner.l')
-rw-r--r-- | src/tclscanner.l | 57 |
1 files changed, 52 insertions, 5 deletions
diff --git a/src/tclscanner.l b/src/tclscanner.l index e93152b..88e3d1d 100644 --- a/src/tclscanner.l +++ b/src/tclscanner.l @@ -2375,15 +2375,62 @@ D } myEntryCl = tcl_entry_class(myName); myStr = (*tcl.list_commandwords.at(4)).utf8(); - if (tcl.list_commandwords.count() > 5) + // + // special cases first + // oo::define classname method methodname args script + // oo::define classname constructor argList bodyScript + // oo::define classname destructor bodyScript + unsigned int n =tcl.list_commandwords.count(); + if ((myStr == "method" && n == 11) || + (myStr == "constructor" && n == 9) || + (myStr == "destructor" && n == 7)) + { + for (unsigned int i = 4; i < n-1; i++) + { + tcl_codify_cmd("NULL",i); + } + Entry *myEntry; + QCString myMethod; + tcl_name(myScan->ns,(*tcl.list_commandwords.at(n==11?6:4)).utf8(),myNs,myMethod); + // code snippet taken from tcl_command_METHOD()/tcl_command_CONSTRUCTOR + tcl.fn.remove(myMethod); + tcl.entry_current->section = Entry::FUNCTION_SEC; + tcl.entry_current->mtype = Method; + tcl.entry_current->name = myMethod; + tcl.entry_current->startLine = tcl.line_command; + tcl.entry_current->bodyLine = tcl.line_body0; + tcl.entry_current->endBodyLine = tcl.line_body1; + tcl_protection(tcl.entry_current); + if (n==11) + { + tcl_command_ARGLIST(*tcl.list_commandwords.at(8)); + } + else if (n==9) + { + tcl_command_ARGLIST(*tcl.list_commandwords.at(6)); + } + if (myEntryCl) myEntryCl->addSubEntry(tcl.entry_current); + tcl.fn.insert(myMethod,tcl.entry_current); + myEntry = tcl.entry_current; + myScan = tcl_scan_start('?',*tcl.list_commandwords.at(n-1), + myNs, myEntryCl, myEntry); + } + else { - for (uint i=5;i<tcl.list_commandwords.count();i++) + // The general case + // Simply concat all arguments into a script. + // Note: all documentation collected just before the + // oo::define command is lost + if (tcl.list_commandwords.count() > 5) { - myStr.append((*tcl.list_commandwords.at(i)).utf8()); + for (uint i=5;i<tcl.list_commandwords.count();i++) + { + myStr.append((*tcl.list_commandwords.at(i)).utf8()); + } + tcl.word_is=' '; } - tcl.word_is=' '; + myScan = tcl_scan_start(tcl.word_is,myStr,myName,myEntryCl,NULL); } - myScan = tcl_scan_start(tcl.word_is,myStr,myName,myEntryCl,NULL); } //! Handle \c variable statements. |