summaryrefslogtreecommitdiff
path: root/Source/Doxygen
Commit message (Collapse)AuthorAgeFilesLines
* Use https for swig.org linksOlly Betts2022-10-0611-11/+11
|
* Fix python/c++ coding confusion!William S Fulton2022-10-061-1/+1
| | | | Visual c++ does not support 'and' yet.
* Doxygen Java fix quoting for \image commandWilliam S Fulton2022-10-061-1/+5
| | | | Closes #2048
* Improve #include guard macrosOlly Betts2022-07-195-10/+10
| | | | | | | Avoid using reserved identifiers such as `_DOHINT_H` (fixes #1989), fix cases where the name doesn't match the filename, and make the naming more consistent and less likely to collide with include guards in other headers.
* Recognise and ignore Doxygen group commands @{ and @}Olly Betts2022-04-072-1/+3
| | | | Fixes #1750
* Fix typos in docs and commentsOlly Betts2022-02-272-2/+2
|
* Mark error messages more consistentOlly Betts2022-02-251-2/+2
| | | | Always include English name of a mentioned character.
* [doxygen] Fix crash on unclosed HTML tagOlly Betts2022-01-261-1/+4
| | | | Fixes #1935
* Fix typosDimitris Apostolou2021-11-172-3/+3
|
* Don't use invalid iterators in Doxygen command parsing codeVadim Zeitlin2021-02-221-0/+12
| | | | | | Check that the string is non-empty before dereferencing its begin() iterator and avoid calling addDoxyCommand() with an empty string in the first place.
* Fix for missing space after \endlink in doxygenJohn McFarland2020-05-021-0/+4
| | | | | | | | | | | | | | | | The "endlink" command is processed in processWordCommands, which by default skips space occuring after the command, which is intended for removing leading space from a command argument. For "end" commands, we don't want to do this. Note that certain end commands such as "endcode" aren't processed by processWordCommands (believe addCommandUnique ends up handling them). Update usage of \link in doxygen_translate_all_tags.i to test handling of space after \endlink. Tweaking some of the usage in doxygen_misc_constructs.i to remove what seems to be an extra space from the input (otherwise we would need to add an extra space to the expected output).
* 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-072-10/+31
| | | | | | | | | | | | | | | | | | 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).
* | Improve doxygen parser handling of \code contentJohn McFarland2019-08-072-3/+17
| | | | | | | | | | | | Set the m_isVerbatimText flag in the parser for code commands. This allows some additional special characters to appear within the code block (in particular, the ">" character).
* | Flag optional arguments in doxygen pydoc outputJohn McFarland2019-08-072-0/+29
| | | | | | | | | | | | | | 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-074-5/+34
|/ | | | | | | | | | | | | | 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.
* Add iterator safety check in DoxygenParser::parseJohn McFarland2019-07-061-1/+7
| | | | | | | | | | If the code called by DoxygenParser::parse does not behave correctly, it may move the iterator m_tokenListIt past the value endParsingIndex. This was not caught by the previous checks and could lead to dereferencing an invalid m_tokenListIt iterator value (and segfault). This is now protected against by using a less than check in the while loop instead of not equals. A warning is also printed if endParsingIndex is exceeded.
* Doxygen comment parsing fix for empty lines in code/verbatim blocksJohn McFarland2019-07-061-0/+12
| | | | | | | | | | | | | Fix how end of paragraph is identified when parsing \code and \verbatim blocks that appear within a paragraph and contain an empty line. Previously this would generate a warning for unexpected end of doxygen comments, and it could generate a segfault due to dereferencing an invalid iterator value. The doxygen_basic_translate.i and doxygen_basic_translate_style2.i tests have been updated to serve as regression tests for this behavior. Prior to this fix, inclusion of the empty code block line in this context produced a segfault.
* Merge branch 'doxy/space'William S Fulton2019-06-282-15/+83
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * doxy/space: Ensure empty line before code and math blocks in doxygen pydoc Remove extra newline before code block in doxygen python output Clarify python doxygen code block indentation handling Cleanup of pydoc translator newline trimming Correction to recently added doxygen python test case Adjust expected python output for doxygen style2 test Adding test for second doxygen comment style Fix bug in doxygen python code block indent Eliminate extra newlines around doxygen python block math Eliminate extra newlines in doxygen python \verbatim blocks Remove extra newline from end of doxygen python \code command Remove extra newline in beginning of doxygen python \code command Fix python doxygen indentation for inline \code command
| * 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-252-1/+19
| | | | | | | | | | | | 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.
* | Misc. documentation and source comment typo fixesluz.paz2019-05-281-1/+1
|/ | | | | | Found via `codespell -q 3 -L uint,od,objext,ba,cmo,bae,ans,struc,fo,clos,goin,upto,thru` Revert changes in previous commit
* 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-062-8/+8
|
* Correct JavaDoc from doxygen comments indentationWilliam S Fulton2018-06-173-6/+24
| | | | | | | | Adds missing JavaDoc indentation for doxygen comments obtained from: - enum values - class methods - constructors - global functions/variables
* Fix Java doxygen:notranslate for single line commentsWilliam S Fulton2018-06-161-1/+4
| | | | Remove extra generated line
* Doxygen warnings cleanupWilliam S Fulton2018-06-051-27/+26
| | | | | | - Remove unused warnings. - Refactor some warnings. - Document all Doxygen warnings.
* Doxygen source renameWilliam S Fulton2018-05-2611-0/+4271
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.*