| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
|
|
|
| |
Closes #1643
|
|\
| |
| |
| |
| | |
* Issue-1643:
Fix pydoc null pointer dereference with missing arg type
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| | |
Doxygen writes this using typewriter font, so wrap in `` for python
|
| |
| |
| |
| | |
In doxygen, \em is used for italics, so it should be wrapped in "*".
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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).
|
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 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 usage and comments for the codeIndent string, the intent of
which was not clear after recent updates.
|
|
|
|
|
| |
Simplify python doxygen translation code by using functions to erase
leading and trailing newlines. No change to logic.
|
|
|
|
|
|
|
|
| |
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 leading and trailing newlines around the \f[ and \f{
block math commands for doxygen comment translation for python.
Update tests accordingly.
|
|
|
|
|
|
| |
Eliminate extra leading and trailing newlines present in translated
doxygen \verbatim comments for python. Updating doxygen python tests
accordingly.
|
|
|
|
|
| |
Remove the extra newline at the end of translation of doxygen \code
\endcode command for Python. Update test output accordingly.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
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.*
|