49#if !ENABLE_DOCPARSER_TRACING
53#define AUTO_TRACE(...) (void)0
54#define AUTO_TRACE_ADD(...) (void)0
55#define AUTO_TRACE_EXIT(...) (void)0
58#define INTERNAL_ASSERT(x) do {} while(0)
77 "uml",
"bpm",
"wire",
"dot",
"ditaa",
78 "salt",
"math",
"latex",
"gantt",
"mindmap",
79 "wbs",
"yaml",
"creole",
"json",
"flow",
80 "board",
"git",
"hcl",
"regex",
"ebnf",
81 "files",
"chen",
"chronology",
"chart",
"nwdiag",
82 "packetdiag",
"project",
"sprites"
92 const char *p = s.
data();
98 if (c==
'{') c=
'<';
else if (c==
'}') c=
'>';
127 std::visit([&](
auto &&x)->
decltype(
auto) {
return x.setParent(newParent); }, *n);
171 size_t len=locSymName.
length();
174 if (locSymName.
at(len-1)!=
':') locSymName.
append(
":");
175 if (locSymName.
at(0)!=
':') locSymName.
prepend(
":");
193 Doxygen::searchIndex.addWord(word,false);
210 Doxygen::searchIndex.addWord(word,false);
226 if (
id.left(anchorPrefix.
length()) == anchorPrefix)
316 parser()->tokenizer.getLineNr(),
317 "block marked with {} for \\snippet should appear twice in file {}, found it {:d} times",
331 "No previous '\\include' or '\\dontinclude' command for '\\{}' present",
342 size_t so = o, bo = 0;
343 bool nonEmpty =
false;
356 else if (!isspace(
static_cast<uint8_t
>(c)))
386 else if (!isspace(
static_cast<uint8_t
>(c)))
419 else if (!isspace(
static_cast<uint8_t
>(c)))
450 else if (!isspace(
static_cast<uint8_t
>(c)))
494 if (
parser()->context.memberDef &&
parser()->context.memberDef->name().at(0)==
'@')
552 while (!tok.
is_any_of(TokenRetval::TK_NONE, TokenRetval::TK_EOF))
566 if (sec==
nullptr &&
parser()->context.lang==SrcLangExt::Markdown)
628 while (!tok.
is_any_of(TokenRetval::TK_NONE, TokenRetval::TK_EOF))
630 if (tok.
is_any_of(TokenRetval::TK_COMMAND_AT, TokenRetval::TK_COMMAND_BS))
637 if (!tok.
is(TokenRetval::TK_WHITESPACE))
643 if (!tok.
is_any_of(TokenRetval::TK_WORD,TokenRetval::TK_LNKWORD))
657 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Illegal command '{:c}{}' as part of a \\secreflist",
662 else if (tok.
is(TokenRetval::TK_WHITESPACE))
668 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Unexpected token {} inside section reference list",
682 size_t i=ref.
find(
'#');
700 while (!tok.
is_any_of(TokenRetval::TK_NONE, TokenRetval::TK_EOF))
719 AUTO_TRACE(
"target='{}',context='{}'",target,context);
784 m_file = dd->getOutputFileBase();
791 bool isFile = compound ?
796 if (compound && lang==SrcLangExt::Markdown) lang = compound->
getLanguage();
837 toFileDef(compound)->generateSourceFile()
857 for (
auto &&elem : elements)
867 for (
auto &dn : children)
869 DocPara *para = std::get_if<DocPara>(&dn);
881 for (
auto &cn : children)
888 for (
auto &ccn : *opt_children)
900 char cmdCharStr[2] = { cmdChar, 0 };
903 while (!tok.
is_any_of(TokenRetval::TK_NONE, TokenRetval::TK_EOF))
909 case TokenRetval::TK_HTMLTAG:
922 if (
parser()->context.insideHtmlLink)
927 "Potential recursion while resolving {:c}{} command!",cmdChar,cmdName);
954 if (numBibFiles>0 && cite && !cite->
text().
empty())
967 else if (cite==
nullptr)
986 if (!opt.noPar()) txt +=
"[";
990 if (opt.isNumber()) txt += citeInfo->
text();
991 else if (opt.isShortAuthor()) txt += citeInfo->
shortAuthor();
992 else if (opt.isYear()) txt += citeInfo->
year();
995 if (!opt.noPar()) txt +=
"]";
1010 m_refText = m_refText.mid(1);
1017 if (compound && compound->isLinkable())
1019 m_file = compound->getOutputFileBase();
1020 m_ref = compound->getReference();
1023 (
toFileDef(compound))->generateSourceFile()
1033 warn_doc_error(parser->context.fileName,parser->tokenizer.getLineNr(),
"unable to resolve link to '{}' for \\link command",
1045 while (!tok.
is_any_of(TokenRetval::TK_NONE, TokenRetval::TK_EOF))
1049 switch (tok.
value())
1051 case TokenRetval::TK_COMMAND_AT:
1053 case TokenRetval::TK_COMMAND_BS:
1069 case TokenRetval::TK_SYMBOL:
1070 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Unsupported symbol '{}' found as part of a \\link",
1071 parser()->context.token->name);
1073 case TokenRetval::TK_HTMLTAG:
1074 if (
parser()->context.token->name!=
"see" || !isXmlLink)
1076 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Unexpected xml/html command {} found as part of a \\link",
1077 parser()->context.token->name);
1080 case TokenRetval::TK_LNKWORD:
1081 case TokenRetval::TK_WORD:
1096 result=w.
right(l-p-1);
1110 if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
1113 parser()->tokenizer.getLineNr(),
1114 "Unexpected end of comment while inside link command");
1144 if (fd==
nullptr && !
p->name.endsWith(
".dot"))
1155 "Possible candidates:\n{}",
p->name,
1163 "in any of the paths specified via DOTFILE_DIRS!",
p->name);
1182 if (fd==
nullptr && !
p->name.endsWith(
".msc"))
1193 "Possible candidates:\n{}",
p->name,
1201 "in any of the paths specified via MSCFILE_DIRS!",
p->name);
1222 if (fd==
nullptr && !
p->name.endsWith(
".dia"))
1233 "Possible candidates:\n{}",
p->name,
1241 "in any of the paths specified via DIAFILE_DIRS!",
p->name);
1261 if (fd==
nullptr && !
p->name.endsWith(
".puml"))
1264 if (fd==
nullptr && !
p->name.endsWith(
".pu"))
1276 "Possible candidates:\n{}",
p->name,
1284 "in any of the paths specified via PLANTUMLFILE_DIRS!",
p->name);
1305 if (fd==
nullptr && !
p->name.endsWith(
".mmd"))
1316 "Possible candidates:\n{}",
p->name,
1324 "in any of the paths specified via MERMAIDFILE_DIRS!",
p->name);
1342 while (!tok.
is_any_of(TokenRetval::TK_NONE, TokenRetval::TK_EOF))
1369 DString locName =
p->url.empty() ?
p->name :
p->url;
1370 size_t len = locName.
length();
1371 size_t fnd = locName.
find(
'?');
1373 return fnd>=4 && locName.
mid(fnd-4,4)==
".svg";
1387 Token retval(TokenRetval::RetVal_OK);
1391 while (!tok.
is_any_of(TokenRetval::TK_NONE, TokenRetval::TK_EOF))
1395 switch (tok.
value())
1397 case TokenRetval::TK_HTMLTAG:
1456 if (!
parser()->context.token->endTag)
1467 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Unexpected html tag <{}{}> found within <h{:d}> context",
1474 snprintf(tmp,20,
"<h%d> tag",
m_level);
1480 if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
1497 while (!tok.
is_any_of(TokenRetval::TK_NONE, TokenRetval::TK_EOF))
1500 if (tok.
value()==TokenRetval::TK_HTMLTAG &&
1502 parser()->context.token->endTag
1507 else if (tok.
is_any_of(TokenRetval::TK_COMMAND_AT, TokenRetval::TK_COMMAND_BS) &&
1520 if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
1532 Token retval(TokenRetval::TK_NONE);
1542 if (isFirst) { par->
markFirst(); isFirst=
false; }
1543 retval=par->
parse();
1545 while (retval.
is(TokenRetval::TK_NEWPARA));
1548 if (retval.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
1550 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"unexpected end of comment while inside <details> block");
1561 return retval.
is(TokenRetval::RetVal_EndHtmlDetails) ? Token::make_RetVal_OK() : retval;
1577 Token retval(TokenRetval::RetVal_OK);
1581 while (!tok.
is_any_of(TokenRetval::TK_NONE, TokenRetval::TK_EOF))
1585 switch (tok.
value())
1587 case TokenRetval::TK_HTMLTAG:
1600 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Unexpected html tag <{}{}> found within <a href=...> context",
1601 parser()->context.token->endTag?
"/":
"",
parser()->context.token->name);
1612 if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
1615 " <a href=...> tag");
1627 Token retval(TokenRetval::RetVal_OK);
1637 if (isFirst) { par->markFirst(); isFirst=
false; }
1638 retval=par->parse();
1641 if (lastPar) lastPar->
markLast(
false);
1648 if (retval.
is(TokenRetval::TK_LISTITEM))
1652 }
while (!retval.
is_any_of(TokenRetval::TK_NONE, TokenRetval::TK_EOF,
1653 TokenRetval::RetVal_Section, TokenRetval::RetVal_Subsection, TokenRetval::RetVal_Subsubsection,
1654 TokenRetval::RetVal_Paragraph, TokenRetval::RetVal_SubParagraph, TokenRetval::RetVal_SubSubParagraph,
1655 TokenRetval::RetVal_EndInternal));
1659 while ((level==1 && retval.
is(TokenRetval::RetVal_Section)) ||
1660 (level==2 && retval.
is(TokenRetval::RetVal_Subsection)) ||
1661 (level==3 && retval.
is(TokenRetval::RetVal_Subsubsection)) ||
1662 (level==4 && retval.
is(TokenRetval::RetVal_Paragraph)) ||
1663 (level==5 && retval.
is(TokenRetval::RetVal_SubParagraph)) ||
1664 (level==6 && retval.
is(TokenRetval::RetVal_SubSubParagraph))
1673 if (retval.
is(TokenRetval::RetVal_Internal))
1675 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"\\internal command found inside internal section");
1687 Token retval(TokenRetval::RetVal_OK);
1690 if (!tok.
is(TokenRetval::TK_WHITESPACE))
1698 while (!tok.
is_any_of(TokenRetval::TK_NONE, TokenRetval::TK_EOF))
1700 switch (tok.
value())
1702 case TokenRetval::TK_WHITESPACE:
1705 case TokenRetval::TK_WORD:
1706 case TokenRetval::TK_LNKWORD:
1709 case TokenRetval::TK_SYMBOL:
1731 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Unexpected symbol '{}' found as argument of \\addindex",
parser()->context.token->name);
1736 case TokenRetval::TK_COMMAND_AT:
1738 case TokenRetval::TK_COMMAND_BS:
1760 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Unexpected command {} found as argument of \\addindex",
1761 parser()->context.token->name);
1785 for (
const auto &opt :
attribs)
1787 if (opt.name==
"id" && !opt.value.empty())
1812 Token retval = Token::make_TK_NONE();
1815 while (!tok.
is_any_of(TokenRetval::TK_NONE, TokenRetval::TK_EOF))
1819 switch (tok.
value())
1821 case TokenRetval::TK_HTMLTAG:
1826 retval = Token::make_RetVal_OK();
1831 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Unexpected html tag <{}{}> found within <caption> context",
1832 parser()->context.token->endTag?
"/":
"",
parser()->context.token->name);
1836 case TokenRetval::TK_COMMAND_AT:
1838 case TokenRetval::TK_COMMAND_BS:
1841 bool isJavaLink=
false;
1847 if (!tok.
is(TokenRetval::TK_WHITESPACE))
1856 if (!tok.
is(TokenRetval::TK_WORD))
1858 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"unexpected token {} as the argument of '{:c}{}' command",
1876 if (!tok.
is(TokenRetval::TK_WHITESPACE))
1885 if (!tok.
is(TokenRetval::TK_WORD))
1887 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"unexpected token {} as the argument of \\{} command",
1895 DString leftOver = lnk->parse(isJavaLink);
1896 if (!leftOver.empty())
1910 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Illegal command '{:c}{}' found as part of a <caption> tag",
1922 if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
1937 Token retval = Token::make_RetVal_OK();
1948 retval=par->
parse();
1949 if (retval.
is(TokenRetval::TK_HTMLTAG))
1954 retval = Token::make_TK_NEWPARA();
1958 retval = Token::make_TK_NEWPARA();
1962 while (retval.
is_any_of(TokenRetval::TK_NEWPARA,TokenRetval::RetVal_EndParBlock));
1971 Token retval = Token::make_RetVal_OK();
1982 retval=par->
parse();
1983 if (retval.
is(TokenRetval::TK_HTMLTAG))
1988 retval = Token::make_TK_NEWPARA();
1992 retval = Token::make_TK_NEWPARA();
1996 while (retval.
is(TokenRetval::TK_NEWPARA));
2004 for (
const auto &attr :
attribs())
2006 if (attr.name.lower()==
"rowspan")
2008 return attr.value.toUInt();
2016 for (
const auto &attr :
attribs())
2018 if (attr.name.lower()==
"colspan")
2020 return std::max(1u,attr.value.toUInt());
2028 for (
const auto &attr :
attribs())
2032 if (attrName==
"align")
2034 if (attrValue==
"center")
2036 else if (attrValue==
"right")
2040 else if (attrName==
"class" && attrValue.
startsWith(
"markdowntable"))
2042 if (attrValue==
"markdowntableheadcenter")
2044 else if (attrValue==
"markdowntableheadright")
2046 else if (attrValue==
"markdowntableheadleft")
2048 else if (attrValue==
"markdowntableheadnone")
2050 else if (attrValue==
"markdowntablebodycenter")
2052 else if (attrValue==
"markdowntablebodyright")
2054 else if (attrValue==
"markdowntablebodyleft")
2056 else if (attrValue==
"markdowntablebodynone")
2066 for (
const auto &attr :
attribs())
2070 if (attrName==
"valign")
2072 if (attrValue==
"top")
2074 else if (attrValue==
"bottom")
2076 else if (attrValue==
"middle")
2091 const DocHtmlCell *cell = std::get_if<DocHtmlCell>(&n);
2107 while (tok.
is_any_of(TokenRetval::TK_WHITESPACE,TokenRetval::TK_NEWPARA,TokenRetval::TK_HTMLTAG,
2108 TokenRetval::TK_COMMAND_AT,TokenRetval::TK_COMMAND_BS))
2110 if (tok.
is(TokenRetval::TK_HTMLTAG))
2126 else if (tok.
is_any_of(TokenRetval::TK_COMMAND_AT, TokenRetval::TK_COMMAND_BS))
2136 if (!tok.
is(TokenRetval::TK_WORD))
2164 Token retval = Token::make_RetVal_OK();
2173 if (tok.
is(TokenRetval::TK_HTMLTAG))
2186 "found <{}{}> instead!",
parser()->context.token->endTag ?
"/" :
"",
parser()->context.token->name);
2191 else if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
2194 " for a html description title");
2199 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"expected <td> or <th> tag but found {} token instead!",
2213 retval=cell->
parse();
2214 isHeading = retval.
is(TokenRetval::RetVal_TableHCell);
2216 if (retval.
is(TokenRetval::RetVal_EndTableCell))
2222 if (tok.
is(TokenRetval::TK_HTMLTAG))
2225 !
parser()->context.token->endTag)
2227 retval = Token::make_RetVal_TableCell();
2232 if (
parser()->context.token->endTag)
2234 retval = Token::make_RetVal_EndTableRow();
2238 retval = Token::make_RetVal_TableRow();
2243 retval = Token::make_RetVal_EndTable();
2248 "found <{}{}> instead!",
parser()->context.token->endTag ?
"/" :
"",
parser()->context.token->name);
2255 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"expected <td>, <th> or <tr> tag but found {} token instead!",
2261 while (retval.
is_any_of(TokenRetval::RetVal_TableCell,TokenRetval::RetVal_TableHCell));
2271 Token retval = Token::make_RetVal_OK();
2282 if (tok.
is(TokenRetval::TK_HTMLTAG))
2294 "found <{}> instead!",
parser()->context.token->name);
2299 else if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
2302 " for a html description title");
2307 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"expected <td> or <th> tag but found {} token instead!",
2320 while (retval.
is_any_of(TokenRetval::RetVal_TableCell,TokenRetval::RetVal_TableHCell));
2344 const DocHtmlRow *row = std::get_if<DocHtmlRow>(&rowNode);
2357 Token retval = Token::make_RetVal_OK();
2364 if (tok.
is(TokenRetval::TK_HTMLTAG))
2370 retval = Token::make_RetVal_TableRow();
2381 retval=std::get<DocHtmlCaption>(*m_caption).parse();
2383 if (retval.
is(TokenRetval::RetVal_OK))
2392 "found <{}{}> instead!",
parser()->context.token->endTag ?
"/" :
"",
parser()->context.token->name);
2395 else if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
2398 " for a <tr> or <caption> tag");
2407 while (retval.
is(TokenRetval::RetVal_TableRow))
2412 if (retval.is(TokenRetval::RetVal_EndTableRow))
2420 retval = Token::make_RetVal_TableRow();
2424 retval = Token::make_RetVal_EndTable();
2426 else if (retval.is(TokenRetval::TK_HTMLTAG))
2429 "found <{}> instead!",
parser()->context.token->name);
2435 "found token {} instead!",retval.to_string());
2436 retval=Token::make_RetVal_OK();
2444 return retval.
is(TokenRetval::RetVal_EndTable) ? Token::make_RetVal_OK() : retval;
2450 Token retval = Token::make_RetVal_OK();
2459 bool isHeader=
false;
2460 if (tok.
is(TokenRetval::TK_HTMLTAG))
2465 retval = Token::make_RetVal_TableRow();
2469 retval = Token::make_RetVal_TableRow();
2475 while (retval.
is(TokenRetval::RetVal_TableRow))
2479 retval=tr->parseXml(isHeader);
2514 DocHtmlRow *row = std::get_if<DocHtmlRow>(&rowNode);
2517 for (
auto &cellNode : row->
children())
2519 DocHtmlCell *cell = std::get_if<DocHtmlCell>(&cellNode);
2522 uint32_t rs = cell->
rowSpan();
2523 uint32_t cs = cell->
colSpan();
2525 for (
size_t i=0;i<rowSpans.size();i++)
2527 if (rowSpans[i].rowsLeft>0 &&
2528 rowSpans[i].column==colIdx)
2530 colIdx=rowSpans[i].column+1;
2534 if (rs>0) rowSpans.emplace_back(rs,colIdx);
2542 for (
size_t i=0;i<rowSpans.size();i++)
2544 if (rowSpans[i].rowsLeft>0) rowSpans[i].rowsLeft--;
2550 if (colIdx-1>maxCols) maxCols=colIdx-1;
2560 Token retval = Token::make_TK_NONE();
2564 while (!tok.
is_any_of(TokenRetval::TK_NONE, TokenRetval::TK_EOF))
2568 switch (tok.
value())
2570 case TokenRetval::TK_COMMAND_AT:
2572 case TokenRetval::TK_COMMAND_BS:
2575 bool isJavaLink=
false;
2581 if (!tok.
is(TokenRetval::TK_WHITESPACE))
2590 if (!tok.
is(TokenRetval::TK_WORD))
2592 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"unexpected token {} as the argument of '{:c}{}' command",
2610 if (!tok.
is(TokenRetval::TK_WHITESPACE))
2619 if (!tok.
is(TokenRetval::TK_WORD))
2621 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"unexpected token {} as the argument of \\{} command",
2629 DString leftOver = lnk->parse(isJavaLink);
2630 if (!leftOver.empty())
2644 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Illegal command '{:c}{}' found as part of a <dt> tag",
2649 case TokenRetval::TK_SYMBOL:
2650 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Unsupported symbol '{}' found as part of a <dt> tag",
2651 parser()->context.token->name);
2653 case TokenRetval::TK_HTMLTAG:
2658 retval = Token::make_RetVal_DescData();
2668 retval = Token::make_RetVal_DescTitle();
2673 retval = Token::make_RetVal_EndDesc();
2678 if (!
parser()->context.token->endTag)
2689 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Unexpected html tag <{}{}> found within <dt> context",
2690 parser()->context.token->endTag?
"/":
"",
parser()->context.token->name);
2702 if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
2719 Token retval = Token::make_TK_NONE();
2728 if (isFirst) { par->
markFirst(); isFirst=
false; }
2729 retval=par->
parse();
2731 while (retval.
is(TokenRetval::TK_NEWPARA));
2742 Token retval = Token::make_RetVal_OK();
2750 if (tok.
is(TokenRetval::TK_HTMLTAG))
2760 "found <{}> instead!",
parser()->context.token->name);
2765 else if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
2768 " for a html description title");
2785 if (retval.is(TokenRetval::RetVal_DescData))
2788 while (retval.is(TokenRetval::RetVal_DescData))
2795 else if (!retval.is(TokenRetval::RetVal_DescTitle))
2800 }
while (retval.
is(TokenRetval::RetVal_DescTitle));
2802 if (retval.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
2804 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"unexpected end of comment while inside <dl> block");
2809 return retval.
is(TokenRetval::RetVal_EndDesc) ? Token::make_RetVal_OK() : retval;
2817 Token retval = Token::make_TK_NONE();
2827 if (isFirst) { par->
markFirst(); isFirst=
false; }
2828 retval=par->
parse();
2830 while (retval.
is(TokenRetval::TK_NEWPARA));
2840 Token retval = Token::make_TK_NONE();
2850 if (isFirst) { par->
markFirst(); isFirst=
false; }
2851 retval=par->
parse();
2852 if (retval.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
break;
2856 if (retval.
is(TokenRetval::RetVal_ListItem))
2861 while (!retval.
is(TokenRetval::RetVal_CloseXml));
2874 Token retval = Token::make_RetVal_OK();
2883 if (tok.
is(TokenRetval::TK_HTMLTAG))
2892 ) &&
parser()->context.token->endTag
2898 retval = Token::make_RetVal_EndList();
2906 "found <{}{}> instead!",
parser()->context.token->endTag?
"/":
"",
parser()->context.token->name);
2911 else if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
2916 " for a html list item");
2933 }
while (retval.
is(TokenRetval::RetVal_ListItem));
2935 if (retval.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
2937 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"unexpected end of comment while inside <{:c}l> block",
2943 return retval.
is(TokenRetval::RetVal_EndList) ? Token::make_RetVal_OK() : retval;
2949 Token retval = Token::make_RetVal_OK();
2958 if (tok.
is(TokenRetval::TK_HTMLTAG))
2969 "found <{}> instead!",
parser()->context.token->name);
2974 else if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
2977 " for a html list item");
2991 retval=li->parseXml();
2992 if (retval.is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
break;
2994 }
while (retval.
is(TokenRetval::RetVal_ListItem));
2996 if (retval.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
2998 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"unexpected end of comment while inside <list type=\"{}\"> block",
3004 return (retval.
is_any_of(TokenRetval::RetVal_EndList,TokenRetval::RetVal_CloseXml) ||
parser()->context.token->name==
"list") ?
3005 Token::make_RetVal_OK() : retval;
3013 Token retval = Token::make_TK_NONE();
3023 if (isFirst) { par->
markFirst(); isFirst=
false; }
3024 retval=par->
parse();
3026 while (retval.
is(TokenRetval::TK_NEWPARA));
3029 if (retval.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
3031 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"unexpected end of comment while inside <blockquote> block");
3035 return retval.
is(TokenRetval::RetVal_EndBlockQuote) ? Token::make_RetVal_OK() : retval;
3043 Token retval = Token::make_TK_NONE();
3053 if (isFirst) { par->
markFirst(); isFirst=
false; }
3054 retval=par->
parse();
3056 while (retval.
is(TokenRetval::TK_NEWPARA));
3060 return retval.
is(TokenRetval::RetVal_EndBlockQuote) ? Token::make_RetVal_OK() : retval;
3087 Token rv = Token::make_TK_NONE();
3093 }
while (rv.
is(TokenRetval::RetVal_ListItem));
3094 return (!rv.
is(TokenRetval::TK_NEWPARA)) ? rv : Token::make_RetVal_OK();
3107 Token retval = Token::make_RetVal_OK();
3117 if (isFirst) { par->markFirst(); isFirst=
false; }
3118 retval=par->parse();
3121 if (lastPar) lastPar->
markLast(
false);
3130 }
while (retval.
is(TokenRetval::TK_NEWPARA) &&
parser()->context.token->indent>
m_indent);
3149 Token retval = Token::make_RetVal_OK();
3156 switch (
parser()->context.token->id)
3178 while (retval.
is(TokenRetval::TK_LISTITEM) &&
3182 (
parser()->context.token->id==-1 ||
parser()->context.token->id>=num)
3199 while (!tok.
is_any_of(TokenRetval::TK_NONE, TokenRetval::TK_EOF))
3231 return m_title && std::get<DocTitle>(*m_title).hasTitle();
3243 std::get_if<DocTitle>(
m_title.get())->parse();
3247 if (!
children().empty() && std::holds_alternative<DocPara>(
children().back()))
3249 std::get<DocPara>(
children().back()).markLast(
false);
3265 Token retval = par->parse();
3285 return Token::make_RetVal_OK();
3293 Token retval = Token::make_RetVal_OK();
3297 if (!
children().empty() && std::holds_alternative<DocPara>(
children().back()))
3299 std::get<DocPara>(
children().back()).markLast(
false);
3311 retval = par->parse();
3312 if (retval.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
break;
3313 if (retval.
is(TokenRetval::RetVal_CloseXml))
3315 retval = Token::make_RetVal_OK();
3327 if (
children().empty() || (p=std::get_if<DocPara>(&
children().back()))==
nullptr)
3349 case See:
return "see";
3350 case Return:
return "return";
3352 case Authors:
return "author";
3353 case Version:
return "version";
3354 case Since:
return "since";
3355 case Date:
return "date";
3356 case Note:
return "note";
3357 case Warning:
return "warning";
3358 case Pre:
return "pre";
3359 case Post:
return "post";
3361 case Invar:
return "invariant";
3362 case Remark:
return "remark";
3365 case User:
return "user";
3366 case Rcs:
return "rcs";
3376 Token retval = Token::make_RetVal_OK();
3379 DString saveCmdName = cmdName;
3384 if (!tok.
is(TokenRetval::TK_WHITESPACE))
3388 retval = Token::make_RetVal_EndParBlock();
3392 tok=tokenizer.
lex();
3393 while (tok.
is(TokenRetval::TK_WORD))
3403 if (
parent() && std::holds_alternative<DocParamSect>(*
parent()))
3405 std::get<DocParamSect>(*
parent()).m_hasTypeSpecifier=
true;
3422 tok=tokenizer.
lex();
3425 if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
3428 "argument of command {}",saveCmdName);
3429 retval = Token::make_RetVal_EndParBlock();
3432 if (!tok.
is(TokenRetval::TK_WHITESPACE))
3434 if (!tok.
is(TokenRetval::TK_NEWPARA))
3437 "argument of command {}",tok.
to_string(),saveCmdName);
3439 retval = Token::make_RetVal_EndParBlock();
3445 retval = par->
parse();
3457 Token retval = Token::make_RetVal_OK();
3478 retval = par->parse();
3500 if (retval.is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
break;
3502 }
while (retval.
is(TokenRetval::RetVal_CloseXml) &&
3507 if (retval.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
3513 retval = Token::make_RetVal_OK();
3525 Token retval = Token::make_RetVal_OK();
3533 if (!
children().empty() && std::holds_alternative<DocParamList>(
children().back()))
3548 retval = pl->parseXml(cmdName);
3552 retval = pl->parse(cmdName);
3554 if (retval.
is(TokenRetval::RetVal_EndParBlock))
3556 retval = Token::make_RetVal_OK();
3575 bool needsSeparator =
false;
3577 (ss=
children().get_last<DocSimpleSect>()) &&
3582 needsSeparator =
true;
3589 Token rv = Token::make_RetVal_OK();
3598 return (!rv.
is(TokenRetval::TK_NEWPARA)) ? rv : Token::make_RetVal_OK();
3603 bool xmlContext=
false,
3609 (ps=
children().get_last<DocParamSect>()) &&
3621 return (!rv.
is(TokenRetval::TK_NEWPARA)) ? rv : Token::make_RetVal_OK();
3629 if (!tok.
is(TokenRetval::TK_WHITESPACE))
3637 if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
3639 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"no emoji name given or unexpected end of comment block while parsing the "
3640 "argument of command '{:c}{}'",cmdChar,cmdName);
3644 else if (!tok.
is(TokenRetval::TK_WORD))
3659 if (!tok.
is(TokenRetval::TK_WHITESPACE))
3667 if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
3669 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"unexpected end of comment block while parsing the "
3670 "argument of command '{:c}{}'",cmdChar,cmdName);
3673 else if (!tok.
is_any_of(TokenRetval::TK_WORD,TokenRetval::TK_LNKWORD))
3683 switch (opt->
kind())
3704 static const reg::Ex marker(R
"(@(\d+))");
3709 for ( ; it!=
end ; ++it)
3711 const auto &match = *it;
3712 size_t newIndex = match.position();
3713 size_t matchLen = match.length();
3714 optionValue += lstFormat.
substr(index,newIndex-index);
3715 unsigned long entryIndex = std::stoul(match[1].str());
3716 if (entryIndex<(
unsigned long)lst->size())
3718 optionValue += lst->at(entryIndex);
3720 index=newIndex+matchLen;
3722 optionValue+=lstFormat.
substr(index);
3727 warn(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Obsolete setting for '{:c}{}': '{}'",
3728 cmdChar,cmdName,
parser()->context.token->name);
3732 "Disabled setting (i.e. not supported in this doxygen executable) for '{:c}{}': '{}'",
3733 cmdChar,cmdName,
parser()->context.token->name);
3739 if (!optionValue.
empty())
3746 warn(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Unknown option for '{:c}{}': '{}'",
3747 cmdChar,cmdName,
parser()->context.token->name);
3757 ASSERT(retval.
is(TokenRetval::TK_WHITESPACE));
3760 if (retval.
is(TokenRetval::RetVal_OK))
3781 if (!tok.
is(TokenRetval::TK_WHITESPACE))
3789 if (!tok.
is(TokenRetval::TK_WORD))
3803 bool specDateOnlyWS = !specDateRaw.
empty() && specDate.
empty();
3804 if (!specDate.
empty() && !tok.
is_any_of(TokenRetval::TK_WORD,TokenRetval::TK_NONE,TokenRetval::TK_EOF))
3806 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"invalid <date_time> argument for command '{:c}{}'",
3817 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"invalid <date_time> argument for command '{:c}{}': {}",
3818 cmdChar,cmdName,
err);
3830 if ((usedFormat&bitMask) && !(specFormat&bitMask))
3832 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"'{:c}{}' <format> parameter '{}' has {} related markers which are not specified in the <date_time> parameter '{}'. Filling in the current value for {} instead.",
3848 DString saveCmdName = cmdName;
3850 if (!tok.
is(TokenRetval::TK_WHITESPACE))
3859 if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
3861 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"unexpected end of comment block while parsing the "
3862 "argument of command {}", saveCmdName);
3865 else if (!tok.
is(TokenRetval::TK_WORD))
3889 (!n1_docIncOp && !n1_docWs) ||
3890 (n1_docWs && n2 && !n2_docIncOp);
3895 n1_docIncOp->markLast(
false);
3897 else if (n1_docWs && n2_docIncOp)
3908 DString saveCmdName = cmdName;
3910 if (!tok.
is(TokenRetval::TK_WHITESPACE))
3919 if (!tok.
is(TokenRetval::TK_WORD))
3946 AUTO_TRACE(
"cmdName={} isJavaLink={}",cmdName,isJavaLink);
3947 DString saveCmdName = cmdName;
3949 if (!tok.
is(TokenRetval::TK_WHITESPACE))
3957 if (!tok.
is(TokenRetval::TK_WORD))
3963 if (saveCmdName ==
"javalink")
3972 if (saveCmdName ==
"javalink")
3978 DString leftOver = lnk->parse(isJavaLink);
3979 if (!leftOver.
empty())
3988 DString saveCmdName = cmdName;
3990 bool isBlock =
false;
3991 bool trimLeft =
false;
3992 bool localScope =
false;
3994 if (tok.
is(TokenRetval::TK_WORD) &&
parser()->context.token->name==
"{")
4000 auto contains = [&optList](
const char *kw)
4002 return std::find(optList.begin(),optList.end(),kw)!=optList.end();
4004 localScope = contains(
"local");
4005 if (contains(
"nostrip"))
4007 stripCodeComments =
false;
4009 else if (contains(
"strip"))
4011 stripCodeComments =
true;
4018 if (contains(
"lineno"))
4025 if (!tok.
is(TokenRetval::TK_WHITESPACE))
4032 else if (tok.
is(TokenRetval::TK_WORD) &&
parser()->context.token->name==
"[")
4040 else if (!tok.
is(TokenRetval::TK_WHITESPACE))
4049 if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
4051 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"unexpected end of comment block while parsing the "
4052 "argument of command {}",saveCmdName);
4055 else if (!tok.
is(TokenRetval::TK_WORD))
4069 if (!tok.
is(TokenRetval::TK_WORD))
4071 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"expected block identifier, but found token {} instead while parsing the {} command",
4086 blockId,isBlock,trimLeft);
4093 DString saveCmdName = cmdName;
4096 if (!tok.
is(TokenRetval::TK_WHITESPACE))
4099 cmdChar,saveCmdName);
4103 if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
4105 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"unexpected end of comment block while parsing the "
4106 "argument of command '{:c}{}'", cmdChar,saveCmdName);
4109 else if (!tok.
is_any_of(TokenRetval::TK_WORD,TokenRetval::TK_LNKWORD))
4126 return retval.is(TokenRetval::RetVal_OK) ? Token::make_TK_NEWPARA() : retval;
4144 if (!lang.
empty() && lang.
at(0)!=
'.')
4148 if (
parser()->context.xmlComment)
4154 while (i<l && (
parser()->context.token->verb.at(i)==
' ' ||
parser()->context.token->verb.at(i)==
'\n'))
4156 if (
parser()->context.token->verb.at(i)==
'\n') li=i+1;
4166 if (retval.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
4177 if (
parser()->context.memberDef)
4183 bool hasParamCommand =
false;
4184 bool hasReturnCommand =
false;
4219 Token retval = Token::make_RetVal_OK();
4225 std::string str{cmdChar};
4229 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Found unexpanded alias '{:c}{}'. Check if number of arguments passed is correct.",cmdChar,cmdName);
4378 retval = Token::make_RetVal_Section();
4384 retval = Token::make_RetVal_Subsection();
4390 retval = Token::make_RetVal_Subsubsection();
4396 retval = Token::make_RetVal_Paragraph();
4402 retval = Token::make_RetVal_SubParagraph();
4408 retval = Token::make_RetVal_SubSubParagraph();
4428 if (retval.is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
4440 if (retval.is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
4452 if (retval.is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
4464 if (retval.is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
4476 if (retval.is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
4488 if (retval.is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
4502 size_t idx = fullMatch.
find(
'{');
4509 for (
const auto &opt : optList)
4511 if (opt.empty())
continue;
4514 if (locOpt ==
"code")
4518 else if (!locOpt.
empty())
4520 warn(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Unknown option '{}' for '\\iliteral'",opt);
4528 if (retval.is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
4536 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"javadoc literal section ended without end marker");
4555 if (retval.is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
4576 dv->setText(
parser()->context.token->verb);
4577 dv->setWidth(width);
4578 dv->setHeight(height);
4579 dv->setLocation(
parser()->context.fileName,
parser()->tokenizer.getLineNr());
4582 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"ignoring \\dot command because HAVE_DOT is not set");
4585 if (retval.is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
4606 dv->setText(
parser()->context.token->verb);
4607 dv->setWidth(width);
4608 dv->setHeight(height);
4609 dv->setLocation(
parser()->context.fileName,
parser()->tokenizer.getLineNr());
4610 if (retval.is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
4624 size_t idx = fullMatch.
find(
'{');
4632 for (
const auto &opt : optList)
4634 if (opt.empty())
continue;
4640 if (!engine.
empty())
4642 warn(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Multiple definition of engine for '\\startuml'");
4649 if (sectionId.
empty())
4655 warn(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Multiple use of filename for '\\startuml'");
4664 if (engine.
empty()) engine =
"uml";
4666 if (sectionId.
empty())
4670 ASSERT(retval.is(TokenRetval::RetVal_OK));
4691 if (engine ==
"ditaa")
4693 dv->setUseBitmap(
true);
4695 else if (engine ==
"uml")
4697 size_t i = trimmedVerb.
find(
'\n');
4701 dv->setText(trimmedVerb);
4702 dv->setWidth(width);
4703 dv->setHeight(height);
4704 dv->setLocation(
parser()->context.fileName,
parser()->tokenizer.getLineNr());
4705 if (!plantumlEnabled)
4707 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"ignoring \\startuml command because neither PLANTUML_JAR_PATH nor PLANTUML_TOOL is set");
4710 if (retval.is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
4723 size_t idx = fullMatch.
find(
'{');
4734 if (sectionId.
empty())
4738 ASSERT(retval.is(TokenRetval::RetVal_OK));
4744 DString mermaidFile(sectionId);
4758 dv->setText(trimmedVerb);
4759 dv->setWidth(width);
4760 dv->setHeight(height);
4761 dv->setLocation(
parser()->context.fileName,
parser()->tokenizer.getLineNr());
4762 if (retval.is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
4770 retval = Token::make_RetVal_EndParBlock();
4831 retval = Token::make_RetVal_Internal();
4834 retval = Token::make_RetVal_EndInternal();
4903 "ignoring \\dotfile command because HAVE_DOT is not set");
4997 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Unexpected command '{}' in paragraph context",cmdName);
5000 INTERNAL_ASSERT(retval.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF,TokenRetval::RetVal_OK,TokenRetval::RetVal_SimpleSec
5001 TokenRetval::TK_LISTITEM,TokenRetval::TK_ENDLIST,TokenRetval::TK_NEWPARA
5002 TokenRetval::RetVal_Section,TokenRetval::RetVal_EndList
5003 TokenRetval::RetVal_Internal,TokenRetval::RetVal_SwitchLang
5004 TokenRetval::RetVal_EndInternal)
5011 const char *attrName,
5015 for (
const auto &opt : tagHtmlAttribs)
5017 if (opt.name==attrName)
5019 *result = opt.value;
5028 AUTO_TRACE(
"tagName={} #tagHtmlAttrs={}",tagName,tagHtmlAttribs.size());
5029 Token retval = Token::make_RetVal_OK();
5035 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"HTML tag ('<{}/>') may not use the 'empty tag' XHTML syntax.",
5041 if (!
parser()->context.token->emptyTag)
5049 if (!
parser()->context.token->emptyTag)
5057 if (
parser()->context.token->emptyTag)
break;
5064 retval = Token::make_RetVal_ListItem();
5086 if (
parser()->context.token->emptyTag)
break;
5087 if (
parser()->context.xmlComment)
5132 if (
parser()->context.token->emptyTag)
break;
5138 retval = Token::make_TK_NEWPARA();
5141 if (!
parser()->context.token->emptyTag)
5150 retval = Token::make_RetVal_DescTitle();
5160 retval = Token::make_RetVal_DescData();
5168 if (!
parser()->context.token->emptyTag)
5176 retval = Token::make_RetVal_TableRow();
5179 retval = Token::make_RetVal_TableCell();
5182 retval = Token::make_RetVal_TableHCell();
5229 if (!
parser()->context.token->emptyTag)
5236 if (!
parser()->context.token->emptyTag)
5246 if (!
parser()->context.token->emptyTag)
5249 while (n && !std::holds_alternative<DocHtmlDetails>(*n)) n=
::parent(n);
5259 retval = Token::make_TK_NEWPARA();
5273 retval = Token::make_TK_NEWPARA();
5279 retval = Token::make_RetVal_TableCell();
5292 if (paramName.
empty())
5349 retval = Token::make_RetVal_TableRow();
5353 retval = Token::make_RetVal_ListItem();
5368 retval = Token::make_RetVal_TableCell();
5382 if (
parser()->context.token->emptyTag)
5395 DString leftOver = lnk->parse(
false,
true);
5396 if (!leftOver.empty())
5414 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Missing 'cref' or 'langword' attribute from <see> tag.");
5442 std::get<DocSimpleSect>(*vss).appendLinkWord(cref);
5443 retval = Token::make_RetVal_OK();
5500 Token retval = Token::make_RetVal_OK();
5510 retval = Token::make_RetVal_EndList();
5520 retval = Token::make_RetVal_EndList();
5536 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"found </details> tag without matching <details>");
5540 retval = Token::make_RetVal_EndHtmlDetails();
5546 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"found </blockquote> tag without matching <blockquote>");
5550 retval = Token::make_RetVal_EndBlockQuote();
5610 retval = Token::make_TK_NEWPARA();
5613 retval = Token::make_RetVal_EndDesc();
5622 retval = Token::make_RetVal_EndTable();
5625 retval = Token::make_RetVal_EndTableRow();
5628 retval = Token::make_RetVal_EndTableCell();
5631 retval = Token::make_RetVal_EndTableCell();
5675 retval = Token::make_TK_NEWPARA();
5689 retval = Token::make_RetVal_CloseXml();
5725 if (!std::get_if<DocAutoListItem>(n))
5733 const auto &docAutoList = std::get_if<DocAutoList>(n);
5736 indent = docAutoList->indent();
5745 const auto &docPara = std::get_if<DocPara>(n);
5751 return std::get<DocStyleChange>(*stack.top());
5761 indentStr.
fill(
' ',indent);
5776 Token retval = Token::make_TK_NONE();
5777 while (!tok.
is_any_of(TokenRetval::TK_NONE, TokenRetval::TK_EOF))
5781 if (tok.
is_any_of(TokenRetval::TK_WORD,TokenRetval::TK_LNKWORD,TokenRetval::TK_SYMBOL,TokenRetval::TK_URL,
5782 TokenRetval::TK_COMMAND_AT,TokenRetval::TK_COMMAND_BS,TokenRetval::TK_HTMLTAG)
5789 case TokenRetval::TK_WORD:
5792 case TokenRetval::TK_LNKWORD:
5795 case TokenRetval::TK_URL:
5798 case TokenRetval::TK_WHITESPACE:
5816 case TokenRetval::TK_LISTITEM:
5820 while (n && !std::holds_alternative<DocAutoList>(*n)) n=
::parent(n);
5821 const DocAutoList *al = std::get_if<DocAutoList>(n);
5828 retval = Token::make_TK_LISTITEM();
5838 al = std::get_if<DocAutoList>(n);
5852 }
while (retval.
is(TokenRetval::TK_LISTITEM) &&
5857 if (retval.
is(TokenRetval::RetVal_SimpleSec))
5863 if (
parser()->context.token->name.startsWith(
"rcs:"))
5867 tok = Token::make_TK_RCSTAG();
5871 tok = Token::make_TK_COMMAND_BS();
5876 else if (retval.
is(TokenRetval::TK_ENDLIST))
5892 case TokenRetval::TK_ENDLIST:
5893 AUTO_TRACE_ADD(
"Found end of list inside of paragraph at line {}",
parser()->tokenizer.getLineNr());
5894 if (std::get_if<DocAutoListItem>(
parent()))
5897 if (al && al->
indent()>=
parser()->context.token->indent)
5900 retval = Token::make_TK_ENDLIST();
5906 "has invalid indent level");
5915 case TokenRetval::TK_COMMAND_AT:
5917 case TokenRetval::TK_COMMAND_BS:
5922 while (n && !std::holds_alternative<DocSimpleSect>(*n) &&
5923 !std::holds_alternative<DocParamSect>(*n))
5934 retval = Token::make_RetVal_SimpleSec();
5940 while (n && !std::holds_alternative<DocSimpleListItem>(*n)) n=
::parent(n);
5945 retval = Token::make_RetVal_ListItem();
5955 if (retval.
is(TokenRetval::RetVal_SimpleSec))
5961 if (
parser()->context.token->name.startsWith(
"rcs:"))
5965 tok = Token::make_TK_RCSTAG();
5969 tok = Token::make_TK_COMMAND_BS();
5974 else if (retval.
value()>TokenRetval::TK_NONE && retval.
value()<TokenRetval::RetVal_OK)
5980 else if (retval.
value()!=TokenRetval::RetVal_OK)
5987 case TokenRetval::TK_HTMLTAG:
5989 if (!
parser()->context.token->endTag)
6001 if (!retval.
is(TokenRetval::RetVal_OK))
6007 case TokenRetval::TK_SYMBOL:
6018 parser()->context.token->name);
6022 case TokenRetval::TK_NEWPARA:
6023 retval = Token::make_TK_NEWPARA();
6025 case TokenRetval::TK_RCSTAG:
6028 while (n && !std::holds_alternative<DocSimpleSect>(*n) &&
6029 !std::holds_alternative<DocParamSect>(*n))
6039 retval = Token::make_RetVal_SimpleSec();
6050 "Found unexpected token (id={})",tok.
to_string());
6055 retval=Token::make_TK_NONE();
6058 DocPara *par = std::get_if<DocPara>(
parser()->context.nodeStack.top());
6059 if (!
parser()->context.token->endTag && par &&
6060 retval.
is(TokenRetval::TK_NEWPARA) &&
parser()->context.token->name.lower() ==
"p")
6064 INTERNAL_ASSERT(retval.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF,TokenRetval::TK_NEWPARA,TokenRetval::TK_LISTITEM,
6065 TokenRetval::TK_ENDLIST,TokenRetval::RetVal_OK)
6077 Token retval = Token::make_RetVal_OK();
6088 if (titleStr.
empty()) titleStr = sec->
label();
6102 if (isFirst) { par->markFirst(); isFirst=
false; }
6103 retval=par->parse();
6106 if (lastPar) lastPar->
markLast(
false);
6113 if (retval.
is(TokenRetval::TK_LISTITEM))
6117 if (retval.
is(TokenRetval::RetVal_Internal))
6121 if (retval.is(TokenRetval::RetVal_EndInternal))
6123 retval = Token::make_RetVal_OK();
6126 }
while (!retval.
is_any_of(TokenRetval::TK_NONE, TokenRetval::TK_EOF, TokenRetval::RetVal_Section, TokenRetval::RetVal_Subsection,
6127 TokenRetval::RetVal_Subsubsection, TokenRetval::RetVal_Paragraph, TokenRetval::RetVal_SubParagraph,
6128 TokenRetval::RetVal_SubSubParagraph, TokenRetval::RetVal_EndInternal)
6135 if (retval.
is(TokenRetval::RetVal_Subsection) &&
m_level<=1)
6138 while (retval.
is(TokenRetval::RetVal_Subsection))
6147 else if (retval.
is(TokenRetval::RetVal_Subsubsection) &&
m_level<=2)
6153 parser()->tokenizer.getLineNr(),
6154 "Unexpected subsubsection command found inside {}!",
6158 while (retval.
is(TokenRetval::RetVal_Subsubsection))
6165 if (!(
m_level < 2 && retval.
is(TokenRetval::RetVal_Subsection)))
break;
6167 else if (retval.
is(TokenRetval::RetVal_Paragraph) &&
m_level<=3)
6173 "Unexpected paragraph command found inside {}!",
6177 while (retval.
is(TokenRetval::RetVal_Paragraph))
6184 if (!(
m_level<3 && (retval.
is_any_of(TokenRetval::RetVal_Subsection,TokenRetval::RetVal_Subsubsection))))
break;
6186 else if (retval.
is(TokenRetval::RetVal_SubParagraph) &&
m_level<=4)
6192 "Unexpected subparagraph command found inside {}!",
6196 while (retval.
is(TokenRetval::RetVal_SubParagraph))
6203 if (!(
m_level<4 && (retval.
is_any_of(TokenRetval::RetVal_Subsection,TokenRetval::RetVal_Subsubsection,TokenRetval::RetVal_Paragraph))))
break;
6205 else if (retval.
is(TokenRetval::RetVal_SubSubParagraph) &&
m_level<=5)
6211 "Unexpected subsubparagraph command found inside {}!",
6215 while (retval.
is(TokenRetval::RetVal_SubSubParagraph))
6222 if (!(
m_level<5 && (retval.
is_any_of( TokenRetval::RetVal_Subsection, TokenRetval::RetVal_Subsubsection,
6223 TokenRetval::RetVal_Paragraph, TokenRetval::RetVal_SubParagraph))))
break;
6232 TokenRetval::RetVal_Section, TokenRetval::RetVal_Subsection,
6233 TokenRetval::RetVal_Subsubsection, TokenRetval::RetVal_Paragraph,
6234 TokenRetval::RetVal_SubParagraph, TokenRetval::RetVal_SubSubParagraph,
6235 TokenRetval::RetVal_Internal, TokenRetval::RetVal_EndInternal)
6251 while (!tok.
is_any_of(TokenRetval::TK_NONE, TokenRetval::TK_EOF))
6255 case TokenRetval::TK_WORD:
6258 case TokenRetval::TK_WHITESPACE:
6261 case TokenRetval::TK_SYMBOL:
6271 parser()->context.token->name);
6275 case TokenRetval::TK_COMMAND_AT:
6277 case TokenRetval::TK_COMMAND_BS:
6339 parser()->context.token->name);
6363 Token retval = Token::make_TK_NONE();
6373 if (isFirst) { par->markFirst(); isFirst=
false; }
6374 retval=par->parse();
6375 if (par->empty() && par->attribs().empty())
6384 auto checkParagraph = [
this,&retval](
Token t,
int level,
const char *sectionType,
const char *parentSectionType) {
6390 parser()->tokenizer.getLineNr(),
6391 "found {} command (id: '{}') outside of {} context!",
6392 sectionType,
parser()->context.token->sectionId,parentSectionType);
6396 if (!
parser()->context.token->sectionId.empty())
6409 sectionType,
parser()->context.token->sectionId,sectionType);
6410 retval = Token::make_TK_NONE();
6415 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Missing id for {}; ignoring {}",sectionType,sectionType);
6416 retval = Token::make_TK_NONE();
6421 checkParagraph(Token::make_RetVal_SubSubParagraph(), 6,
"subsubparagraph",
"subparagraph" );
6422 checkParagraph(Token::make_RetVal_SubParagraph(), 5,
"subparagraph",
"paragraph" );
6423 checkParagraph(Token::make_RetVal_Paragraph(), 4,
"paragraph",
"subsubsection" );
6424 checkParagraph(Token::make_RetVal_Subsubsection(), 3,
"subsubsection",
"subsection" );
6425 checkParagraph(Token::make_RetVal_Subsection(), 2,
"subsection",
"section" );
6427 if (retval.
is(TokenRetval::TK_LISTITEM))
6431 if (retval.
is(TokenRetval::RetVal_Internal))
6436 }
while (!retval.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF,TokenRetval::RetVal_Section));
6441 while (retval.
is(TokenRetval::RetVal_Section))
6443 if (!
parser()->context.token->sectionId.empty())
6456 retval = Token::make_TK_NONE();
6462 retval = Token::make_TK_NONE();
bool isAliasCmd(std::string_view aliasCmd)
static AnchorGenerator & instance()
Returns the singleton instance.
const CiteInfo * find(const DString &label) const
Return the citation info for a given label.
static CitationManager & instance()
DString anchorPrefix() const
Class representing a Boolean type option.
DString * valueStringRef()
Class representing an enum type option.
static ConfigImpl * instance()
ConfigOption * get(const DString &name) const
Class representing an integer type option.
DString * valueStringRef()
Class representing a list type option.
Abstract base class for any configuration option.
@ O_Disabled
Disabled compile time option.
@ O_Enum
A fixed set of items.
@ O_Obsolete
An obsolete option.
@ O_Info
A section header.
Class representing a string type option.
A String class for use with Doxygen wrapping std::string and adding some additional functionality off...
DString fill(char c, size_t len)
Fills a string with a predefined character.
DString mid(size_t index, size_t len=npos) const
bool empty() const
Returns true iff the string is empty (std::string compatible alias for isEmpty()).
DString substr(size_t pos=0, size_t count=npos) const
Returns a substring of length count starting at pos.
std::string_view view() const
static constexpr size_t npos
value used to indicate 'not found' or 'to the end of the string', matching std::string::npos
char & at(size_t i)
Returns a reference to the character at index i.
DString right(size_t len) const
DString & prepend(const char *s)
int contains(char c, bool cs=true) const
size_t find(char c, size_t pos=0) const
DString & sprintf(const char *format,...)
DString stripWhiteSpace() const
returns a copy of this string with leading and trailing whitespace removed
DString left(size_t len) const
const std::string & str() const
const char * data() const
Returns a pointer to the contents of the string in the form of a 0-terminated C string.
bool startsWith(const char *s) const
bool endsWith(const char *s) const
size_t length() const
Returns the length of the string, not counting the 0-terminator.
The common base class of all entity definitions found in the sources.
virtual DString briefDescription(bool abbreviate=false) const =0
virtual SrcLangExt getLanguage() const =0
Returns the programming language this definition was written in.
virtual DString documentation() const =0
virtual bool isLinkable() const =0
virtual DefType definitionType() const =0
virtual const DString & name() const =0
virtual DString getReference() const =0
virtual Definition * getOuterScope() const =0
virtual DString getSourceFileBase() const =0
virtual DString getOutputFileBase() const =0
DocAnchor(DocParser *parser, DocNodeVariant *parent, const DString &id, bool newAnchor)
Node representing an auto List.
bool isCheckedList() const
DocAutoList(DocParser *parser, DocNodeVariant *parent, int indent, bool isEnumList, int depth, bool isCheckedList)
Node representing an item of a auto list.
DocAutoListItem(DocParser *parser, DocNodeVariant *parent, int indent, int num)
DocCite(DocParser *parser, DocNodeVariant *parent, const DString &target, const DString &context, CiteInfoOption opt)
DocCompoundNode(DocParser *parser, DocNodeVariant *parent)
DocDiaFile(DocParser *parser, DocNodeVariant *parent, const DString &name, const DString &context, const DString &srcFile, int srcLine)
DocDiagramFileBase(DocParser *parser, DocNodeVariant *parent, const DString &name, const DString &context, const DString &srcFile, int srcLine)
std::unique_ptr< Private > p
DocDotFile(DocParser *parser, DocNodeVariant *parent, const DString &name, const DString &context, const DString &srcFile, int srcLine)
Node representing an emoji.
DocEmoji(DocParser *parser, DocNodeVariant *parent, const DString &symName)
Node representing a horizontal ruler.
Node representing an HTML blockquote.
DocHtmlCaption(DocParser *parser, DocNodeVariant *parent, const HtmlAttribList &attribs)
const HtmlAttribList & attribs() const
Node representing a HTML table cell.
Valignment valignment() const
void setColumnIndex(uint32_t idx)
void setRowIndex(uint32_t idx)
void markLast(bool v=true)
void markFirst(bool v=true)
Alignment alignment() const
const HtmlAttribList & attribs() const
Node representing a HTML description data.
Node representing a Html description list.
Node representing a Html description item.
const HtmlAttribList & attribs() const
void parseSummary(DocNodeVariant *, HtmlAttribList &attribs)
const DocNodeVariant * summary() const
std::unique_ptr< DocNodeVariant > m_summary
Node representing a Html list.
Node representing a HTML list item.
Node representing a HTML table row.
Token parseXml(bool header)
void setVisibleCells(uint32_t n)
void setRowIndex(uint32_t idx)
Node representing a HTML table.
size_t numberHeaderRows() const
std::unique_ptr< DocNodeVariant > m_caption
void computeTableGrid()
determines the location of all cells in a grid, resolving row and column spans.
const DocNodeVariant * caption() const
const HtmlAttribList & attribs() const
DocImage(DocParser *parser, DocNodeVariant *parent, const HtmlAttribList &attribs, const DString &name, Type t, const DString &url=DString(), bool inlineImage=true)
std::unique_ptr< Private > p
Node representing a include/dontinclude operator block.
const char * typeAsString() const
DString m_includeFileName
void markLast(bool v=true)
Node representing an included text block from file.
Node representing an entry in the index.
Node representing an internal section of documentation.
DocInternalRef(DocParser *parser, DocNodeVariant *parent, const DString &target)
Node representing a line break.
Node representing a link to some item.
DString parse(bool, bool isXmlLink=false)
DocLink(DocParser *parser, DocNodeVariant *parent, const DString &target)
DocLinkedWord(DocParser *parser, DocNodeVariant *parent, const DString &word, const DString &ref, const DString &file, const DString &anchor, const DString &tooltip)
DocMermaidFile(DocParser *parser, DocNodeVariant *parent, const DString &name, const DString &context, const DString &srcFile, int srcLine)
DocMscFile(DocParser *parser, DocNodeVariant *parent, const DString &name, const DString &context, const DString &srcFile, int srcLine)
DocNode(DocParser *parser, DocNodeVariant *parent)
void setInsidePreformatted(bool p)
DocNodeVariant * thisVariant()
DocNodeVariant * parent()
void move_append(DocNodeList &l)
moves the element of list l at the end of this list.
void append(Args &&... args)
Append a new DocNodeVariant to the list by constructing it with type T and parameters Args.
T * get_last()
Returns a pointer to the last element in the list if that element exists and holds a T,...
Node representing an block of paragraphs.
Node representing a paragraph in the documentation tree.
void handleFile(const DString &cmdName)
void handleShowDate(char cmdChar, const DString &cmdName)
DocPara(DocParser *parser, DocNodeVariant *parent)
void handleIncludeOperator(const DString &cmdName, DocIncOperator::Type t)
void handleLink(const DString &cmdName, bool isJavaLink)
Token handleCommand(char cmdChar, const DString &cmdName)
void handleInclude(const DString &cmdName, DocInclude::Type t)
Token handleHtmlEndTag(const DString &tagName)
Token handleHtmlStartTag(const DString &tagName, const HtmlAttribList &tagHtmlAttribs)
void markFirst(bool v=true)
Token handleSimpleSection(DocSimpleSect::Type t, bool xmlContext=false)
void handleEmoji(char cmdChar, const DString &cmdName)
Token handleParamSection(const DString &cmdName, DocParamSect::Type t, bool xmlContext, int direction)
void setAttribs(const HtmlAttribList &attribs)
void handleSection(char cmdChar, const DString &cmdName)
void markLast(bool v=true)
void handleDoxyConfig(char cmdChar, const DString &cmdName)
bool injectToken(Token tok, const DString &tokText)
Token handleHtmlHeader(const HtmlAttribList &tagHtmlAttribs, int level)
void markFirst(bool b=true)
void markLast(bool b=true)
Token parse(const DString &cmdName)
DocParamSect::Type m_type
Token parseXml(const DString ¶mName)
Node representing a parameter section.
Token parse(const DString &cmdName, bool xmlContext, Direction d)
friend class DocParamList
void handleIFile(char cmdChar, const DString &cmdName)
void handlePendingStyleCommands(DocNodeVariant *parent, DocNodeList &children, size_t numberOfElementsToClose=0)
void handleInternalRef(DocNodeVariant *parent, DocNodeList &children)
void readTextFileByName(const DString &file, DString &text)
void errorHandleDefaultToken(DocNodeVariant *parent, Token tok, DocNodeList &children, const DString &txt)
void handleRef(DocNodeVariant *parent, DocNodeList &children, char cmdChar, const DString &cmdName)
Token handleAHref(DocNodeVariant *parent, DocNodeList &children, const HtmlAttribList &tagHtmlAttribs)
void handleStyleEnter(DocNodeVariant *parent, DocNodeList &children, DocStyleChange::Style s, const DString &tagName, const HtmlAttribList *attribs)
void handleParameterType(DocNodeVariant *parent, DocNodeList &children, const DString ¶mTypes)
bool defaultHandleToken(DocNodeVariant *parent, Token &tok, DocNodeList &children, bool handleWord=true)
void handleInitialStyleCommands(DocNodeVariant *parent, DocNodeList &children)
Token handleStyleArgument(DocNodeVariant *parent, DocNodeList &children, const DString &cmdName)
void handleStyleLeave(DocNodeVariant *parent, DocNodeList &children, DocStyleChange::Style s, const DString &tagName)
void defaultHandleTitleAndSize(const CommandType cmd, DocNodeVariant *parent, DocNodeList &children, DString &width, DString &height)
void handleImage(DocNodeVariant *parent, DocNodeList &children)
void handleLinkedWord(DocNodeVariant *parent, DocNodeList &children, bool ignoreAutoLinkFlag=false, bool typeLinkOnly=false)
void handleCite(DocNodeVariant *parent, DocNodeList &children)
void handlePrefix(DocNodeVariant *parent, DocNodeList &children)
void handleILine(char cmdChar, const DString &cmdName)
Token internalValidatingParseDoc(DocNodeVariant *parent, DocNodeList &children, const DString &doc)
void handleAnchor(DocNodeVariant *parent, DocNodeList &children)
void handleImg(DocNodeVariant *parent, DocNodeList &children, const HtmlAttribList &tagHtmlAttribs)
void handleUnclosedStyleCommands()
DocPlantUmlFile(DocParser *parser, DocNodeVariant *parent, const DString &name, const DString &context, const DString &srcFile, int srcLine)
Node representing a reference to some item.
SectionType m_sectionType
void parse(char cmdChar, const DString &cmdName)
DocRef(DocParser *parser, DocNodeVariant *parent, const DString &target, const DString &context)
Node representing a reference to a section.
DocSecRefItem(DocParser *parser, DocNodeVariant *parent, const DString &target)
Node representing a list of section references.
Node representing a normal section.
std::unique_ptr< DocNodeVariant > m_title
DocSection(DocParser *parser, DocNodeVariant *parent, int level, const DString &id)
const DocNodeVariant * title() const
Node representing a simple list.
Node representing a simple list item.
std::unique_ptr< DocNodeVariant > m_paragraph
DocSimpleListItem(DocParser *parser, DocNodeVariant *parent)
Node representing a simple section.
DString typeString() const
Token parse(bool userTitle, bool needsSeparator)
DocSimpleSect(DocParser *parser, DocNodeVariant *parent, Type t)
const DocNodeVariant * title() const
void appendLinkWord(const DString &word)
std::unique_ptr< DocNodeVariant > m_title
Node representing a separator between two simple sections of the same type.
Node representing a style change.
const char * styleString() const
Node representing a special symbol.
static HtmlEntityMapper::SymType decodeSymbol(const DString &symName)
Node representing a simple section title.
void parseFromString(DocNodeVariant *, const DString &title)
void setStateILiteralOpt()
void unputString(const DString &tag)
void setStateMermaidOpt()
void setStatePlantUMLOpt()
void setInsidePre(bool b)
void pushBackHtmlTag(const DString &tag)
void setStateDoxyConfig()
void setStateQuotedString()
Node representing a URL (or email address).
Node representing a verbatim, unparsed text fragment.
std::unique_ptr< Private > p
DString exampleFile() const
void setEngine(const DString &e)
DocVerbatim(DocParser *parser, DocNodeVariant *parent, const DString &context, const DString &text, Type t, bool isExample, const DString &exampleFile, bool isBlock=false, const DString &lang=DString())
Node representing a VHDL flow chart.
DocVhdlFlow(DocParser *parser, DocNodeVariant *parent)
Node representing some amount of white space.
Node representing a word.
DocWord(DocParser *parser, DocNodeVariant *parent, const DString &word)
Node representing an item of a cross-referenced list.
DocXRefItem(DocParser *parser, DocNodeVariant *parent, int id, const DString &key)
static FileNameLinkedMap * plantUmlFileNameLinkedMap
static FileNameLinkedMap * dotFileNameLinkedMap
static NamespaceDefMutable * globalScope
static FileNameLinkedMap * mscFileNameLinkedMap
static FileNameLinkedMap * mermaidFileNameLinkedMap
static FileNameLinkedMap * diaFileNameLinkedMap
static PageLinkedMap * pageLinkedMap
static DString htmlFileExtension
static DirLinkedMap * dirLinkedMap
static SearchIndexIntf searchIndex
static EmojiEntityMapper & instance()
Returns the one and only instance of the Emoji entity mapper.
int symbol2index(const std::string &symName) const
Returns a code for the requested Emoji entity name.
A model of a file symbol.
virtual DString absFilePath() const =0
DString showFileDefMatches(const DString &n) const
Returns a list of file definitions in fnMap that match the file name n.
FileDef * findFileDef(const DString &n, bool &ambig) const
Returns the file definition in fnMap that matches the file name n.
void clear()
clears the contents
size_t size() const
returns the number of elements
iterator end()
returns an iterator to the end
T & back()
access the last element
void pop_back()
removes the last element
bool empty() const
checks whether the container is empty
void emplace_back(Args &&...args)
Class representing a list of HTML attributes.
SymType name2sym(const DString &symName) const
Give code of the requested HTML entity name.
static HtmlEntityMapper & instance()
Returns the one and only instance of the HTML entity mapper.
const T * find(const std::string &key) const
A model of a class/file/namespace member symbol.
virtual DString objCMethodName(bool localLink, bool showStatic) const =0
virtual const ClassDef * getClassDef() const =0
virtual const MemberDef * reimplements() const =0
A model of a page symbol.
virtual bool hasParentPage() const =0
static bool isEnabled()
Returns true if doxygen has been configured to run PlantUML, i.e.
This struct represents an item in the list of references.
List of cross-referenced items.
DString sectionTitle() const
RefItem * find(int itemId)
static RefListManager & instance()
class that provide information about a section.
static SectionManager & instance()
returns a reference to the singleton
static constexpr int Anchor
static constexpr int Table
constexpr int level() const
static constexpr int Requirement
static constexpr int Page
bool is(TokenRetval rv) const
TOKEN_SPECIFICATIONS RETVAL_SPECIFICATIONS const char * to_string() const
TokenRetval value() const
bool is_any_of(ARGS... args) const
char command_to_char() const
virtual DString trDetails()=0
virtual DString trWriteList(int numEntries)=0
static void createFlowChart(const MemberDef *)
Class representing a regular expression.
Class to iterate through matches.
#define Config_getList(name)
#define Config_getBool(name)
std::unordered_set< std::string > StringUnorderedSet
std::multiset< std::string > StringMultiSet
std::vector< std::string > StringVector
DString formatDateTime(const DString &format, const std::tm &dt, int &formatUsed)
Return a string representation for a given std::tm value that is formatted according to the pattern g...
DString dateTimeFromString(const DString &spec, std::tm &dt, int &format)
Returns the filled in std::tm for a given string representing a date and/or time.
constexpr const char * SF_bit2str(int bitNumber)
Helper function that returns the name related one of the SF bits.
constexpr int SF_NumBits
number of bits in SF vector
DirIterator end(const DirIterator &) noexcept
#define AUTO_TRACE_ADD(...)
static const char * g_sectionLevelToName[]
static const StringUnorderedSet g_plantumlEngine
#define INTERNAL_ASSERT(x)
static void flattenParagraphs(DocNodeVariant *root, DocNodeList &children)
static Token skipSpacesForTable(DocParser *parser)
#define AUTO_TRACE_EXIT(...)
static bool findAttribute(const HtmlAttribList &tagHtmlAttribs, const char *attrName, DString *result)
std::vector< ActiveRowSpan > RowSpanList
List of ActiveRowSpan classes.
static void setParent(DocNodeVariant *n, DocNodeVariant *newParent)
static void unescapeCRef(DString &s)
static bool checkIfHtmlEndTagEndsAutoList(DocParser *parser, const DocNodeVariant *n)
static DString stripKnownExtensions(const DString &text)
constexpr bool holds_one_of_alternatives(const DocNodeVariant &v)
returns true iff v holds one of types passed as template parameters
std::variant< DocWord, DocLinkedWord, DocURL, DocLineBreak, DocHorRuler, DocAnchor, DocCite, DocStyleChange, DocSymbol, DocEmoji, DocWhiteSpace, DocSeparator, DocVerbatim, DocInclude, DocIncOperator, DocFormula, DocIndexEntry, DocAutoList, DocAutoListItem, DocTitle, DocXRefItem, DocImage, DocDotFile, DocMscFile, DocDiaFile, DocVhdlFlow, DocLink, DocRef, DocInternalRef, DocHRef, DocHtmlHeader, DocHtmlDescTitle, DocHtmlDescList, DocSection, DocSecRefItem, DocSecRefList, DocInternal, DocParBlock, DocSimpleList, DocHtmlList, DocSimpleSect, DocSimpleSectSep, DocParamSect, DocPara, DocParamList, DocSimpleListItem, DocHtmlListItem, DocHtmlDescData, DocHtmlCell, DocHtmlCaption, DocHtmlRow, DocHtmlTable, DocHtmlBlockQuote, DocText, DocRoot, DocHtmlDetails, DocHtmlSummary, DocPlantUmlFile, DocMermaidFile > DocNodeVariant
DocNodeList * call_method_children(DocNodeVariant *v)
constexpr DocNodeVariant * parent(DocNodeVariant *n)
returns the parent node of a given node n or nullptr if the node has no parent.
std::unique_ptr< DocNodeVariant > createDocNode(Args &&...args)
Private header shared between docparser.cpp and docnode.cpp.
bool insideUL(const DocNodeVariant *n)
bool insideTable(const DocNodeVariant *n)
IterableStack< const DocNodeVariant * > DocStyleChangeStack
bool insidePRE(const DocNodeVariant *n)
bool insideLI(const DocNodeVariant *n)
bool insideDL(const DocNodeVariant *n)
bool insideBlockQuote(const DocNodeVariant *n)
bool insideDetails(const DocNodeVariant *n)
bool insideOL(const DocNodeVariant *n)
DString substitute(const DString &s, const DString &src, const DString &dst)
substitute all occurrences of src in s by dst
const char * qPrint(const char *s)
FileDef * toFileDef(Definition *d)
GroupDef * toGroupDef(Definition *d)
Translator * theTranslator
DString markdownFileNameToId(const DString &fileName)
processes string s and converts markdown into doxygen/html commands.
MemberDef * toMemberDef(Definition *d)
#define warn(file, line, fmt,...)
#define warn_doc_error(file, line, fmt,...)
const Mapper< HtmlTagType > * htmlTagMapper
const Mapper< CommandType > * cmdMapper
DString trunc(const DString &s, size_t numChars=15)
Some helper functions for std::string.
StringVector split(const std::string &s, const std::string &delimiter)
split input string s by string delimiter delimiter.
ActiveRowSpan(uint32_t rows, uint32_t col)
virtual DString text() const =0
virtual DString shortAuthor() const =0
virtual DString label() const =0
virtual DString year() const =0
Parser's context to store all global variables.
StringMultiSet retvalsFound
bool includeFileShowLineNo
DocStyleChangeStack styleStack
StringMultiSet paramsFound
DefinitionStack copyStack
const MemberDef * memberDef
DString stripLeadingAndTrailingEmptyLines(const DString &s, int &docLine)
Special version of DString::stripWhiteSpace() that only strips completely blank lines.
bool resolveLink(const DString &scName, const DString &lr, bool, const Definition **resContext, DString &resAnchor, SrcLangExt lang, const DString &prefix)
DString convertNameToFile(const DString &name, bool allowDots, bool allowUnderscore)
DString stripScope(const DString &name)
SrcLangExt getLanguageFromFileName(const DString &fileName, SrcLangExt defLang)
DString linkToText(SrcLangExt lang, const DString &link, bool ignoreDots)
DString stripIndentation(const DString &s, bool skipFirstLine)
A bunch of utility functions.