summaryrefslogtreecommitdiff
path: root/Source/Doxygen/pydoc.cxx
Commit message (Collapse)AuthorAgeFilesLines
* Use https for swig.org linksOlly Betts2022-10-061-1/+1
|
* Fix typos in docs and commentsOlly Betts2022-02-271-1/+1
|
* Fix segfault parsing varargs with -doxygenWilliam S Fulton2020-01-161-6/+6
| | | | Closes #1643
* Merge branch 'Issue-1643'William S Fulton2020-01-161-5/+4
|\ | | | | | | | | * Issue-1643: Fix pydoc null pointer dereference with missing arg type
| * Fix pydoc null pointer dereference with missing arg typeJohn McFarland2019-10-271-5/+4
| | | | | | | | | | | | | | | | | | | | Processing doxygen @param comments for a parameter whose name did not appear in the function declaration would cause a segfault due to a null pointer dereference. Adding test cases for both variadic function (no specified arguments) and @param comment that references an argument that is not named in the function prototype. Both of these cases previously segfaulted.
* | Fix doxygen translation of \p command for pythonJohn McFarland2019-09-151-1/+1
| | | | | | | | Doxygen writes this using typewriter font, so wrap in `` for python
* | Fix doxygen handling of \em tag for pythonJohn McFarland2019-09-151-1/+1
| | | | | | | | In doxygen, \em is used for italics, so it should be wrapped in "*".
* | Special handling for python doctest code blocksJohn McFarland2019-08-071-12/+23
| | | | | | | | | | | | | | | | | | A doctest code block begins with ">>>" and is not indented. Identify these in doxygen comments and treat them accordingly. Also add check to padCodeAndVerbatimBlocks for these because Sphinx requires an empty line before. Add test case to doxygen_code_blocks.i.
* | Handle doxygen code command with language optionJohn McFarland2019-08-071-8/+29
| | | | | | | | | | | | | | | | | | Previously, code blocks were always written to the pydoc output with "code-block:: c++", and use of language options (e.g., \code{.py}) was not supported. Now the option provided to the doxygen code command is checked, and several basic cases are handled (python, java, and c), defaulting otherwise to C++ as before (handling for additional cases can easily be added).
* | Flag optional arguments in doxygen pydoc outputJohn McFarland2019-08-071-0/+24
| | | | | | | | | | | | | | If the parameter has a default value, add the string ", optional" to the parameter type description in the translated python comments. Three examples with default values were already present in the test cases, so their expected python output has been updated accordingly.
* | Add parameter direction to doxygen pydoc outputJohn McFarland2019-08-071-1/+28
| | | | | | | | | | | | | | | | For doxygen comments that specify parameter direction (i.e., \param[in], \param[out], and \param[in,out]), the direction is appended to the type definition in the generated Python documentation. Updated expected python output for doxygen test case.
* | Support doxygen \param[] commandsJohn McFarland2019-08-071-1/+1
|/ | | | | | | | | | | | | | Recognize \param[in], \param[out], and \param[in,out]. Currently they are all treated the same as \param, but the information is now available for inclusion in the translated comments. This is done using new utility functions getBaseCommand and getEndOfWordCommand, which will also generalize to treatment of code command options, e.g. \code{.py}. Preliminary treatment of the extended version of \code is already in place in these functions. Added examples of all three new \param commands to the doxygen_translate_all_tags test and updated the python and java expected output.
* Ensure empty line before code and math blocks in doxygen pydocJohn McFarland2019-06-181-2/+39
| | | | | | | | | | | | | | | | | | | | Sphinx requires an empty line before code and math blocks, whereas doxygen does not. This update ensures that a blank line is included before generated code and math blocks in the pydoc output. This is done by post-processing the docstring line by line to check whether any newlines need to be added. This way, if the original doxygen source already includes an empty line before a block, an additional unnecessary empty line is not added. Updating the expected test output for doxygen_basic_translate, which now adds the necessary empty line before the code block. Adding further test cases to doxygen_translate_all_tags to explicitly verify that a newline is added in the pydoc output before both code and math blocks that appear within a paragraph. Additionally, empty lines previously appearing at the beginning of the generated docstrings are now removed. This does not alter the behavior of the tests.
* Remove extra newline before code block in doxygen python outputJohn McFarland2019-05-271-1/+0
| | | | | | | Remove a newline character that was added to the translated comments prior to the code block. This way the structure of the pydoc output more closely resembles that of the original doxygen comments. Updating tests accordingly.
* Clarify python doxygen code block indentation handlingJohn McFarland2019-05-261-4/+6
| | | | | Clarify usage and comments for the codeIndent string, the intent of which was not clear after recent updates.
* Cleanup of pydoc translator newline trimmingJohn McFarland2019-05-261-12/+18
| | | | | Simplify python doxygen translation code by using functions to erase leading and trailing newlines. No change to logic.
* Fix bug in doxygen python code block indentJohn McFarland2019-05-251-1/+1
| | | | | | | | If a certain doxygen comment style was used that included an additional space, then translated Python comment code block indent was not correct (it included the extra space). This doxygen comment style was not previously represented in the test cases; a new test case will be added in a subsequent commit.
* Eliminate extra newlines around doxygen python block mathJohn McFarland2019-05-251-3/+0
| | | | | | Eliminate extra leading and trailing newlines around the \f[ and \f{ block math commands for doxygen comment translation for python. Update tests accordingly.
* Eliminate extra newlines in doxygen python \verbatim blocksJohn McFarland2019-05-251-1/+14
| | | | | | Eliminate extra leading and trailing newlines present in translated doxygen \verbatim comments for python. Updating doxygen python tests accordingly.
* Remove extra newline from end of doxygen python \code commandJohn McFarland2019-05-251-3/+7
| | | | | Remove the extra newline at the end of translation of doxygen \code \endcode command for Python. Update test output accordingly.
* Remove extra newline in beginning of doxygen python \code commandJohn McFarland2019-05-251-0/+5
| | | | | | If \code is used as a block command (probably the main use case), an extra newline was included in the translated Python comments. This is now removed and doxygen python test case output updated.
* Fix python doxygen indentation for inline \code commandJohn McFarland2019-05-251-1/+1
| | | | | | | | If \code was used inline, it produced an extra indent versus block usage. This extra indent was also stored in the test output. This update resolves this by simply removing a space that was being added unnecessarily in handleTagVerbatim. Updating test case output accordingly.
* Don't crash if type is not available in Python Doxygen codeVadim Zeitlin2019-04-201-1/+6
| | | | | | | | | Fix crash if "@return" Doxygen tag was used on a node without any return type (such as a class, for example). Ignoring it might not be the best thing to do, but it's definitely better than crashing and it's not really clear what else could be done anyhow. Closes #1516.
* Visual C++ 64-bit warning fixes in doxygen sourcesWilliam S Fulton2018-12-061-3/+3
|
* Doxygen source renameWilliam S Fulton2018-05-261-0/+843
Source/DoxygenTranslator/src directory is renamed Source/Doxygen Renamed files in this directory to short names using lowercase as is the convention for the rest of the SWIG source. C++ extension is also .cxx like other SWIG source code. I used doxy as the prefix for most file renames because without this Doxygen/parser.* would be easily confused with CParse/parser.* so Doxygen/doxyparser.* is renamed from DoxygenTranslator/src/DoxygenParser.*