@@ -354,6 +354,7 @@ struct commentscanYY_state
354
354
{
355
355
OutlineParserInterface *langParser = 0 ; // the language parser that is calling us
356
356
QCString inputString; // input string
357
+ QCString currentCmd; // the command used
357
358
int inputPosition = 0 ; // read pointer
358
359
QCString fileName; // file name that is read from
359
360
int lineNr = 0 ; // line number in the input
@@ -1035,7 +1036,7 @@ RCSTAG "$"{ID}":"[^\n$]+"$"
1035
1036
<ClassDocArg1 ,CategoryDocArg1 >{DOCNL } {
1036
1037
warn (yyextra->fileName ,yyextra->lineNr ,
1037
1038
" missing argument after "
1038
- " \\ %s." ,YY_START==ClassDocArg1? " class " : " category "
1039
+ " ' \\ %s' ." ,yyextra-> currentCmd . data ()
1039
1040
);
1040
1041
// addOutput(yyscanner,'\n');
1041
1042
// if (*yytext=='\n') yyextra->lineNr++;
@@ -1289,7 +1290,7 @@ RCSTAG "$"{ID}":"[^\n$]+"$"
1289
1290
}
1290
1291
<RelatesParam1 >{DOCNL } { // missing argument
1291
1292
warn (yyextra->fileName ,yyextra->lineNr ,
1292
- " Missing argument of \\ relates or \\ memberof command"
1293
+ " Missing argument of ' \\ %s' command" ,yyextra-> currentCmd . data ()
1293
1294
);
1294
1295
unput (' \n ' );
1295
1296
// if (*yytext=='\n') yyextra->lineNr++;
@@ -1808,7 +1809,7 @@ RCSTAG "$"{ID}":"[^\n$]+"$"
1808
1809
}
1809
1810
<ExtendsParam >{DOCNL } { // missing argument
1810
1811
warn (yyextra->fileName ,yyextra->lineNr ,
1811
- " \\ extends or \\ implements command has no argument"
1812
+ " ' \\ %s' command has no argument" ,yyextra-> currentCmd . data ()
1812
1813
);
1813
1814
// if (*yytext=='\n') yyextra->lineNr++;
1814
1815
// addOutput(yyscanner,'\n');
@@ -1970,10 +1971,11 @@ static bool handlePackage(yyscan_t yyscanner,const QCString &, const QCStringLis
1970
1971
return stop;
1971
1972
}
1972
1973
1973
- static bool handleClass (yyscan_t yyscanner,const QCString &, const QCStringList &)
1974
+ static bool handleClass (yyscan_t yyscanner,const QCString &cmd , const QCStringList &)
1974
1975
{
1975
1976
struct yyguts_t *yyg = (struct yyguts_t *)yyscanner;
1976
1977
bool stop=makeStructuralIndicator (yyscanner,Entry::CLASSDOC_SEC);
1978
+ yyextra->currentCmd = cmd;
1977
1979
BEGIN ( ClassDocArg1 );
1978
1980
return stop;
1979
1981
}
@@ -1985,50 +1987,56 @@ static bool handleHeaderFile(yyscan_t yyscanner,const QCString &, const QCString
1985
1987
return FALSE ;
1986
1988
}
1987
1989
1988
- static bool handleProtocol (yyscan_t yyscanner,const QCString &, const QCStringList &)
1990
+ static bool handleProtocol (yyscan_t yyscanner,const QCString &cmd , const QCStringList &)
1989
1991
{ // Obj-C protocol
1990
1992
struct yyguts_t *yyg = (struct yyguts_t *)yyscanner;
1991
1993
bool stop=makeStructuralIndicator (yyscanner,Entry::PROTOCOLDOC_SEC);
1994
+ yyextra->currentCmd = cmd;
1992
1995
BEGIN ( ClassDocArg1 );
1993
1996
return stop;
1994
1997
}
1995
1998
1996
- static bool handleCategory (yyscan_t yyscanner,const QCString &, const QCStringList &)
1999
+ static bool handleCategory (yyscan_t yyscanner,const QCString &cmd , const QCStringList &)
1997
2000
{ // Obj-C category
1998
2001
struct yyguts_t *yyg = (struct yyguts_t *)yyscanner;
1999
2002
bool stop=makeStructuralIndicator (yyscanner,Entry::CATEGORYDOC_SEC);
2003
+ yyextra->currentCmd = cmd;
2000
2004
BEGIN ( CategoryDocArg1 );
2001
2005
return stop;
2002
2006
}
2003
2007
2004
- static bool handleUnion (yyscan_t yyscanner,const QCString &, const QCStringList &)
2008
+ static bool handleUnion (yyscan_t yyscanner,const QCString &cmd , const QCStringList &)
2005
2009
{
2006
2010
struct yyguts_t *yyg = (struct yyguts_t *)yyscanner;
2007
2011
bool stop=makeStructuralIndicator (yyscanner,Entry::UNIONDOC_SEC);
2012
+ yyextra->currentCmd = cmd;
2008
2013
BEGIN ( ClassDocArg1 );
2009
2014
return stop;
2010
2015
}
2011
2016
2012
- static bool handleStruct (yyscan_t yyscanner,const QCString &, const QCStringList &)
2017
+ static bool handleStruct (yyscan_t yyscanner,const QCString &cmd , const QCStringList &)
2013
2018
{
2014
2019
struct yyguts_t *yyg = (struct yyguts_t *)yyscanner;
2015
2020
bool stop=makeStructuralIndicator (yyscanner,Entry::STRUCTDOC_SEC);
2021
+ yyextra->currentCmd = cmd;
2016
2022
BEGIN ( ClassDocArg1 );
2017
2023
return stop;
2018
2024
}
2019
2025
2020
- static bool handleInterface (yyscan_t yyscanner,const QCString &, const QCStringList &)
2026
+ static bool handleInterface (yyscan_t yyscanner,const QCString &cmd , const QCStringList &)
2021
2027
{
2022
2028
struct yyguts_t *yyg = (struct yyguts_t *)yyscanner;
2023
2029
bool stop=makeStructuralIndicator (yyscanner,Entry::INTERFACEDOC_SEC);
2030
+ yyextra->currentCmd = cmd;
2024
2031
BEGIN ( ClassDocArg1 );
2025
2032
return stop;
2026
2033
}
2027
2034
2028
- static bool handleIdlException (yyscan_t yyscanner,const QCString &, const QCStringList &)
2035
+ static bool handleIdlException (yyscan_t yyscanner,const QCString &cmd , const QCStringList &)
2029
2036
{
2030
2037
struct yyguts_t *yyg = (struct yyguts_t *)yyscanner;
2031
2038
bool stop=makeStructuralIndicator (yyscanner,Entry::EXCEPTIONDOC_SEC);
2039
+ yyextra->currentCmd = cmd;
2032
2040
BEGIN ( ClassDocArg1 );
2033
2041
return stop;
2034
2042
}
@@ -2228,7 +2236,7 @@ static bool handleEndParBlock(yyscan_t yyscanner,const QCString &, const QCStrin
2228
2236
return FALSE ;
2229
2237
}
2230
2238
2231
- static bool handleRelated (yyscan_t yyscanner,const QCString &, const QCStringList &)
2239
+ static bool handleRelated (yyscan_t yyscanner,const QCString &cmd , const QCStringList &)
2232
2240
{
2233
2241
struct yyguts_t *yyg = (struct yyguts_t *)yyscanner;
2234
2242
if (!yyextra->current ->relates .isEmpty ())
@@ -2241,7 +2249,7 @@ static bool handleRelated(yyscan_t yyscanner,const QCString &, const QCStringLis
2241
2249
return FALSE ;
2242
2250
}
2243
2251
2244
- static bool handleRelatedAlso (yyscan_t yyscanner,const QCString &, const QCStringList &)
2252
+ static bool handleRelatedAlso (yyscan_t yyscanner,const QCString &cmd , const QCStringList &)
2245
2253
{
2246
2254
struct yyguts_t *yyg = (struct yyguts_t *)yyscanner;
2247
2255
if (!yyextra->current ->relates .isEmpty ())
@@ -2250,11 +2258,12 @@ static bool handleRelatedAlso(yyscan_t yyscanner,const QCString &, const QCStrin
2250
2258
" found multiple \\ relates, \\ relatesalso or \\ memberof commands in a comment block, using last definition" );
2251
2259
}
2252
2260
yyextra->current ->relatesType = Duplicate;
2261
+ yyextra->currentCmd = cmd;
2253
2262
BEGIN (RelatesParam1);
2254
2263
return FALSE ;
2255
2264
}
2256
2265
2257
- static bool handleMemberOf (yyscan_t yyscanner,const QCString &, const QCStringList &)
2266
+ static bool handleMemberOf (yyscan_t yyscanner,const QCString &cmd , const QCStringList &)
2258
2267
{
2259
2268
struct yyguts_t *yyg = (struct yyguts_t *)yyscanner;
2260
2269
if (!yyextra->current ->relates .isEmpty ())
@@ -2263,6 +2272,7 @@ static bool handleMemberOf(yyscan_t yyscanner,const QCString &, const QCStringLi
2263
2272
" found multiple \\ relates, \\ relatesalso or \\ memberof commands in a comment block, using last definition" );
2264
2273
}
2265
2274
yyextra->current ->relatesType = MemberOf;
2275
+ yyextra->currentCmd = cmd;
2266
2276
BEGIN (RelatesParam1);
2267
2277
return FALSE ;
2268
2278
}
@@ -2663,9 +2673,10 @@ static bool handleInherit(yyscan_t yyscanner,const QCString &, const QCStringLis
2663
2673
return FALSE ;
2664
2674
}
2665
2675
2666
- static bool handleExtends (yyscan_t yyscanner,const QCString &, const QCStringList &)
2676
+ static bool handleExtends (yyscan_t yyscanner,const QCString &cmd , const QCStringList &)
2667
2677
{
2668
2678
struct yyguts_t *yyg = (struct yyguts_t *)yyscanner;
2679
+ yyextra->currentCmd = cmd;
2669
2680
BEGIN (ExtendsParam);
2670
2681
return FALSE ;
2671
2682
}
0 commit comments