summaryrefslogtreecommitdiffstats
path: root/src/doctokenizer.l
diff options
context:
space:
mode:
authoralbert-github <albert.tests@gmail.com>2019-11-06 13:36:37 (GMT)
committeralbert-github <albert.tests@gmail.com>2019-11-06 13:36:37 (GMT)
commit9664e0b46ba516069d5fd740aac4ef4eb5f874cf (patch)
treeedba83155692849a0f16c4e7f6a6fd44cda3bc1d /src/doctokenizer.l
parent0a1a216ceed4be17ab3bf2a80be3be1bae21efeb (diff)
downloadDoxygen-9664e0b46ba516069d5fd740aac4ef4eb5f874cf.zip
Doxygen-9664e0b46ba516069d5fd740aac4ef4eb5f874cf.tar.gz
Doxygen-9664e0b46ba516069d5fd740aac4ef4eb5f874cf.tar.bz2
Better warning in case of `@form`
When having a problem like: ``` /** \file */ /** * The fie * * @form: the new format * @content: the content of the form * * Sets @form content to be @content. * * \f$ \alpha \f$ \f[ \beta \f] */ void fie(char *form, char *content); ``` we get warnings like: ``` .../aa.h:5: warning: Wrong formula id -1 .../aa.h:6: warning: Found unknown command '\content' .../aa.h:8: warning: Wrong formula id -1 .../aa.h:8: warning: Found unknown command '\content' ``` The `@form:` is in RST analogue to the doxygen `@param form` but not understood by doxygen. The result is that it is seen as an formula as doxygen translates the formula commands to `\form`. For `@content` is handled properly as this is not a doxygen command. In this patch a more unique name is chosen so these type of conflicts don't appear (that easy). The resulting, better, warnings are now: ``` .../aa.h:5: warning: Found unknown command '\form' .../aa.h:6: warning: Found unknown command '\content' .../aa.h:8: warning: Found unknown command '\form' .../aa.h:8: warning: Found unknown command '\content' ```
Diffstat (limited to 'src/doctokenizer.l')
-rw-r--r--src/doctokenizer.l6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/doctokenizer.l b/src/doctokenizer.l
index 22b14a0..caa8b35 100644
--- a/src/doctokenizer.l
+++ b/src/doctokenizer.l
@@ -363,7 +363,7 @@ LINKMASK [^ \t\n\r\\@<&${}]+("("[^\n)]*")")?({BLANK}*("const"|"volatile"){BLANK
VERBATIM "verbatim"{BLANK}*
SPCMD1 {CMD}([a-z_A-Z][a-z_A-Z0-9]*|{VERBATIM}|"--"|"---")
SPCMD2 {CMD}[\\@<>&$#%~".+=|-]
-SPCMD3 {CMD}form#[0-9]+
+SPCMD3 {CMD}_fakeform#[0-9]+
SPCMD4 {CMD}"::"
SPCMD5 {CMD}":"
INOUT "inout"|"in"|"out"|("in"{BLANK}*","{BLANK}*"out")|("out"{BLANK}*","{BLANK}*"in")
@@ -578,9 +578,9 @@ REFWORD_NOCV {FILEMASK}|{LABELID}|{REFWORD2_NOCV}|{REFWORD3}|{REFWORD4_NOCV}
yylineno++;
}
<St_Para>{SPCMD3} {
- g_token->name = "form";
+ g_token->name = "_fakeform";
bool ok;
- g_token->id = QCString(yytext).right((int)yyleng-6).toInt(&ok);
+ g_token->id = QCString(yytext).right((int)yyleng-11).toInt(&ok);
ASSERT(ok);
return TK_COMMAND_SEL();
}