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"
100 const char *p = s.
data();
106 if (c==
'{') c=
'<';
else if (c==
'}') c=
'>';
135 std::visit([&](
auto &&x)->
decltype(
auto) {
return x.setParent(newParent); }, *n);
179 size_t len=locSymName.
length();
182 if (locSymName.
at(len-1)!=
':') locSymName.
append(
":");
183 if (locSymName.
at(0)!=
':') locSymName.
prepend(
":");
201 Doxygen::searchIndex.addWord(word,false);
218 Doxygen::searchIndex.addWord(word,false);
234 if (
id.left(anchorPrefix.
length()) == anchorPrefix)
324 parser()->tokenizer.getLineNr(),
325 "block marked with {} for \\snippet should appear twice in file {}, found it {:d} times",
339 "No previous '\\include' or '\\dontinclude' command for '\\{}' present",
350 size_t so = o, bo = 0;
351 bool nonEmpty =
false;
364 else if (!isspace(
static_cast<uint8_t
>(c)))
394 else if (!isspace(
static_cast<uint8_t
>(c)))
427 else if (!isspace(
static_cast<uint8_t
>(c)))
458 else if (!isspace(
static_cast<uint8_t
>(c)))
502 if (
parser()->context.memberDef &&
parser()->context.memberDef->name().at(0)==
'@')
560 while (!tok.
is_any_of(TokenRetval::TK_NONE, TokenRetval::TK_EOF))
574 if (sec==
nullptr &&
parser()->context.lang==SrcLangExt::Markdown)
636 while (!tok.
is_any_of(TokenRetval::TK_NONE, TokenRetval::TK_EOF))
638 if (tok.
is_any_of(TokenRetval::TK_COMMAND_AT, TokenRetval::TK_COMMAND_BS))
645 if (!tok.
is(TokenRetval::TK_WHITESPACE))
651 if (!tok.
is_any_of(TokenRetval::TK_WORD,TokenRetval::TK_LNKWORD))
665 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Illegal command '{:c}{}' as part of a \\secreflist",
670 else if (tok.
is(TokenRetval::TK_WHITESPACE))
676 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Unexpected token {} inside section reference list",
690 size_t i=ref.
find(
'#');
708 while (!tok.
is_any_of(TokenRetval::TK_NONE, TokenRetval::TK_EOF))
727 AUTO_TRACE(
"target='{}',context='{}'",target,context);
792 m_file = dd->getOutputFileBase();
800 bool isFile = compound ?
805 if (compound && lang==SrcLangExt::Markdown) lang = compound->
getLanguage();
846 toFileDef(compound)->generateSourceFile()
866 for (
auto &&elem : elements)
876 for (
auto &dn : children)
878 DocPara *para = std::get_if<DocPara>(&dn);
890 for (
auto &cn : children)
897 for (
auto &ccn : *opt_children)
909 char cmdCharStr[2] = { cmdChar, 0 };
912 while (!tok.
is_any_of(TokenRetval::TK_NONE, TokenRetval::TK_EOF))
918 case TokenRetval::TK_HTMLTAG:
931 if (
parser()->context.insideHtmlLink)
936 "Potential recursion while resolving {:c}{} command!",cmdChar,cmdName);
963 if (numBibFiles>0 && cite && !cite->
text().
empty())
976 else if (cite==
nullptr)
995 if (!opt.noPar()) txt +=
"[";
999 if (opt.isNumber()) txt += citeInfo->
text();
1000 else if (opt.isShortAuthor()) txt += citeInfo->
shortAuthor();
1001 else if (opt.isYear()) txt += citeInfo->
year();
1004 if (!opt.noPar()) txt +=
"]";
1019 m_refText = m_refText.mid(1);
1033 (
toFileDef(compound))->generateSourceFile()
1055 while (!tok.
is_any_of(TokenRetval::TK_NONE, TokenRetval::TK_EOF))
1059 switch (tok.
value())
1061 case TokenRetval::TK_COMMAND_AT:
1063 case TokenRetval::TK_COMMAND_BS:
1079 case TokenRetval::TK_SYMBOL:
1080 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Unsupported symbol '{}' found as part of a \\link",
1081 parser()->context.token->name);
1083 case TokenRetval::TK_HTMLTAG:
1084 if (
parser()->context.token->name!=
"see" || !isXmlLink)
1086 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Unexpected xml/html command {} found as part of a \\link",
1087 parser()->context.token->name);
1090 case TokenRetval::TK_LNKWORD:
1091 case TokenRetval::TK_WORD:
1106 result=w.
right(l-p-1);
1120 if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
1123 parser()->tokenizer.getLineNr(),
1124 "Unexpected end of comment while inside link command");
1154 if (fd==
nullptr && !
p->name.endsWith(
".dot"))
1165 "Possible candidates:\n{}",
p->name,
1173 "in any of the paths specified via DOTFILE_DIRS!",
p->name);
1192 if (fd==
nullptr && !
p->name.endsWith(
".msc"))
1203 "Possible candidates:\n{}",
p->name,
1211 "in any of the paths specified via MSCFILE_DIRS!",
p->name);
1232 if (fd==
nullptr && !
p->name.endsWith(
".dia"))
1243 "Possible candidates:\n{}",
p->name,
1251 "in any of the paths specified via DIAFILE_DIRS!",
p->name);
1271 if (fd==
nullptr && !
p->name.endsWith(
".puml"))
1274 if (fd==
nullptr && !
p->name.endsWith(
".pu"))
1286 "Possible candidates:\n{}",
p->name,
1294 "in any of the paths specified via PLANTUMLFILE_DIRS!",
p->name);
1315 if (fd==
nullptr && !
p->name.endsWith(
".mmd"))
1326 "Possible candidates:\n{}",
p->name,
1334 "in any of the paths specified via MERMAIDFILE_DIRS!",
p->name);
1352 while (!tok.
is_any_of(TokenRetval::TK_NONE, TokenRetval::TK_EOF))
1379 DString locName =
p->url.empty() ?
p->name :
p->url;
1380 size_t len = locName.
length();
1381 size_t fnd = locName.
find(
'?');
1383 return fnd>=4 && locName.
mid(fnd-4,4)==
".svg";
1397 Token retval(TokenRetval::RetVal_OK);
1401 while (!tok.
is_any_of(TokenRetval::TK_NONE, TokenRetval::TK_EOF))
1405 switch (tok.
value())
1407 case TokenRetval::TK_HTMLTAG:
1466 if (!
parser()->context.token->endTag)
1477 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Unexpected html tag <{}{}> found within <h{:d}> context",
1484 snprintf(tmp,20,
"<h%d> tag",
m_level);
1490 if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
1507 while (!tok.
is_any_of(TokenRetval::TK_NONE, TokenRetval::TK_EOF))
1510 if (tok.
value()==TokenRetval::TK_HTMLTAG &&
1512 parser()->context.token->endTag
1517 else if (tok.
is_any_of(TokenRetval::TK_COMMAND_AT, TokenRetval::TK_COMMAND_BS) &&
1530 if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
1542 Token retval(TokenRetval::TK_NONE);
1552 if (isFirst) { par->
markFirst(); isFirst=
false; }
1553 retval=par->
parse();
1555 while (retval.
is(TokenRetval::TK_NEWPARA));
1558 if (retval.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
1560 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"unexpected end of comment while inside <details> block");
1571 return retval.
is(TokenRetval::RetVal_EndHtmlDetails) ? Token::make_RetVal_OK() : retval;
1587 Token retval(TokenRetval::RetVal_OK);
1591 while (!tok.
is_any_of(TokenRetval::TK_NONE, TokenRetval::TK_EOF))
1595 switch (tok.
value())
1597 case TokenRetval::TK_HTMLTAG:
1610 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Unexpected html tag <{}{}> found within <a href=...> context",
1611 parser()->context.token->endTag?
"/":
"",
parser()->context.token->name);
1622 if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
1625 " <a href=...> tag");
1637 Token retval(TokenRetval::RetVal_OK);
1647 if (isFirst) { par->markFirst(); isFirst=
false; }
1648 retval=par->parse();
1651 if (lastPar) lastPar->
markLast(
false);
1658 if (retval.
is(TokenRetval::TK_LISTITEM))
1662 }
while (!retval.
is_any_of(TokenRetval::TK_NONE, TokenRetval::TK_EOF,
1663 TokenRetval::RetVal_Section, TokenRetval::RetVal_Subsection, TokenRetval::RetVal_Subsubsection,
1664 TokenRetval::RetVal_Paragraph, TokenRetval::RetVal_SubParagraph, TokenRetval::RetVal_SubSubParagraph,
1665 TokenRetval::RetVal_EndInternal));
1669 while ((level==1 && retval.
is(TokenRetval::RetVal_Section)) ||
1670 (level==2 && retval.
is(TokenRetval::RetVal_Subsection)) ||
1671 (level==3 && retval.
is(TokenRetval::RetVal_Subsubsection)) ||
1672 (level==4 && retval.
is(TokenRetval::RetVal_Paragraph)) ||
1673 (level==5 && retval.
is(TokenRetval::RetVal_SubParagraph)) ||
1674 (level==6 && retval.
is(TokenRetval::RetVal_SubSubParagraph))
1683 if (retval.
is(TokenRetval::RetVal_Internal))
1685 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"\\internal command found inside internal section");
1697 Token retval(TokenRetval::RetVal_OK);
1700 if (!tok.
is(TokenRetval::TK_WHITESPACE))
1708 while (!tok.
is_any_of(TokenRetval::TK_NONE, TokenRetval::TK_EOF))
1710 switch (tok.
value())
1712 case TokenRetval::TK_WHITESPACE:
1715 case TokenRetval::TK_WORD:
1716 case TokenRetval::TK_LNKWORD:
1719 case TokenRetval::TK_SYMBOL:
1741 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Unexpected symbol '{}' found as argument of \\addindex",
parser()->context.token->name);
1746 case TokenRetval::TK_COMMAND_AT:
1748 case TokenRetval::TK_COMMAND_BS:
1770 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Unexpected command {} found as argument of \\addindex",
1771 parser()->context.token->name);
1795 for (
const auto &opt :
attribs)
1797 if (opt.name==
"id" && !opt.value.empty())
1822 Token retval = Token::make_TK_NONE();
1825 while (!tok.
is_any_of(TokenRetval::TK_NONE, TokenRetval::TK_EOF))
1829 switch (tok.
value())
1831 case TokenRetval::TK_HTMLTAG:
1836 retval = Token::make_RetVal_OK();
1841 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Unexpected html tag <{}{}> found within <caption> context",
1842 parser()->context.token->endTag?
"/":
"",
parser()->context.token->name);
1846 case TokenRetval::TK_COMMAND_AT:
1848 case TokenRetval::TK_COMMAND_BS:
1851 bool isJavaLink=
false;
1857 if (!tok.
is(TokenRetval::TK_WHITESPACE))
1866 if (!tok.
is(TokenRetval::TK_WORD))
1868 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"unexpected token {} as the argument of '{:c}{}' command",
1886 if (!tok.
is(TokenRetval::TK_WHITESPACE))
1895 if (!tok.
is(TokenRetval::TK_WORD))
1897 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"unexpected token {} as the argument of \\{} command",
1905 DString leftOver = lnk->parse(isJavaLink);
1906 if (!leftOver.empty())
1920 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Illegal command '{:c}{}' found as part of a <caption> tag",
1932 if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
1947 Token retval = Token::make_RetVal_OK();
1958 retval=par->
parse();
1959 if (retval.
is(TokenRetval::TK_HTMLTAG))
1964 retval = Token::make_TK_NEWPARA();
1968 retval = Token::make_TK_NEWPARA();
1972 while (retval.
is_any_of(TokenRetval::TK_NEWPARA,TokenRetval::RetVal_EndParBlock));
1981 Token retval = Token::make_RetVal_OK();
1992 retval=par->
parse();
1993 if (retval.
is(TokenRetval::TK_HTMLTAG))
1998 retval = Token::make_TK_NEWPARA();
2002 retval = Token::make_TK_NEWPARA();
2006 while (retval.
is(TokenRetval::TK_NEWPARA));
2014 for (
const auto &attr :
attribs())
2016 if (attr.name.lower()==
"rowspan")
2018 return attr.value.toUInt();
2026 for (
const auto &attr :
attribs())
2028 if (attr.name.lower()==
"colspan")
2030 return std::max(1u,attr.value.toUInt());
2038 for (
const auto &attr :
attribs())
2042 if (attrName==
"align")
2044 if (attrValue==
"center")
2046 else if (attrValue==
"right")
2050 else if (attrName==
"class" && attrValue.
startsWith(
"markdowntable"))
2052 if (attrValue==
"markdowntableheadcenter")
2054 else if (attrValue==
"markdowntableheadright")
2056 else if (attrValue==
"markdowntableheadleft")
2058 else if (attrValue==
"markdowntableheadnone")
2060 else if (attrValue==
"markdowntablebodycenter")
2062 else if (attrValue==
"markdowntablebodyright")
2064 else if (attrValue==
"markdowntablebodyleft")
2066 else if (attrValue==
"markdowntablebodynone")
2076 for (
const auto &attr :
attribs())
2080 if (attrName==
"valign")
2082 if (attrValue==
"top")
2084 else if (attrValue==
"bottom")
2086 else if (attrValue==
"middle")
2101 const DocHtmlCell *cell = std::get_if<DocHtmlCell>(&n);
2117 while (tok.
is_any_of(TokenRetval::TK_WHITESPACE,TokenRetval::TK_NEWPARA,TokenRetval::TK_HTMLTAG,
2118 TokenRetval::TK_COMMAND_AT,TokenRetval::TK_COMMAND_BS))
2120 if (tok.
is(TokenRetval::TK_HTMLTAG))
2136 else if (tok.
is_any_of(TokenRetval::TK_COMMAND_AT, TokenRetval::TK_COMMAND_BS))
2146 if (!tok.
is(TokenRetval::TK_WORD))
2174 Token retval = Token::make_RetVal_OK();
2183 if (tok.
is(TokenRetval::TK_HTMLTAG))
2196 "found <{}{}> instead!",
parser()->context.token->endTag ?
"/" :
"",
parser()->context.token->name);
2201 else if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
2204 " for a html description title");
2209 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"expected <td> or <th> tag but found {} token instead!",
2223 retval=cell->
parse();
2224 isHeading = retval.
is(TokenRetval::RetVal_TableHCell);
2226 if (retval.
is(TokenRetval::RetVal_EndTableCell))
2232 if (tok.
is(TokenRetval::TK_HTMLTAG))
2235 !
parser()->context.token->endTag)
2237 retval = Token::make_RetVal_TableCell();
2242 if (
parser()->context.token->endTag)
2244 retval = Token::make_RetVal_EndTableRow();
2248 retval = Token::make_RetVal_TableRow();
2253 retval = Token::make_RetVal_EndTable();
2258 "found <{}{}> instead!",
parser()->context.token->endTag ?
"/" :
"",
parser()->context.token->name);
2265 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"expected <td>, <th> or <tr> tag but found {} token instead!",
2271 while (retval.
is_any_of(TokenRetval::RetVal_TableCell,TokenRetval::RetVal_TableHCell));
2281 Token retval = Token::make_RetVal_OK();
2292 if (tok.
is(TokenRetval::TK_HTMLTAG))
2304 "found <{}> instead!",
parser()->context.token->name);
2309 else if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
2312 " for a html description title");
2317 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"expected <td> or <th> tag but found {} token instead!",
2330 while (retval.
is_any_of(TokenRetval::RetVal_TableCell,TokenRetval::RetVal_TableHCell));
2354 const DocHtmlRow *row = std::get_if<DocHtmlRow>(&rowNode);
2367 Token retval = Token::make_RetVal_OK();
2374 if (tok.
is(TokenRetval::TK_HTMLTAG))
2380 retval = Token::make_RetVal_TableRow();
2391 retval=std::get<DocHtmlCaption>(*m_caption).parse();
2393 if (retval.
is(TokenRetval::RetVal_OK))
2402 "found <{}{}> instead!",
parser()->context.token->endTag ?
"/" :
"",
parser()->context.token->name);
2405 else if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
2408 " for a <tr> or <caption> tag");
2417 while (retval.
is(TokenRetval::RetVal_TableRow))
2422 if (retval.is(TokenRetval::RetVal_EndTableRow))
2430 retval = Token::make_RetVal_TableRow();
2434 retval = Token::make_RetVal_EndTable();
2436 else if (retval.is(TokenRetval::TK_HTMLTAG))
2439 "found <{}> instead!",
parser()->context.token->name);
2445 "found token {} instead!",retval.to_string());
2446 retval=Token::make_RetVal_OK();
2454 return retval.
is(TokenRetval::RetVal_EndTable) ? Token::make_RetVal_OK() : retval;
2460 Token retval = Token::make_RetVal_OK();
2469 bool isHeader=
false;
2470 if (tok.
is(TokenRetval::TK_HTMLTAG))
2475 retval = Token::make_RetVal_TableRow();
2479 retval = Token::make_RetVal_TableRow();
2485 while (retval.
is(TokenRetval::RetVal_TableRow))
2489 retval=tr->parseXml(isHeader);
2524 DocHtmlRow *row = std::get_if<DocHtmlRow>(&rowNode);
2527 for (
auto &cellNode : row->
children())
2529 DocHtmlCell *cell = std::get_if<DocHtmlCell>(&cellNode);
2532 uint32_t rs = cell->
rowSpan();
2533 uint32_t cs = cell->
colSpan();
2535 for (
size_t i=0;i<rowSpans.size();i++)
2537 if (rowSpans[i].rowsLeft>0 &&
2538 rowSpans[i].column==colIdx)
2540 colIdx=rowSpans[i].column+1;
2544 if (rs>0) rowSpans.emplace_back(rs,colIdx);
2552 for (
size_t i=0;i<rowSpans.size();i++)
2554 if (rowSpans[i].rowsLeft>0) rowSpans[i].rowsLeft--;
2560 if (colIdx-1>maxCols) maxCols=colIdx-1;
2570 Token retval = Token::make_TK_NONE();
2574 while (!tok.
is_any_of(TokenRetval::TK_NONE, TokenRetval::TK_EOF))
2578 switch (tok.
value())
2580 case TokenRetval::TK_COMMAND_AT:
2582 case TokenRetval::TK_COMMAND_BS:
2585 bool isJavaLink=
false;
2591 if (!tok.
is(TokenRetval::TK_WHITESPACE))
2600 if (!tok.
is(TokenRetval::TK_WORD))
2602 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"unexpected token {} as the argument of '{:c}{}' command",
2620 if (!tok.
is(TokenRetval::TK_WHITESPACE))
2629 if (!tok.
is(TokenRetval::TK_WORD))
2631 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"unexpected token {} as the argument of \\{} command",
2639 DString leftOver = lnk->parse(isJavaLink);
2640 if (!leftOver.empty())
2654 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Illegal command '{:c}{}' found as part of a <dt> tag",
2659 case TokenRetval::TK_SYMBOL:
2660 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Unsupported symbol '{}' found as part of a <dt> tag",
2661 parser()->context.token->name);
2663 case TokenRetval::TK_HTMLTAG:
2668 retval = Token::make_RetVal_DescData();
2678 retval = Token::make_RetVal_DescTitle();
2683 retval = Token::make_RetVal_EndDesc();
2688 if (!
parser()->context.token->endTag)
2699 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Unexpected html tag <{}{}> found within <dt> context",
2700 parser()->context.token->endTag?
"/":
"",
parser()->context.token->name);
2712 if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
2729 Token retval = Token::make_TK_NONE();
2738 if (isFirst) { par->
markFirst(); isFirst=
false; }
2739 retval=par->
parse();
2741 while (retval.
is(TokenRetval::TK_NEWPARA));
2752 Token retval = Token::make_RetVal_OK();
2760 if (tok.
is(TokenRetval::TK_HTMLTAG))
2770 "found <{}> instead!",
parser()->context.token->name);
2775 else if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
2778 " for a html description title");
2795 if (retval.is(TokenRetval::RetVal_DescData))
2798 while (retval.is(TokenRetval::RetVal_DescData))
2805 else if (!retval.is(TokenRetval::RetVal_DescTitle))
2810 }
while (retval.
is(TokenRetval::RetVal_DescTitle));
2812 if (retval.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
2814 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"unexpected end of comment while inside <dl> block");
2819 return retval.
is(TokenRetval::RetVal_EndDesc) ? Token::make_RetVal_OK() : retval;
2827 Token retval = Token::make_TK_NONE();
2837 if (isFirst) { par->
markFirst(); isFirst=
false; }
2838 retval=par->
parse();
2840 while (retval.
is(TokenRetval::TK_NEWPARA));
2850 Token retval = Token::make_TK_NONE();
2860 if (isFirst) { par->
markFirst(); isFirst=
false; }
2861 retval=par->
parse();
2862 if (retval.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
break;
2866 if (retval.
is(TokenRetval::RetVal_ListItem))
2871 while (!retval.
is(TokenRetval::RetVal_CloseXml));
2884 Token retval = Token::make_RetVal_OK();
2893 if (tok.
is(TokenRetval::TK_HTMLTAG))
2902 ) &&
parser()->context.token->endTag
2908 retval = Token::make_RetVal_EndList();
2916 "found <{}{}> instead!",
parser()->context.token->endTag?
"/":
"",
parser()->context.token->name);
2921 else if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
2926 " for a html list item");
2943 }
while (retval.
is(TokenRetval::RetVal_ListItem));
2945 if (retval.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
2947 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"unexpected end of comment while inside <{:c}l> block",
2953 return retval.
is(TokenRetval::RetVal_EndList) ? Token::make_RetVal_OK() : retval;
2959 Token retval = Token::make_RetVal_OK();
2968 if (tok.
is(TokenRetval::TK_HTMLTAG))
2979 "found <{}> instead!",
parser()->context.token->name);
2984 else if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
2987 " for a html list item");
3001 retval=li->parseXml();
3002 if (retval.is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
break;
3004 }
while (retval.
is(TokenRetval::RetVal_ListItem));
3006 if (retval.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
3008 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"unexpected end of comment while inside <list type=\"{}\"> block",
3014 return (retval.
is_any_of(TokenRetval::RetVal_EndList,TokenRetval::RetVal_CloseXml) ||
parser()->context.token->name==
"list") ?
3015 Token::make_RetVal_OK() : retval;
3023 Token retval = Token::make_TK_NONE();
3033 if (isFirst) { par->
markFirst(); isFirst=
false; }
3034 retval=par->
parse();
3036 while (retval.
is(TokenRetval::TK_NEWPARA));
3039 if (retval.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
3041 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"unexpected end of comment while inside <blockquote> block");
3045 return retval.
is(TokenRetval::RetVal_EndBlockQuote) ? Token::make_RetVal_OK() : retval;
3053 Token retval = Token::make_TK_NONE();
3063 if (isFirst) { par->
markFirst(); isFirst=
false; }
3064 retval=par->
parse();
3066 while (retval.
is(TokenRetval::TK_NEWPARA));
3070 return retval.
is(TokenRetval::RetVal_EndBlockQuote) ? Token::make_RetVal_OK() : retval;
3097 Token rv = Token::make_TK_NONE();
3103 }
while (rv.
is(TokenRetval::RetVal_ListItem));
3104 return (!rv.
is(TokenRetval::TK_NEWPARA)) ? rv : Token::make_RetVal_OK();
3117 Token retval = Token::make_RetVal_OK();
3127 if (isFirst) { par->markFirst(); isFirst=
false; }
3128 retval=par->parse();
3131 if (lastPar) lastPar->
markLast(
false);
3140 }
while (retval.
is(TokenRetval::TK_NEWPARA) &&
parser()->context.token->indent>
m_indent);
3159 Token retval = Token::make_RetVal_OK();
3166 switch (
parser()->context.token->id)
3188 while (retval.
is(TokenRetval::TK_LISTITEM) &&
3192 (
parser()->context.token->id==-1 ||
parser()->context.token->id>=num)
3209 while (!tok.
is_any_of(TokenRetval::TK_NONE, TokenRetval::TK_EOF))
3241 return m_title && std::get<DocTitle>(*m_title).hasTitle();
3253 std::get_if<DocTitle>(
m_title.get())->parse();
3257 if (!
children().empty() && std::holds_alternative<DocPara>(
children().back()))
3259 std::get<DocPara>(
children().back()).markLast(
false);
3275 Token retval = par->parse();
3295 return Token::make_RetVal_OK();
3303 Token retval = Token::make_RetVal_OK();
3307 if (!
children().empty() && std::holds_alternative<DocPara>(
children().back()))
3309 std::get<DocPara>(
children().back()).markLast(
false);
3321 retval = par->parse();
3322 if (retval.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
break;
3323 if (retval.
is(TokenRetval::RetVal_CloseXml))
3325 retval = Token::make_RetVal_OK();
3337 if (
children().empty() || (p=std::get_if<DocPara>(&
children().back()))==
nullptr)
3359 case See:
return "see";
3360 case Return:
return "return";
3362 case Authors:
return "author";
3363 case Version:
return "version";
3364 case Since:
return "since";
3365 case Date:
return "date";
3366 case Note:
return "note";
3367 case Warning:
return "warning";
3368 case Pre:
return "pre";
3369 case Post:
return "post";
3371 case Invar:
return "invariant";
3372 case Remark:
return "remark";
3375 case User:
return "user";
3376 case Rcs:
return "rcs";
3386 Token retval = Token::make_RetVal_OK();
3389 DString saveCmdName = cmdName;
3394 if (!tok.
is(TokenRetval::TK_WHITESPACE))
3398 retval = Token::make_RetVal_EndParBlock();
3402 tok=tokenizer.
lex();
3403 while (tok.
is(TokenRetval::TK_WORD))
3413 if (
parent() && std::holds_alternative<DocParamSect>(*
parent()))
3415 std::get<DocParamSect>(*
parent()).m_hasTypeSpecifier=
true;
3432 tok=tokenizer.
lex();
3435 if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
3438 "argument of command {}",saveCmdName);
3439 retval = Token::make_RetVal_EndParBlock();
3442 if (!tok.
is(TokenRetval::TK_WHITESPACE))
3444 if (!tok.
is(TokenRetval::TK_NEWPARA))
3447 "argument of command {}",tok.
to_string(),saveCmdName);
3449 retval = Token::make_RetVal_EndParBlock();
3455 retval = par->
parse();
3467 Token retval = Token::make_RetVal_OK();
3488 retval = par->parse();
3510 if (retval.is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
break;
3512 }
while (retval.
is(TokenRetval::RetVal_CloseXml) &&
3517 if (retval.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
3523 retval = Token::make_RetVal_OK();
3535 Token retval = Token::make_RetVal_OK();
3543 if (!
children().empty() && std::holds_alternative<DocParamList>(
children().back()))
3558 retval = pl->parseXml(cmdName);
3562 retval = pl->parse(cmdName);
3564 if (retval.
is(TokenRetval::RetVal_EndParBlock))
3566 retval = Token::make_RetVal_OK();
3585 bool needsSeparator =
false;
3587 (ss=
children().get_last<DocSimpleSect>()) &&
3592 needsSeparator =
true;
3599 Token rv = Token::make_RetVal_OK();
3608 return (!rv.
is(TokenRetval::TK_NEWPARA)) ? rv : Token::make_RetVal_OK();
3613 bool xmlContext=
false,
3619 (ps=
children().get_last<DocParamSect>()) &&
3631 return (!rv.
is(TokenRetval::TK_NEWPARA)) ? rv : Token::make_RetVal_OK();
3639 if (!tok.
is(TokenRetval::TK_WHITESPACE))
3647 if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
3649 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"no emoji name given or unexpected end of comment block while parsing the "
3650 "argument of command '{:c}{}'",cmdChar,cmdName);
3654 else if (!tok.
is(TokenRetval::TK_WORD))
3669 if (!tok.
is(TokenRetval::TK_WHITESPACE))
3677 if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
3679 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"unexpected end of comment block while parsing the "
3680 "argument of command '{:c}{}'",cmdChar,cmdName);
3683 else if (!tok.
is_any_of(TokenRetval::TK_WORD,TokenRetval::TK_LNKWORD))
3693 switch (opt->
kind())
3714 static const reg::Ex marker(R
"(@(\d+))");
3719 for ( ; it!=
end ; ++it)
3721 const auto &match = *it;
3722 size_t newIndex = match.position();
3723 size_t matchLen = match.length();
3724 optionValue += lstFormat.
substr(index,newIndex-index);
3725 unsigned long entryIndex = std::stoul(match[1].str());
3726 if (entryIndex<(
unsigned long)lst->size())
3728 optionValue += lst->at(entryIndex);
3730 index=newIndex+matchLen;
3732 optionValue+=lstFormat.
substr(index);
3737 warn(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Obsolete setting for '{:c}{}': '{}'",
3738 cmdChar,cmdName,
parser()->context.token->name);
3742 "Disabled setting (i.e. not supported in this doxygen executable) for '{:c}{}': '{}'",
3743 cmdChar,cmdName,
parser()->context.token->name);
3749 if (!optionValue.
empty())
3756 warn(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Unknown option for '{:c}{}': '{}'",
3757 cmdChar,cmdName,
parser()->context.token->name);
3767 ASSERT(retval.
is(TokenRetval::TK_WHITESPACE));
3770 if (retval.
is(TokenRetval::RetVal_OK))
3791 if (!tok.
is(TokenRetval::TK_WHITESPACE))
3799 if (!tok.
is(TokenRetval::TK_WORD))
3813 bool specDateOnlyWS = !specDateRaw.
empty() && specDate.
empty();
3814 if (!specDate.
empty() && !tok.
is_any_of(TokenRetval::TK_WORD,TokenRetval::TK_NONE,TokenRetval::TK_EOF))
3816 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"invalid <date_time> argument for command '{:c}{}'",
3827 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"invalid <date_time> argument for command '{:c}{}': {}",
3828 cmdChar,cmdName,
err);
3840 if ((usedFormat&bitMask) && !(specFormat&bitMask))
3842 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.",
3858 DString saveCmdName = cmdName;
3860 if (!tok.
is(TokenRetval::TK_WHITESPACE))
3869 if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
3871 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"unexpected end of comment block while parsing the "
3872 "argument of command {}", saveCmdName);
3875 else if (!tok.
is(TokenRetval::TK_WORD))
3899 (!n1_docIncOp && !n1_docWs) ||
3900 (n1_docWs && n2 && !n2_docIncOp);
3905 n1_docIncOp->markLast(
false);
3907 else if (n1_docWs && n2_docIncOp)
3918 DString saveCmdName = cmdName;
3920 if (!tok.
is(TokenRetval::TK_WHITESPACE))
3929 if (!tok.
is(TokenRetval::TK_WORD))
3956 AUTO_TRACE(
"cmdName={} isJavaLink={}",cmdName,isJavaLink);
3957 DString saveCmdName = cmdName;
3959 if (!tok.
is(TokenRetval::TK_WHITESPACE))
3967 if (!tok.
is(TokenRetval::TK_WORD))
3973 if (saveCmdName ==
"javalink")
3982 if (saveCmdName ==
"javalink")
3988 DString leftOver = lnk->parse(isJavaLink);
3989 if (!leftOver.
empty())
3998 DString saveCmdName = cmdName;
4000 bool isBlock =
false;
4001 bool trimLeft =
false;
4002 bool localScope =
false;
4004 if (tok.
is(TokenRetval::TK_WORD) &&
parser()->context.token->name==
"{")
4010 auto contains = [&optList](
const char *kw)
4012 return std::find(optList.begin(),optList.end(),kw)!=optList.end();
4014 localScope = contains(
"local");
4015 if (contains(
"nostrip"))
4017 stripCodeComments =
false;
4019 else if (contains(
"strip"))
4021 stripCodeComments =
true;
4028 if (contains(
"lineno"))
4035 if (!tok.
is(TokenRetval::TK_WHITESPACE))
4042 else if (tok.
is(TokenRetval::TK_WORD) &&
parser()->context.token->name==
"[")
4050 else if (!tok.
is(TokenRetval::TK_WHITESPACE))
4059 if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
4061 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"unexpected end of comment block while parsing the "
4062 "argument of command {}",saveCmdName);
4065 else if (!tok.
is(TokenRetval::TK_WORD))
4079 if (!tok.
is(TokenRetval::TK_WORD))
4081 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"expected block identifier, but found token {} instead while parsing the {} command",
4096 blockId,isBlock,trimLeft);
4103 DString saveCmdName = cmdName;
4106 if (!tok.
is(TokenRetval::TK_WHITESPACE))
4109 cmdChar,saveCmdName);
4113 if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
4115 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"unexpected end of comment block while parsing the "
4116 "argument of command '{:c}{}'", cmdChar,saveCmdName);
4119 else if (!tok.
is_any_of(TokenRetval::TK_WORD,TokenRetval::TK_LNKWORD))
4136 return retval.is(TokenRetval::RetVal_OK) ? Token::make_TK_NEWPARA() : retval;
4154 if (!lang.
empty() && lang.
at(0)!=
'.')
4158 if (
parser()->context.xmlComment)
4164 while (i<l && (
parser()->context.token->verb.at(i)==
' ' ||
parser()->context.token->verb.at(i)==
'\n'))
4166 if (
parser()->context.token->verb.at(i)==
'\n') li=i+1;
4176 if (retval.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
4187 if (
parser()->context.memberDef)
4193 bool hasParamCommand =
false;
4194 bool hasReturnCommand =
false;
4229 Token retval = Token::make_RetVal_OK();
4235 std::string str{cmdChar};
4239 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Found unexpanded alias '{:c}{}'. Check if number of arguments passed is correct.",cmdChar,cmdName);
4388 retval = Token::make_RetVal_Section();
4394 retval = Token::make_RetVal_Subsection();
4400 retval = Token::make_RetVal_Subsubsection();
4406 retval = Token::make_RetVal_Paragraph();
4412 retval = Token::make_RetVal_SubParagraph();
4418 retval = Token::make_RetVal_SubSubParagraph();
4438 if (retval.is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
4450 if (retval.is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
4462 if (retval.is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
4474 if (retval.is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
4486 if (retval.is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
4498 if (retval.is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
4512 size_t idx = fullMatch.
find(
'{');
4519 for (
const auto &opt : optList)
4521 if (opt.empty())
continue;
4524 if (locOpt ==
"code")
4528 else if (!locOpt.
empty())
4530 warn(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Unknown option '{}' for '\\iliteral'",opt);
4538 if (retval.is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
4546 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"javadoc literal section ended without end marker");
4565 if (retval.is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
4586 dv->setText(
parser()->context.token->verb);
4587 dv->setWidth(width);
4588 dv->setHeight(height);
4589 dv->setLocation(
parser()->context.fileName,
parser()->tokenizer.getLineNr());
4592 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"ignoring \\dot command because HAVE_DOT is not set");
4595 if (retval.is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
4616 dv->setText(
parser()->context.token->verb);
4617 dv->setWidth(width);
4618 dv->setHeight(height);
4619 dv->setLocation(
parser()->context.fileName,
parser()->tokenizer.getLineNr());
4620 if (retval.is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
4634 size_t idx = fullMatch.
find(
'{');
4642 for (
const auto &opt : optList)
4644 if (opt.empty())
continue;
4650 if (!engine.
empty())
4652 warn(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Multiple definition of engine for '\\startuml'");
4659 if (sectionId.
empty())
4665 warn(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Multiple use of filename for '\\startuml'");
4674 if (engine.
empty()) engine =
"uml";
4676 if (sectionId.
empty())
4680 ASSERT(retval.is(TokenRetval::RetVal_OK));
4701 if (engine ==
"ditaa")
4703 dv->setUseBitmap(
true);
4705 else if (engine ==
"uml")
4707 size_t i = trimmedVerb.
find(
'\n');
4711 dv->setText(trimmedVerb);
4712 dv->setWidth(width);
4713 dv->setHeight(height);
4714 dv->setLocation(
parser()->context.fileName,
parser()->tokenizer.getLineNr());
4715 if (!plantumlEnabled)
4717 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"ignoring \\startuml command because neither PLANTUML_JAR_PATH nor PLANTUML_TOOL is set");
4720 if (retval.is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
4733 size_t idx = fullMatch.
find(
'{');
4744 if (sectionId.
empty())
4748 ASSERT(retval.is(TokenRetval::RetVal_OK));
4754 DString mermaidFile(sectionId);
4768 dv->setText(trimmedVerb);
4769 dv->setWidth(width);
4770 dv->setHeight(height);
4771 dv->setLocation(
parser()->context.fileName,
parser()->tokenizer.getLineNr());
4772 if (retval.is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
4780 retval = Token::make_RetVal_EndParBlock();
4841 retval = Token::make_RetVal_Internal();
4844 retval = Token::make_RetVal_EndInternal();
4913 "ignoring \\dotfile command because HAVE_DOT is not set");
5007 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Unexpected command '{}' in paragraph context",cmdName);
5010 INTERNAL_ASSERT(retval.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF,TokenRetval::RetVal_OK,TokenRetval::RetVal_SimpleSec
5011 TokenRetval::TK_LISTITEM,TokenRetval::TK_ENDLIST,TokenRetval::TK_NEWPARA
5012 TokenRetval::RetVal_Section,TokenRetval::RetVal_EndList
5013 TokenRetval::RetVal_Internal,TokenRetval::RetVal_SwitchLang
5014 TokenRetval::RetVal_EndInternal)
5021 const char *attrName,
5025 for (
const auto &opt : tagHtmlAttribs)
5027 if (opt.name==attrName)
5029 *result = opt.value;
5038 AUTO_TRACE(
"tagName={} #tagHtmlAttrs={}",tagName,tagHtmlAttribs.size());
5039 Token retval = Token::make_RetVal_OK();
5045 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"HTML tag ('<{}/>') may not use the 'empty tag' XHTML syntax.",
5051 if (!
parser()->context.token->emptyTag)
5059 if (!
parser()->context.token->emptyTag)
5067 if (
parser()->context.token->emptyTag)
break;
5074 retval = Token::make_RetVal_ListItem();
5096 if (
parser()->context.token->emptyTag)
break;
5097 if (
parser()->context.xmlComment)
5142 if (
parser()->context.token->emptyTag)
break;
5148 retval = Token::make_TK_NEWPARA();
5151 if (!
parser()->context.token->emptyTag)
5160 retval = Token::make_RetVal_DescTitle();
5170 retval = Token::make_RetVal_DescData();
5178 if (!
parser()->context.token->emptyTag)
5186 retval = Token::make_RetVal_TableRow();
5189 retval = Token::make_RetVal_TableCell();
5192 retval = Token::make_RetVal_TableHCell();
5239 if (!
parser()->context.token->emptyTag)
5246 if (!
parser()->context.token->emptyTag)
5256 if (!
parser()->context.token->emptyTag)
5259 while (n && !std::holds_alternative<DocHtmlDetails>(*n)) n=
::parent(n);
5269 retval = Token::make_TK_NEWPARA();
5283 retval = Token::make_TK_NEWPARA();
5289 retval = Token::make_RetVal_TableCell();
5302 if (paramName.
empty())
5359 retval = Token::make_RetVal_TableRow();
5363 retval = Token::make_RetVal_ListItem();
5378 retval = Token::make_RetVal_TableCell();
5392 if (
parser()->context.token->emptyTag)
5405 DString leftOver = lnk->parse(
false,
true);
5406 if (!leftOver.empty())
5424 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Missing 'cref' or 'langword' attribute from <see> tag.");
5452 std::get<DocSimpleSect>(*vss).appendLinkWord(cref);
5453 retval = Token::make_RetVal_OK();
5510 Token retval = Token::make_RetVal_OK();
5520 retval = Token::make_RetVal_EndList();
5530 retval = Token::make_RetVal_EndList();
5546 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"found </details> tag without matching <details>");
5550 retval = Token::make_RetVal_EndHtmlDetails();
5556 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"found </blockquote> tag without matching <blockquote>");
5560 retval = Token::make_RetVal_EndBlockQuote();
5620 retval = Token::make_TK_NEWPARA();
5623 retval = Token::make_RetVal_EndDesc();
5632 retval = Token::make_RetVal_EndTable();
5635 retval = Token::make_RetVal_EndTableRow();
5638 retval = Token::make_RetVal_EndTableCell();
5641 retval = Token::make_RetVal_EndTableCell();
5685 retval = Token::make_TK_NEWPARA();
5699 retval = Token::make_RetVal_CloseXml();
5735 if (!std::get_if<DocAutoListItem>(n))
5743 const auto &docAutoList = std::get_if<DocAutoList>(n);
5746 indent = docAutoList->indent();
5755 const auto &docPara = std::get_if<DocPara>(n);
5761 return std::get<DocStyleChange>(*stack.top());
5771 indentStr.
fill(
' ',indent);
5786 Token retval = Token::make_TK_NONE();
5787 while (!tok.
is_any_of(TokenRetval::TK_NONE, TokenRetval::TK_EOF))
5791 if (tok.
is_any_of(TokenRetval::TK_WORD,TokenRetval::TK_LNKWORD,TokenRetval::TK_SYMBOL,TokenRetval::TK_URL,
5792 TokenRetval::TK_COMMAND_AT,TokenRetval::TK_COMMAND_BS,TokenRetval::TK_HTMLTAG)
5799 case TokenRetval::TK_WORD:
5802 case TokenRetval::TK_LNKWORD:
5805 case TokenRetval::TK_URL:
5808 case TokenRetval::TK_WHITESPACE:
5826 case TokenRetval::TK_LISTITEM:
5830 while (n && !std::holds_alternative<DocAutoList>(*n)) n=
::parent(n);
5831 const DocAutoList *al = std::get_if<DocAutoList>(n);
5838 retval = Token::make_TK_LISTITEM();
5848 al = std::get_if<DocAutoList>(n);
5862 }
while (retval.
is(TokenRetval::TK_LISTITEM) &&
5867 if (retval.
is(TokenRetval::RetVal_SimpleSec))
5873 if (
parser()->context.token->name.startsWith(
"rcs:"))
5877 tok = Token::make_TK_RCSTAG();
5881 tok = Token::make_TK_COMMAND_BS();
5886 else if (retval.
is(TokenRetval::TK_ENDLIST))
5902 case TokenRetval::TK_ENDLIST:
5903 AUTO_TRACE_ADD(
"Found end of list inside of paragraph at line {}",
parser()->tokenizer.getLineNr());
5904 if (std::get_if<DocAutoListItem>(
parent()))
5907 if (al && al->
indent()>=
parser()->context.token->indent)
5910 retval = Token::make_TK_ENDLIST();
5916 "has invalid indent level");
5925 case TokenRetval::TK_COMMAND_AT:
5927 case TokenRetval::TK_COMMAND_BS:
5932 while (n && !std::holds_alternative<DocSimpleSect>(*n) &&
5933 !std::holds_alternative<DocParamSect>(*n))
5944 retval = Token::make_RetVal_SimpleSec();
5950 while (n && !std::holds_alternative<DocSimpleListItem>(*n)) n=
::parent(n);
5955 retval = Token::make_RetVal_ListItem();
5965 if (retval.
is(TokenRetval::RetVal_SimpleSec))
5971 if (
parser()->context.token->name.startsWith(
"rcs:"))
5975 tok = Token::make_TK_RCSTAG();
5979 tok = Token::make_TK_COMMAND_BS();
5984 else if (retval.
value()>TokenRetval::TK_NONE && retval.
value()<TokenRetval::RetVal_OK)
5990 else if (retval.
value()!=TokenRetval::RetVal_OK)
5997 case TokenRetval::TK_HTMLTAG:
5999 if (!
parser()->context.token->endTag)
6011 if (!retval.
is(TokenRetval::RetVal_OK))
6017 case TokenRetval::TK_SYMBOL:
6028 parser()->context.token->name);
6032 case TokenRetval::TK_NEWPARA:
6033 retval = Token::make_TK_NEWPARA();
6035 case TokenRetval::TK_RCSTAG:
6038 while (n && !std::holds_alternative<DocSimpleSect>(*n) &&
6039 !std::holds_alternative<DocParamSect>(*n))
6049 retval = Token::make_RetVal_SimpleSec();
6060 "Found unexpected token (id={})",tok.
to_string());
6065 retval=Token::make_TK_NONE();
6068 DocPara *par = std::get_if<DocPara>(
parser()->context.nodeStack.top());
6069 if (!
parser()->context.token->endTag && par &&
6070 retval.
is(TokenRetval::TK_NEWPARA) &&
parser()->context.token->name.lower() ==
"p")
6074 INTERNAL_ASSERT(retval.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF,TokenRetval::TK_NEWPARA,TokenRetval::TK_LISTITEM,
6075 TokenRetval::TK_ENDLIST,TokenRetval::RetVal_OK)
6087 Token retval = Token::make_RetVal_OK();
6098 if (titleStr.
empty()) titleStr = sec->
label();
6112 if (isFirst) { par->markFirst(); isFirst=
false; }
6113 retval=par->parse();
6116 if (lastPar) lastPar->
markLast(
false);
6123 if (retval.
is(TokenRetval::TK_LISTITEM))
6127 if (retval.
is(TokenRetval::RetVal_Internal))
6131 if (retval.is(TokenRetval::RetVal_EndInternal))
6133 retval = Token::make_RetVal_OK();
6136 }
while (!retval.
is_any_of(TokenRetval::TK_NONE, TokenRetval::TK_EOF, TokenRetval::RetVal_Section, TokenRetval::RetVal_Subsection,
6137 TokenRetval::RetVal_Subsubsection, TokenRetval::RetVal_Paragraph, TokenRetval::RetVal_SubParagraph,
6138 TokenRetval::RetVal_SubSubParagraph, TokenRetval::RetVal_EndInternal)
6145 if (retval.
is(TokenRetval::RetVal_Subsection) &&
m_level<=1)
6148 while (retval.
is(TokenRetval::RetVal_Subsection))
6157 else if (retval.
is(TokenRetval::RetVal_Subsubsection) &&
m_level<=2)
6163 parser()->tokenizer.getLineNr(),
6164 "Unexpected subsubsection command found inside {}!",
6168 while (retval.
is(TokenRetval::RetVal_Subsubsection))
6175 if (!(
m_level < 2 && retval.
is(TokenRetval::RetVal_Subsection)))
break;
6177 else if (retval.
is(TokenRetval::RetVal_Paragraph) &&
m_level<=3)
6183 "Unexpected paragraph command found inside {}!",
6187 while (retval.
is(TokenRetval::RetVal_Paragraph))
6194 if (!(
m_level<3 && (retval.
is_any_of(TokenRetval::RetVal_Subsection,TokenRetval::RetVal_Subsubsection))))
break;
6196 else if (retval.
is(TokenRetval::RetVal_SubParagraph) &&
m_level<=4)
6202 "Unexpected subparagraph command found inside {}!",
6206 while (retval.
is(TokenRetval::RetVal_SubParagraph))
6213 if (!(
m_level<4 && (retval.
is_any_of(TokenRetval::RetVal_Subsection,TokenRetval::RetVal_Subsubsection,TokenRetval::RetVal_Paragraph))))
break;
6215 else if (retval.
is(TokenRetval::RetVal_SubSubParagraph) &&
m_level<=5)
6221 "Unexpected subsubparagraph command found inside {}!",
6225 while (retval.
is(TokenRetval::RetVal_SubSubParagraph))
6232 if (!(
m_level<5 && (retval.
is_any_of( TokenRetval::RetVal_Subsection, TokenRetval::RetVal_Subsubsection,
6233 TokenRetval::RetVal_Paragraph, TokenRetval::RetVal_SubParagraph))))
break;
6242 TokenRetval::RetVal_Section, TokenRetval::RetVal_Subsection,
6243 TokenRetval::RetVal_Subsubsection, TokenRetval::RetVal_Paragraph,
6244 TokenRetval::RetVal_SubParagraph, TokenRetval::RetVal_SubSubParagraph,
6245 TokenRetval::RetVal_Internal, TokenRetval::RetVal_EndInternal)
6261 while (!tok.
is_any_of(TokenRetval::TK_NONE, TokenRetval::TK_EOF))
6265 case TokenRetval::TK_WORD:
6268 case TokenRetval::TK_WHITESPACE:
6271 case TokenRetval::TK_SYMBOL:
6281 parser()->context.token->name);
6285 case TokenRetval::TK_COMMAND_AT:
6287 case TokenRetval::TK_COMMAND_BS:
6349 parser()->context.token->name);
6373 Token retval = Token::make_TK_NONE();
6383 if (isFirst) { par->markFirst(); isFirst=
false; }
6384 retval=par->parse();
6385 if (par->empty() && par->attribs().empty())
6394 auto checkParagraph = [
this,&retval](
Token t,
int level,
const char *sectionType,
const char *parentSectionType) {
6400 parser()->tokenizer.getLineNr(),
6401 "found {} command (id: '{}') outside of {} context!",
6402 sectionType,
parser()->context.token->sectionId,parentSectionType);
6406 if (!
parser()->context.token->sectionId.empty())
6419 sectionType,
parser()->context.token->sectionId,sectionType);
6420 retval = Token::make_TK_NONE();
6425 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Missing id for {}; ignoring {}",sectionType,sectionType);
6426 retval = Token::make_TK_NONE();
6431 checkParagraph(Token::make_RetVal_SubSubParagraph(), 6,
"subsubparagraph",
"subparagraph" );
6432 checkParagraph(Token::make_RetVal_SubParagraph(), 5,
"subparagraph",
"paragraph" );
6433 checkParagraph(Token::make_RetVal_Paragraph(), 4,
"paragraph",
"subsubsection" );
6434 checkParagraph(Token::make_RetVal_Subsubsection(), 3,
"subsubsection",
"subsection" );
6435 checkParagraph(Token::make_RetVal_Subsection(), 2,
"subsection",
"section" );
6437 if (retval.
is(TokenRetval::TK_LISTITEM))
6441 if (retval.
is(TokenRetval::RetVal_Internal))
6446 }
while (!retval.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF,TokenRetval::RetVal_Section));
6451 while (retval.
is(TokenRetval::RetVal_Section))
6453 if (!
parser()->context.token->sectionId.empty())
6466 retval = Token::make_TK_NONE();
6472 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 * inputNameLinkedMap
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 FileDef * currentFileDef(const DocParser *parser)
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, const FileDef *currentFile)
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.