Skip to content

Commit 8c92fab

Browse files
committed
issue doxygen#11831 @ref not supported in <summary> tag
Comments from review
1 parent b524aa1 commit 8c92fab

File tree

4 files changed

+6
-24
lines changed

4 files changed

+6
-24
lines changed

src/docnode.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1436,11 +1436,11 @@ void DocHtmlSummary::parse()
14361436
{
14371437
break;
14381438
}
1439-
else if (((tok.value()==TokenRetval::TK_COMMAND_AT) || (tok.value()==TokenRetval::TK_COMMAND_BS)) &&
1439+
else if (tok.is_any_of(TokenRetval::TK_COMMAND_AT, TokenRetval::TK_COMMAND_BS) &&
14401440
(Mappers::cmdMapper->map(parser()->context.token->name)== CommandType::CMD_REF))
14411441
{
14421442
parser()->handleRef(thisVariant(),children(),
1443-
tok.value()==TokenRetval::TK_COMMAND_AT ? '@' : '\\',parser()->context.token->name);
1443+
tok.command_to_char(),parser()->context.token->name);
14441444
}
14451445
else if (!parser()->defaultHandleToken(thisVariant(),tok,children()))
14461446
{
@@ -1976,7 +1976,7 @@ static Token skipSpacesForTable(DocParser *parser)
19761976
break;
19771977
}
19781978
}
1979-
else if (tok.is(TokenRetval::TK_COMMAND_AT) || tok.is(TokenRetval::TK_COMMAND_BS))
1979+
else if (tok.is_any_of(TokenRetval::TK_COMMAND_AT, TokenRetval::TK_COMMAND_BS))
19801980
{
19811981
QCString cmdName=parser->context.token->name;
19821982
AUTO_TRACE_ADD("command={}",cmdName);

src/docparser.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1203,13 +1203,13 @@ void DocParser::handleRef(DocNodeVariant *parent, DocNodeList &children, char cm
12031203
{
12041204
AUTO_TRACE("cmdName={}",cmdName);
12051205
QCString saveCmdName = cmdName;
1206-
int saveState = tokenizer.getState();
1206+
tokenizer.pushState();
12071207
Token tok=tokenizer.lex();
12081208
if (!tok.is(TokenRetval::TK_WHITESPACE))
12091209
{
12101210
warn_doc_error(context.fileName,tokenizer.getLineNr(),"expected whitespace after '{:c}{}' command",
12111211
cmdChar,qPrint(saveCmdName));
1212-
return;
1212+
goto endref;
12131213
}
12141214
tokenizer.setStateRef();
12151215
tok=tokenizer.lex(); // get the reference id
@@ -1224,7 +1224,7 @@ void DocParser::handleRef(DocNodeVariant *parent, DocNodeList &children, char cm
12241224
context.context);
12251225
children.get_last<DocRef>()->parse();
12261226
endref:
1227-
tokenizer.setState(saveState);
1227+
tokenizer.popState();
12281228
}
12291229

12301230

src/doctokenizer.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -194,9 +194,6 @@ class DocTokenizer
194194
void pushState();
195195
void popState();
196196

197-
int getState();
198-
void setState(int newState);
199-
200197
// operations on the scanner
201198
void findSections(const QCString &input,const Definition *d,
202199
const QCString &fileName);

src/doctokenizer.l

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2227,19 +2227,4 @@ void DocTokenizer::popState()
22272227
yyextra->stateStack.pop();
22282228
}
22292229
2230-
int DocTokenizer::getState()
2231-
{
2232-
yyscan_t yyscanner = p->yyscanner;
2233-
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
2234-
return YYSTATE;
2235-
}
2236-
2237-
void DocTokenizer::setState(int newState)
2238-
{
2239-
yyscan_t yyscanner = p->yyscanner;
2240-
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
2241-
BEGIN(newState);
2242-
}
2243-
2244-
22452230
#include "doctokenizer.l.h"

0 commit comments

Comments
 (0)