Check that the string is non-empty before dereferencing its begin()
iterator and avoid calling addDoxyCommand() with an empty string in the
first place.
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).
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).
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).
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.
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.
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.
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.*
2018-05-26 12:52:52 +01:00
Renamed from Source/DoxygenTranslator/src/DoxygenParser.cpp (Browse further)