Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unexpected token TK_COMMAND_BS as the argument of \ifile #10937

Open
aotto1968 opened this issue Jun 13, 2024 · 4 comments
Open

unexpected token TK_COMMAND_BS as the argument of \ifile #10937

aotto1968 opened this issue Jun 13, 2024 · 4 comments
Labels
bug fixed but not released Bug is fixed in github, but still needs to make its way to an official release has pull request

Comments

@aotto1968
Copy link

aotto1968 commented Jun 13, 2024

Describe the bug

test.doc:6: warning: unexpected token TK_COMMAND_BS as the argument of \ifile

Screenshots
image

To Reproduce
call: doxygen Doxyfile.tag and than doxygen Doxyfile.bug-1

Expected behavior
this depends… the core-problem is a @copydetails from a tagfile group target

Version
Doxygen version used: 1.10.0 (ebc57c6)
Linux linux02 5.14.21-150500.55.65-default #1 SMP PREEMPT_DYNAMIC Thu May 23 04:57:11 UTC 2024 (a46829d) x86_64 x86_64 x86_64 GNU/Linux

Additional context
Attachment → doxygen_bug__unexpected_token_TK_COMMAND_BS.tar.gz

@albert-github
Copy link
Collaborator

Indeed the core problem is the \copy... from the tag file.
The tag files are intended to be used so one can "jump" to external (doxygen) generated documentation, so typically for commands like \ref. The tag files are not created for copying texts from external documentation to the current documentation (as this is unknown in the tag file). This can be nicely illustrated with:

test.h

/**
\defgroup MqContextC_FilterApi_C_API MqContextC_FilterApi_C_API
\{
\brief MqContextC - modify the data using the \e filter-technology ...
\}

**/


/// \brief the brief fie
void fie();

test.doc

/**

\page filter HOWTO Filter - The Basics

\section filter-intro                             INTRODUCTION
\copydoc MqContextC_FilterApi_C_API

\copydoc fie()

- \ref MqContextC_FilterApi_C_API
- \ref fie()

**/

which gives:
image

I used here \copydoc as we only have brief documentation and \copydoc handles brief and detailed documentation.
I used a slightly modified executable so the warning and the " in the output.

The fact that we don't get a warning for the fie() and the \copybrief of the group is that they have a "name" <fie> and <MqContextC_FilterApi_C_API> whilst the ``copydetails` for the group remains empty (is is as if some detailed documentation is present but there isn't).

So in fact we have multiple problems:

  • the warning
  • the fact that the \copy... is silently ignored, though I think a warnings should be given.

albert-github added a commit to albert-github/doxygen that referenced this issue Jun 13, 2024
… `\ifile`

From a tag file it is possible that detailed section is set but that no file name is included.
The file `file` of `DocInfo` etc. is always present when the `DocInfo` is present, it is better to test whether the field is empty or not.
@albert-github
Copy link
Collaborator

Regarding the warning problem I've just pushed a proposed patch, pull request #10939

albert-github added a commit to albert-github/doxygen that referenced this issue Jun 13, 2024
… `\ifile`

In case a reference for `\copy...` is coming from a tag file there is no information present and this was not reported.
@albert-github
Copy link
Collaborator

Regarding the fact that \copy... should not be used when reference is from a tag file: I've just pushed a proposed patch, pull request #10940

doxygen added a commit that referenced this issue Jun 17, 2024
issue #10937 unexpected token TK_COMMAND_BS as the argument of `\ifile`
doxygen added a commit that referenced this issue Jun 17, 2024
issue #10937 unexpected token TK_COMMAND_BS as the argument of `\ifile`
@albert-github albert-github added the fixed but not released Bug is fixed in github, but still needs to make its way to an official release label Jun 19, 2024
@albert-github
Copy link
Collaborator

Code of both pull requests has been integrated in master on GitHub (please don't close the issue as this will be done at the moment of an official release).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug fixed but not released Bug is fixed in github, but still needs to make its way to an official release has pull request
Projects
None yet
Development

No branches or pull requests

2 participants