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 "no block identification found in \\snippet command, skipping");
330 parser()->tokenizer.getLineNr(),
331 "block marked with {} for \\snippet should appear twice in file {}, found it {:d} times",
345 "No previous '\\include' or '\\dontinclude' command for '\\{}' present",
356 size_t so = o, bo = 0;
357 bool nonEmpty =
false;
370 else if (!isspace(
static_cast<uint8_t
>(c)))
400 else if (!isspace(
static_cast<uint8_t
>(c)))
433 else if (!isspace(
static_cast<uint8_t
>(c)))
464 else if (!isspace(
static_cast<uint8_t
>(c)))
508 if (
parser()->context.memberDef &&
parser()->context.memberDef->name().at(0)==
'@')
566 while (!tok.
is_any_of(TokenRetval::TK_NONE, TokenRetval::TK_EOF))
580 if (sec==
nullptr &&
parser()->context.lang==SrcLangExt::Markdown)
642 while (!tok.
is_any_of(TokenRetval::TK_NONE, TokenRetval::TK_EOF))
644 if (tok.
is_any_of(TokenRetval::TK_COMMAND_AT, TokenRetval::TK_COMMAND_BS))
651 if (!tok.
is(TokenRetval::TK_WHITESPACE))
657 if (!tok.
is_any_of(TokenRetval::TK_WORD,TokenRetval::TK_LNKWORD))
671 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Illegal command '{:c}{}' as part of a \\secreflist",
676 else if (tok.
is(TokenRetval::TK_WHITESPACE))
682 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Unexpected token {} inside section reference list",
696 size_t i=ref.
find(
'#');
714 while (!tok.
is_any_of(TokenRetval::TK_NONE, TokenRetval::TK_EOF))
733 AUTO_TRACE(
"target='{}',context='{}'",target,context);
798 m_file = dd->getOutputFileBase();
806 bool isFile = compound ?
811 if (compound && lang==SrcLangExt::Markdown) lang = compound->
getLanguage();
852 toFileDef(compound)->generateSourceFile()
872 for (
auto &&elem : elements)
882 for (
auto &dn : children)
884 DocPara *para = std::get_if<DocPara>(&dn);
896 for (
auto &cn : children)
903 for (
auto &ccn : *opt_children)
915 char cmdCharStr[2] = { cmdChar, 0 };
918 while (!tok.
is_any_of(TokenRetval::TK_NONE, TokenRetval::TK_EOF))
924 case TokenRetval::TK_HTMLTAG:
937 if (
parser()->context.insideHtmlLink)
942 "Potential recursion while resolving {:c}{} command!",cmdChar,cmdName);
969 if (numBibFiles>0 && cite && !cite->
text().
empty())
982 else if (cite==
nullptr)
1001 if (!opt.noPar()) txt +=
"[";
1005 if (opt.isNumber()) txt += citeInfo->
text();
1006 else if (opt.isShortAuthor()) txt += citeInfo->
shortAuthor();
1007 else if (opt.isYear()) txt += citeInfo->
year();
1010 if (!opt.noPar()) txt +=
"]";
1025 m_refText = m_refText.mid(1);
1039 (
toFileDef(compound))->generateSourceFile()
1061 while (!tok.
is_any_of(TokenRetval::TK_NONE, TokenRetval::TK_EOF))
1065 switch (tok.
value())
1067 case TokenRetval::TK_COMMAND_AT:
1069 case TokenRetval::TK_COMMAND_BS:
1085 case TokenRetval::TK_SYMBOL:
1086 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Unsupported symbol '{}' found as part of a \\link",
1087 parser()->context.token->name);
1089 case TokenRetval::TK_HTMLTAG:
1090 if (
parser()->context.token->name!=
"see" || !isXmlLink)
1092 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Unexpected xml/html command {} found as part of a \\link",
1093 parser()->context.token->name);
1096 case TokenRetval::TK_LNKWORD:
1097 case TokenRetval::TK_WORD:
1112 result=w.
right(l-p-1);
1126 if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
1129 parser()->tokenizer.getLineNr(),
1130 "Unexpected end of comment while inside link command");
1160 if (fd==
nullptr && !
p->name.endsWith(
".dot"))
1171 "Possible candidates:\n{}",
p->name,
1179 "in any of the paths specified via DOTFILE_DIRS!",
p->name);
1198 if (fd==
nullptr && !
p->name.endsWith(
".msc"))
1209 "Possible candidates:\n{}",
p->name,
1217 "in any of the paths specified via MSCFILE_DIRS!",
p->name);
1238 if (fd==
nullptr && !
p->name.endsWith(
".dia"))
1249 "Possible candidates:\n{}",
p->name,
1257 "in any of the paths specified via DIAFILE_DIRS!",
p->name);
1277 if (fd==
nullptr && !
p->name.endsWith(
".puml"))
1280 if (fd==
nullptr && !
p->name.endsWith(
".pu"))
1292 "Possible candidates:\n{}",
p->name,
1300 "in any of the paths specified via PLANTUMLFILE_DIRS!",
p->name);
1321 if (fd==
nullptr && !
p->name.endsWith(
".mmd"))
1332 "Possible candidates:\n{}",
p->name,
1340 "in any of the paths specified via MERMAIDFILE_DIRS!",
p->name);
1358 while (!tok.
is_any_of(TokenRetval::TK_NONE, TokenRetval::TK_EOF))
1385 DString locName =
p->url.empty() ?
p->name :
p->url;
1386 size_t len = locName.
length();
1387 size_t fnd = locName.
find(
'?');
1389 return fnd>=4 && locName.
mid(fnd-4,4)==
".svg";
1403 Token retval(TokenRetval::RetVal_OK);
1407 while (!tok.
is_any_of(TokenRetval::TK_NONE, TokenRetval::TK_EOF))
1411 switch (tok.
value())
1413 case TokenRetval::TK_HTMLTAG:
1472 if (!
parser()->context.token->endTag)
1483 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Unexpected html tag <{}{}> found within <h{:d}> context",
1490 snprintf(tmp,20,
"<h%d> tag",
m_level);
1496 if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
1513 while (!tok.
is_any_of(TokenRetval::TK_NONE, TokenRetval::TK_EOF))
1516 if (tok.
value()==TokenRetval::TK_HTMLTAG &&
1518 parser()->context.token->endTag
1523 else if (tok.
is_any_of(TokenRetval::TK_COMMAND_AT, TokenRetval::TK_COMMAND_BS) &&
1536 if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
1548 Token retval(TokenRetval::TK_NONE);
1558 if (isFirst) { par->
markFirst(); isFirst=
false; }
1559 retval=par->
parse();
1561 while (retval.
is(TokenRetval::TK_NEWPARA));
1564 if (retval.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
1566 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"unexpected end of comment while inside <details> block");
1577 return retval.
is(TokenRetval::RetVal_EndHtmlDetails) ? Token::make_RetVal_OK() : retval;
1593 Token retval(TokenRetval::RetVal_OK);
1597 while (!tok.
is_any_of(TokenRetval::TK_NONE, TokenRetval::TK_EOF))
1601 switch (tok.
value())
1603 case TokenRetval::TK_HTMLTAG:
1616 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Unexpected html tag <{}{}> found within <a href=...> context",
1617 parser()->context.token->endTag?
"/":
"",
parser()->context.token->name);
1628 if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
1631 " <a href=...> tag");
1643 Token retval(TokenRetval::RetVal_OK);
1653 if (isFirst) { par->markFirst(); isFirst=
false; }
1654 retval=par->parse();
1657 if (lastPar) lastPar->
markLast(
false);
1664 if (retval.
is(TokenRetval::TK_LISTITEM))
1668 }
while (!retval.
is_any_of(TokenRetval::TK_NONE, TokenRetval::TK_EOF,
1669 TokenRetval::RetVal_Section, TokenRetval::RetVal_Subsection, TokenRetval::RetVal_Subsubsection,
1670 TokenRetval::RetVal_Paragraph, TokenRetval::RetVal_SubParagraph, TokenRetval::RetVal_SubSubParagraph,
1671 TokenRetval::RetVal_EndInternal));
1675 while ((level==1 && retval.
is(TokenRetval::RetVal_Section)) ||
1676 (level==2 && retval.
is(TokenRetval::RetVal_Subsection)) ||
1677 (level==3 && retval.
is(TokenRetval::RetVal_Subsubsection)) ||
1678 (level==4 && retval.
is(TokenRetval::RetVal_Paragraph)) ||
1679 (level==5 && retval.
is(TokenRetval::RetVal_SubParagraph)) ||
1680 (level==6 && retval.
is(TokenRetval::RetVal_SubSubParagraph))
1689 if (retval.
is(TokenRetval::RetVal_Internal))
1691 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"\\internal command found inside internal section");
1703 Token retval(TokenRetval::RetVal_OK);
1706 if (!tok.
is(TokenRetval::TK_WHITESPACE))
1714 while (!tok.
is_any_of(TokenRetval::TK_NONE, TokenRetval::TK_EOF))
1716 switch (tok.
value())
1718 case TokenRetval::TK_WHITESPACE:
1721 case TokenRetval::TK_WORD:
1722 case TokenRetval::TK_LNKWORD:
1725 case TokenRetval::TK_SYMBOL:
1747 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Unexpected symbol '{}' found as argument of \\addindex",
parser()->context.token->name);
1752 case TokenRetval::TK_COMMAND_AT:
1754 case TokenRetval::TK_COMMAND_BS:
1776 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Unexpected command {} found as argument of \\addindex",
1777 parser()->context.token->name);
1801 for (
const auto &opt :
attribs)
1803 if (opt.name==
"id" && !opt.value.empty())
1828 Token retval = Token::make_TK_NONE();
1831 while (!tok.
is_any_of(TokenRetval::TK_NONE, TokenRetval::TK_EOF))
1835 switch (tok.
value())
1837 case TokenRetval::TK_HTMLTAG:
1842 retval = Token::make_RetVal_OK();
1847 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Unexpected html tag <{}{}> found within <caption> context",
1848 parser()->context.token->endTag?
"/":
"",
parser()->context.token->name);
1852 case TokenRetval::TK_COMMAND_AT:
1854 case TokenRetval::TK_COMMAND_BS:
1857 bool isJavaLink=
false;
1863 if (!tok.
is(TokenRetval::TK_WHITESPACE))
1872 if (!tok.
is(TokenRetval::TK_WORD))
1874 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"unexpected token {} as the argument of '{:c}{}' command",
1892 if (!tok.
is(TokenRetval::TK_WHITESPACE))
1901 if (!tok.
is(TokenRetval::TK_WORD))
1903 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"unexpected token {} as the argument of \\{} command",
1911 DString leftOver = lnk->parse(isJavaLink);
1912 if (!leftOver.empty())
1926 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Illegal command '{:c}{}' found as part of a <caption> tag",
1938 if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
1953 Token retval = Token::make_RetVal_OK();
1964 retval=par->
parse();
1965 if (retval.
is(TokenRetval::TK_HTMLTAG))
1970 retval = Token::make_TK_NEWPARA();
1974 retval = Token::make_TK_NEWPARA();
1978 while (retval.
is_any_of(TokenRetval::TK_NEWPARA,TokenRetval::RetVal_EndParBlock));
1987 Token retval = Token::make_RetVal_OK();
1998 retval=par->
parse();
1999 if (retval.
is(TokenRetval::TK_HTMLTAG))
2004 retval = Token::make_TK_NEWPARA();
2008 retval = Token::make_TK_NEWPARA();
2012 while (retval.
is(TokenRetval::TK_NEWPARA));
2020 for (
const auto &attr :
attribs())
2022 if (attr.name.lower()==
"rowspan")
2024 return attr.value.toUInt();
2032 for (
const auto &attr :
attribs())
2034 if (attr.name.lower()==
"colspan")
2036 return std::max(1u,attr.value.toUInt());
2044 for (
const auto &attr :
attribs())
2048 if (attrName==
"align")
2050 if (attrValue==
"center")
2052 else if (attrValue==
"right")
2056 else if (attrName==
"class" && attrValue.
startsWith(
"markdowntable"))
2058 if (attrValue==
"markdowntableheadcenter")
2060 else if (attrValue==
"markdowntableheadright")
2062 else if (attrValue==
"markdowntableheadleft")
2064 else if (attrValue==
"markdowntableheadnone")
2066 else if (attrValue==
"markdowntablebodycenter")
2068 else if (attrValue==
"markdowntablebodyright")
2070 else if (attrValue==
"markdowntablebodyleft")
2072 else if (attrValue==
"markdowntablebodynone")
2082 for (
const auto &attr :
attribs())
2086 if (attrName==
"valign")
2088 if (attrValue==
"top")
2090 else if (attrValue==
"bottom")
2092 else if (attrValue==
"middle")
2107 const DocHtmlCell *cell = std::get_if<DocHtmlCell>(&n);
2123 while (tok.
is_any_of(TokenRetval::TK_WHITESPACE,TokenRetval::TK_NEWPARA,TokenRetval::TK_HTMLTAG,
2124 TokenRetval::TK_COMMAND_AT,TokenRetval::TK_COMMAND_BS))
2126 if (tok.
is(TokenRetval::TK_HTMLTAG))
2142 else if (tok.
is_any_of(TokenRetval::TK_COMMAND_AT, TokenRetval::TK_COMMAND_BS))
2152 if (!tok.
is(TokenRetval::TK_WORD))
2180 Token retval = Token::make_RetVal_OK();
2189 if (tok.
is(TokenRetval::TK_HTMLTAG))
2202 "found <{}{}> instead!",
parser()->context.token->endTag ?
"/" :
"",
parser()->context.token->name);
2207 else if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
2210 " for a html description title");
2215 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"expected <td> or <th> tag but found {} token instead!",
2229 retval=cell->
parse();
2230 isHeading = retval.
is(TokenRetval::RetVal_TableHCell);
2232 if (retval.
is(TokenRetval::RetVal_EndTableCell))
2238 if (tok.
is(TokenRetval::TK_HTMLTAG))
2241 !
parser()->context.token->endTag)
2243 retval = Token::make_RetVal_TableCell();
2248 if (
parser()->context.token->endTag)
2250 retval = Token::make_RetVal_EndTableRow();
2254 retval = Token::make_RetVal_TableRow();
2259 retval = Token::make_RetVal_EndTable();
2264 "found <{}{}> instead!",
parser()->context.token->endTag ?
"/" :
"",
parser()->context.token->name);
2271 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"expected <td>, <th> or <tr> tag but found {} token instead!",
2277 while (retval.
is_any_of(TokenRetval::RetVal_TableCell,TokenRetval::RetVal_TableHCell));
2287 Token retval = Token::make_RetVal_OK();
2298 if (tok.
is(TokenRetval::TK_HTMLTAG))
2310 "found <{}> instead!",
parser()->context.token->name);
2315 else if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
2318 " for a html description title");
2323 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"expected <td> or <th> tag but found {} token instead!",
2336 while (retval.
is_any_of(TokenRetval::RetVal_TableCell,TokenRetval::RetVal_TableHCell));
2360 const DocHtmlRow *row = std::get_if<DocHtmlRow>(&rowNode);
2373 Token retval = Token::make_RetVal_OK();
2380 if (tok.
is(TokenRetval::TK_HTMLTAG))
2386 retval = Token::make_RetVal_TableRow();
2397 retval=std::get<DocHtmlCaption>(*m_caption).parse();
2399 if (retval.
is(TokenRetval::RetVal_OK))
2408 "found <{}{}> instead!",
parser()->context.token->endTag ?
"/" :
"",
parser()->context.token->name);
2411 else if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
2414 " for a <tr> or <caption> tag");
2423 while (retval.
is(TokenRetval::RetVal_TableRow))
2428 if (retval.is(TokenRetval::RetVal_EndTableRow))
2436 retval = Token::make_RetVal_TableRow();
2440 retval = Token::make_RetVal_EndTable();
2442 else if (retval.is(TokenRetval::TK_HTMLTAG))
2445 "found <{}> instead!",
parser()->context.token->name);
2451 "found token {} instead!",retval.to_string());
2452 retval=Token::make_RetVal_OK();
2460 return retval.
is(TokenRetval::RetVal_EndTable) ? Token::make_RetVal_OK() : retval;
2466 Token retval = Token::make_RetVal_OK();
2475 bool isHeader=
false;
2476 if (tok.
is(TokenRetval::TK_HTMLTAG))
2481 retval = Token::make_RetVal_TableRow();
2485 retval = Token::make_RetVal_TableRow();
2491 while (retval.
is(TokenRetval::RetVal_TableRow))
2495 retval=tr->parseXml(isHeader);
2530 DocHtmlRow *row = std::get_if<DocHtmlRow>(&rowNode);
2533 for (
auto &cellNode : row->
children())
2535 DocHtmlCell *cell = std::get_if<DocHtmlCell>(&cellNode);
2538 uint32_t rs = cell->
rowSpan();
2539 uint32_t cs = cell->
colSpan();
2541 for (
size_t i=0;i<rowSpans.size();i++)
2543 if (rowSpans[i].rowsLeft>0 &&
2544 rowSpans[i].column==colIdx)
2546 colIdx=rowSpans[i].column+1;
2550 if (rs>0) rowSpans.emplace_back(rs,colIdx);
2558 for (
size_t i=0;i<rowSpans.size();i++)
2560 if (rowSpans[i].rowsLeft>0) rowSpans[i].rowsLeft--;
2566 if (colIdx-1>maxCols) maxCols=colIdx-1;
2576 Token retval = Token::make_TK_NONE();
2580 while (!tok.
is_any_of(TokenRetval::TK_NONE, TokenRetval::TK_EOF))
2584 switch (tok.
value())
2586 case TokenRetval::TK_COMMAND_AT:
2588 case TokenRetval::TK_COMMAND_BS:
2591 bool isJavaLink=
false;
2597 if (!tok.
is(TokenRetval::TK_WHITESPACE))
2606 if (!tok.
is(TokenRetval::TK_WORD))
2608 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"unexpected token {} as the argument of '{:c}{}' command",
2626 if (!tok.
is(TokenRetval::TK_WHITESPACE))
2635 if (!tok.
is(TokenRetval::TK_WORD))
2637 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"unexpected token {} as the argument of \\{} command",
2645 DString leftOver = lnk->parse(isJavaLink);
2646 if (!leftOver.empty())
2660 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Illegal command '{:c}{}' found as part of a <dt> tag",
2665 case TokenRetval::TK_SYMBOL:
2666 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Unsupported symbol '{}' found as part of a <dt> tag",
2667 parser()->context.token->name);
2669 case TokenRetval::TK_HTMLTAG:
2674 retval = Token::make_RetVal_DescData();
2684 retval = Token::make_RetVal_DescTitle();
2689 retval = Token::make_RetVal_EndDesc();
2694 if (!
parser()->context.token->endTag)
2705 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Unexpected html tag <{}{}> found within <dt> context",
2706 parser()->context.token->endTag?
"/":
"",
parser()->context.token->name);
2718 if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
2735 Token retval = Token::make_TK_NONE();
2744 if (isFirst) { par->
markFirst(); isFirst=
false; }
2745 retval=par->
parse();
2747 while (retval.
is(TokenRetval::TK_NEWPARA));
2758 Token retval = Token::make_RetVal_OK();
2766 if (tok.
is(TokenRetval::TK_HTMLTAG))
2776 "found <{}> instead!",
parser()->context.token->name);
2781 else if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
2784 " for a html description title");
2801 if (retval.is(TokenRetval::RetVal_DescData))
2804 while (retval.is(TokenRetval::RetVal_DescData))
2811 else if (!retval.is(TokenRetval::RetVal_DescTitle))
2816 }
while (retval.
is(TokenRetval::RetVal_DescTitle));
2818 if (retval.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
2820 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"unexpected end of comment while inside <dl> block");
2825 return retval.
is(TokenRetval::RetVal_EndDesc) ? Token::make_RetVal_OK() : retval;
2833 Token retval = Token::make_TK_NONE();
2843 if (isFirst) { par->
markFirst(); isFirst=
false; }
2844 retval=par->
parse();
2846 while (retval.
is(TokenRetval::TK_NEWPARA));
2856 Token retval = Token::make_TK_NONE();
2866 if (isFirst) { par->
markFirst(); isFirst=
false; }
2867 retval=par->
parse();
2868 if (retval.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
break;
2872 if (retval.
is(TokenRetval::RetVal_ListItem))
2877 while (!retval.
is(TokenRetval::RetVal_CloseXml));
2890 Token retval = Token::make_RetVal_OK();
2899 if (tok.
is(TokenRetval::TK_HTMLTAG))
2908 ) &&
parser()->context.token->endTag
2914 retval = Token::make_RetVal_EndList();
2922 "found <{}{}> instead!",
parser()->context.token->endTag?
"/":
"",
parser()->context.token->name);
2927 else if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
2932 " for a html list item");
2949 }
while (retval.
is(TokenRetval::RetVal_ListItem));
2951 if (retval.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
2953 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"unexpected end of comment while inside <{:c}l> block",
2959 return retval.
is(TokenRetval::RetVal_EndList) ? Token::make_RetVal_OK() : retval;
2965 Token retval = Token::make_RetVal_OK();
2974 if (tok.
is(TokenRetval::TK_HTMLTAG))
2985 "found <{}> instead!",
parser()->context.token->name);
2990 else if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
2993 " for a html list item");
3007 retval=li->parseXml();
3008 if (retval.is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
break;
3010 }
while (retval.
is(TokenRetval::RetVal_ListItem));
3012 if (retval.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
3014 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"unexpected end of comment while inside <list type=\"{}\"> block",
3020 return (retval.
is_any_of(TokenRetval::RetVal_EndList,TokenRetval::RetVal_CloseXml) ||
parser()->context.token->name==
"list") ?
3021 Token::make_RetVal_OK() : retval;
3029 Token retval = Token::make_TK_NONE();
3039 if (isFirst) { par->
markFirst(); isFirst=
false; }
3040 retval=par->
parse();
3042 while (retval.
is(TokenRetval::TK_NEWPARA));
3045 if (retval.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
3047 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"unexpected end of comment while inside <blockquote> block");
3051 return retval.
is(TokenRetval::RetVal_EndBlockQuote) ? Token::make_RetVal_OK() : retval;
3059 Token retval = Token::make_TK_NONE();
3069 if (isFirst) { par->
markFirst(); isFirst=
false; }
3070 retval=par->
parse();
3072 while (retval.
is(TokenRetval::TK_NEWPARA));
3076 return retval.
is(TokenRetval::RetVal_EndBlockQuote) ? Token::make_RetVal_OK() : retval;
3103 Token rv = Token::make_TK_NONE();
3109 }
while (rv.
is(TokenRetval::RetVal_ListItem));
3110 return (!rv.
is(TokenRetval::TK_NEWPARA)) ? rv : Token::make_RetVal_OK();
3123 Token retval = Token::make_RetVal_OK();
3133 if (isFirst) { par->markFirst(); isFirst=
false; }
3134 retval=par->parse();
3137 if (lastPar) lastPar->
markLast(
false);
3146 }
while (retval.
is(TokenRetval::TK_NEWPARA) &&
parser()->context.token->indent>
m_indent);
3165 Token retval = Token::make_RetVal_OK();
3172 switch (
parser()->context.token->id)
3194 while (retval.
is(TokenRetval::TK_LISTITEM) &&
3198 (
parser()->context.token->id==-1 ||
parser()->context.token->id>=num)
3215 while (!tok.
is_any_of(TokenRetval::TK_NONE, TokenRetval::TK_EOF))
3247 return m_title && std::get<DocTitle>(*m_title).hasTitle();
3259 std::get_if<DocTitle>(
m_title.get())->parse();
3263 if (!
children().empty() && std::holds_alternative<DocPara>(
children().back()))
3265 std::get<DocPara>(
children().back()).markLast(
false);
3281 Token retval = par->parse();
3301 return Token::make_RetVal_OK();
3309 Token retval = Token::make_RetVal_OK();
3313 if (!
children().empty() && std::holds_alternative<DocPara>(
children().back()))
3315 std::get<DocPara>(
children().back()).markLast(
false);
3327 retval = par->parse();
3328 if (retval.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
break;
3329 if (retval.
is(TokenRetval::RetVal_CloseXml))
3331 retval = Token::make_RetVal_OK();
3343 if (
children().empty() || (p=std::get_if<DocPara>(&
children().back()))==
nullptr)
3365 case See:
return "see";
3366 case Return:
return "return";
3368 case Authors:
return "author";
3369 case Version:
return "version";
3370 case Since:
return "since";
3371 case Date:
return "date";
3372 case Note:
return "note";
3373 case Warning:
return "warning";
3374 case Pre:
return "pre";
3375 case Post:
return "post";
3377 case Invar:
return "invariant";
3378 case Remark:
return "remark";
3381 case User:
return "user";
3382 case Rcs:
return "rcs";
3392 Token retval = Token::make_RetVal_OK();
3395 DString saveCmdName = cmdName;
3400 if (!tok.
is(TokenRetval::TK_WHITESPACE))
3404 retval = Token::make_RetVal_EndParBlock();
3408 tok=tokenizer.
lex();
3409 while (tok.
is(TokenRetval::TK_WORD))
3419 if (
parent() && std::holds_alternative<DocParamSect>(*
parent()))
3421 std::get<DocParamSect>(*
parent()).m_hasTypeSpecifier=
true;
3440 tok=tokenizer.
lex();
3443 if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
3446 "argument of command {}",saveCmdName);
3447 retval = Token::make_RetVal_EndParBlock();
3450 if (!tok.
is(TokenRetval::TK_WHITESPACE))
3452 if (!tok.
is(TokenRetval::TK_NEWPARA))
3455 "argument of command {}",tok.
to_string(),saveCmdName);
3457 retval = Token::make_RetVal_EndParBlock();
3463 retval = par->
parse();
3475 Token retval = Token::make_RetVal_OK();
3497 retval = par->parse();
3519 if (retval.is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
break;
3521 }
while (retval.
is(TokenRetval::RetVal_CloseXml) &&
3526 if (retval.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
3532 retval = Token::make_RetVal_OK();
3544 Token retval = Token::make_RetVal_OK();
3552 if (!
children().empty() && std::holds_alternative<DocParamList>(
children().back()))
3567 retval = pl->parseXml(cmdName);
3571 retval = pl->parse(cmdName);
3573 if (retval.
is(TokenRetval::RetVal_EndParBlock))
3575 retval = Token::make_RetVal_OK();
3594 bool needsSeparator =
false;
3596 (ss=
children().get_last<DocSimpleSect>()) &&
3601 needsSeparator =
true;
3608 Token rv = Token::make_RetVal_OK();
3617 return (!rv.
is(TokenRetval::TK_NEWPARA)) ? rv : Token::make_RetVal_OK();
3622 bool xmlContext=
false,
3628 (ps=
children().get_last<DocParamSect>()) &&
3640 return (!rv.
is(TokenRetval::TK_NEWPARA)) ? rv : Token::make_RetVal_OK();
3648 if (!tok.
is(TokenRetval::TK_WHITESPACE))
3656 if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
3658 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"no emoji name given or unexpected end of comment block while parsing the "
3659 "argument of command '{:c}{}'",cmdChar,cmdName);
3663 else if (!tok.
is(TokenRetval::TK_WORD))
3678 if (!tok.
is(TokenRetval::TK_WHITESPACE))
3686 if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
3688 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"unexpected end of comment block while parsing the "
3689 "argument of command '{:c}{}'",cmdChar,cmdName);
3692 else if (!tok.
is_any_of(TokenRetval::TK_WORD,TokenRetval::TK_LNKWORD))
3702 switch (opt->
kind())
3723 static const reg::Ex marker(R
"(@(\d+))");
3728 for ( ; it!=
end ; ++it)
3730 const auto &match = *it;
3731 size_t newIndex = match.position();
3732 size_t matchLen = match.length();
3733 optionValue += lstFormat.
substr(index,newIndex-index);
3734 unsigned long entryIndex = std::stoul(match[1].str());
3735 if (entryIndex<(
unsigned long)lst->size())
3737 optionValue += lst->at(entryIndex);
3739 index=newIndex+matchLen;
3741 optionValue+=lstFormat.
substr(index);
3746 warn(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Obsolete setting for '{:c}{}': '{}'",
3747 cmdChar,cmdName,
parser()->context.token->name);
3751 "Disabled setting (i.e. not supported in this doxygen executable) for '{:c}{}': '{}'",
3752 cmdChar,cmdName,
parser()->context.token->name);
3758 if (!optionValue.
empty())
3765 warn(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Unknown option for '{:c}{}': '{}'",
3766 cmdChar,cmdName,
parser()->context.token->name);
3776 ASSERT(retval.
is(TokenRetval::TK_WHITESPACE));
3779 if (retval.
is(TokenRetval::RetVal_OK))
3800 if (!tok.
is(TokenRetval::TK_WHITESPACE))
3808 if (!tok.
is(TokenRetval::TK_WORD))
3822 bool specDateOnlyWS = !specDateRaw.
empty() && specDate.
empty();
3823 if (!specDate.
empty() && !tok.
is_any_of(TokenRetval::TK_WORD,TokenRetval::TK_NONE,TokenRetval::TK_EOF))
3825 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"invalid <date_time> argument for command '{:c}{}'",
3836 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"invalid <date_time> argument for command '{:c}{}': {}",
3837 cmdChar,cmdName,
err);
3849 if ((usedFormat&bitMask) && !(specFormat&bitMask))
3851 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.",
3867 DString saveCmdName = cmdName;
3869 if (!tok.
is(TokenRetval::TK_WHITESPACE))
3878 if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
3880 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"unexpected end of comment block while parsing the "
3881 "argument of command {}", saveCmdName);
3884 else if (!tok.
is(TokenRetval::TK_WORD))
3908 (!n1_docIncOp && !n1_docWs) ||
3909 (n1_docWs && n2 && !n2_docIncOp);
3914 n1_docIncOp->markLast(
false);
3916 else if (n1_docWs && n2_docIncOp)
3927 DString saveCmdName = cmdName;
3929 if (!tok.
is(TokenRetval::TK_WHITESPACE))
3938 if (!tok.
is(TokenRetval::TK_WORD))
3965 AUTO_TRACE(
"cmdName={} isJavaLink={}",cmdName,isJavaLink);
3966 DString saveCmdName = cmdName;
3968 if (!tok.
is(TokenRetval::TK_WHITESPACE))
3976 if (!tok.
is(TokenRetval::TK_WORD))
3982 if (saveCmdName ==
"javalink")
3991 if (saveCmdName ==
"javalink")
3997 DString leftOver = lnk->parse(isJavaLink);
3998 if (!leftOver.
empty())
4007 DString saveCmdName = cmdName;
4009 bool isBlock =
false;
4010 bool trimLeft =
false;
4011 bool localScope =
false;
4013 if (tok.
is(TokenRetval::TK_WORD) &&
parser()->context.token->name==
"{")
4019 auto contains = [&optList](
const char *kw)
4021 return std::find(optList.begin(),optList.end(),kw)!=optList.end();
4023 localScope = contains(
"local");
4024 if (contains(
"nostrip"))
4026 stripCodeComments =
false;
4028 else if (contains(
"strip"))
4030 stripCodeComments =
true;
4037 if (contains(
"lineno"))
4044 if (!tok.
is(TokenRetval::TK_WHITESPACE))
4051 else if (tok.
is(TokenRetval::TK_WORD) &&
parser()->context.token->name==
"[")
4059 else if (tok.
is(TokenRetval::TK_NEWPARA))
4065 else if (!tok.
is(TokenRetval::TK_WHITESPACE))
4074 if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
4076 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"unexpected end of comment block while parsing the "
4077 "argument of command {}",saveCmdName);
4080 else if (!tok.
is(TokenRetval::TK_WORD))
4094 if (!tok.
is(TokenRetval::TK_WORD))
4096 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"expected block identifier, but found token {} instead while parsing the {} command",
4111 blockId,isBlock,trimLeft);
4118 DString saveCmdName = cmdName;
4121 if (!tok.
is(TokenRetval::TK_WHITESPACE))
4124 cmdChar,saveCmdName);
4128 if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
4130 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"unexpected end of comment block while parsing the "
4131 "argument of command '{:c}{}'", cmdChar,saveCmdName);
4134 else if (!tok.
is_any_of(TokenRetval::TK_WORD,TokenRetval::TK_LNKWORD))
4151 return retval.is(TokenRetval::RetVal_OK) ? Token::make_TK_NEWPARA() : retval;
4169 if (!lang.
empty() && lang.
at(0)!=
'.')
4173 if (
parser()->context.xmlComment)
4179 while (i<l && (
parser()->context.token->verb.at(i)==
' ' ||
parser()->context.token->verb.at(i)==
'\n'))
4181 if (
parser()->context.token->verb.at(i)==
'\n') li=i+1;
4191 if (retval.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
4202 if (
parser()->context.memberDef)
4208 bool hasParamCommand =
false;
4209 bool hasReturnCommand =
false;
4244 Token retval = Token::make_RetVal_OK();
4250 std::string str{cmdChar};
4254 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Found unexpanded alias '{:c}{}'. Check if number of arguments passed is correct.",cmdChar,cmdName);
4403 retval = Token::make_RetVal_Section();
4409 retval = Token::make_RetVal_Subsection();
4415 retval = Token::make_RetVal_Subsubsection();
4421 retval = Token::make_RetVal_Paragraph();
4427 retval = Token::make_RetVal_SubParagraph();
4433 retval = Token::make_RetVal_SubSubParagraph();
4453 if (retval.is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
4465 if (retval.is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
4477 if (retval.is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
4489 if (retval.is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
4501 if (retval.is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
4513 if (retval.is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
4527 size_t idx = fullMatch.
find(
'{');
4534 for (
const auto &opt : optList)
4536 if (opt.empty())
continue;
4539 if (locOpt ==
"code")
4543 else if (!locOpt.
empty())
4545 warn(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Unknown option '{}' for '\\iliteral'",opt);
4553 if (retval.is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
4561 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"javadoc literal section ended without end marker");
4580 if (retval.is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
4601 dv->setText(
parser()->context.token->verb);
4602 dv->setWidth(width);
4603 dv->setHeight(height);
4604 dv->setLocation(
parser()->context.fileName,
parser()->tokenizer.getLineNr());
4607 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"ignoring \\dot command because HAVE_DOT is not set");
4610 if (retval.is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
4631 dv->setText(
parser()->context.token->verb);
4632 dv->setWidth(width);
4633 dv->setHeight(height);
4634 dv->setLocation(
parser()->context.fileName,
parser()->tokenizer.getLineNr());
4635 if (retval.is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
4649 size_t idx = fullMatch.
find(
'{');
4657 for (
const auto &opt : optList)
4659 if (opt.empty())
continue;
4665 if (!engine.
empty())
4667 warn(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Multiple definition of engine for '\\startuml'");
4674 if (sectionId.
empty())
4680 warn(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Multiple use of filename for '\\startuml'");
4689 if (engine.
empty()) engine =
"uml";
4691 if (sectionId.
empty())
4695 ASSERT(retval.is(TokenRetval::RetVal_OK));
4716 if (engine ==
"ditaa")
4718 dv->setUseBitmap(
true);
4720 else if (engine ==
"uml")
4722 size_t i = trimmedVerb.
find(
'\n');
4726 dv->setText(trimmedVerb);
4727 dv->setWidth(width);
4728 dv->setHeight(height);
4729 dv->setLocation(
parser()->context.fileName,
parser()->tokenizer.getLineNr());
4730 if (!plantumlEnabled)
4732 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"ignoring \\startuml command because neither PLANTUML_JAR_PATH nor PLANTUML_TOOL is set");
4735 if (retval.is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
4748 size_t idx = fullMatch.
find(
'{');
4759 if (sectionId.
empty())
4763 ASSERT(retval.is(TokenRetval::RetVal_OK));
4769 DString mermaidFile(sectionId);
4783 dv->setText(trimmedVerb);
4784 dv->setWidth(width);
4785 dv->setHeight(height);
4786 dv->setLocation(
parser()->context.fileName,
parser()->tokenizer.getLineNr());
4787 if (retval.is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
4795 retval = Token::make_RetVal_EndParBlock();
4856 retval = Token::make_RetVal_Internal();
4859 retval = Token::make_RetVal_EndInternal();
4928 "ignoring \\dotfile command because HAVE_DOT is not set");
5022 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Unexpected command '{}' in paragraph context",cmdName);
5025 INTERNAL_ASSERT(retval.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF,TokenRetval::RetVal_OK,TokenRetval::RetVal_SimpleSec
5026 TokenRetval::TK_LISTITEM,TokenRetval::TK_ENDLIST,TokenRetval::TK_NEWPARA
5027 TokenRetval::RetVal_Section,TokenRetval::RetVal_EndList
5028 TokenRetval::RetVal_Internal,TokenRetval::RetVal_SwitchLang
5029 TokenRetval::RetVal_EndInternal)
5036 const char *attrName,
5040 for (
const auto &opt : tagHtmlAttribs)
5042 if (opt.name==attrName)
5044 *result = opt.value;
5053 AUTO_TRACE(
"tagName={} #tagHtmlAttrs={}",tagName,tagHtmlAttribs.size());
5054 Token retval = Token::make_RetVal_OK();
5060 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"HTML tag ('<{}/>') may not use the 'empty tag' XHTML syntax.",
5066 if (!
parser()->context.token->emptyTag)
5074 if (!
parser()->context.token->emptyTag)
5082 if (
parser()->context.token->emptyTag)
break;
5089 retval = Token::make_RetVal_ListItem();
5111 if (
parser()->context.token->emptyTag)
break;
5112 if (
parser()->context.xmlComment)
5157 if (
parser()->context.token->emptyTag)
break;
5163 retval = Token::make_TK_NEWPARA();
5166 if (!
parser()->context.token->emptyTag)
5175 retval = Token::make_RetVal_DescTitle();
5185 retval = Token::make_RetVal_DescData();
5193 if (!
parser()->context.token->emptyTag)
5201 retval = Token::make_RetVal_TableRow();
5204 retval = Token::make_RetVal_TableCell();
5207 retval = Token::make_RetVal_TableHCell();
5254 if (!
parser()->context.token->emptyTag)
5261 if (!
parser()->context.token->emptyTag)
5271 if (!
parser()->context.token->emptyTag)
5274 while (n && !std::holds_alternative<DocHtmlDetails>(*n)) n=
::parent(n);
5284 retval = Token::make_TK_NEWPARA();
5298 retval = Token::make_TK_NEWPARA();
5304 retval = Token::make_RetVal_TableCell();
5317 if (paramName.
empty())
5374 retval = Token::make_RetVal_TableRow();
5378 retval = Token::make_RetVal_ListItem();
5393 retval = Token::make_RetVal_TableCell();
5407 if (
parser()->context.token->emptyTag)
5420 DString leftOver = lnk->parse(
false,
true);
5421 if (!leftOver.empty())
5439 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Missing 'cref' or 'langword' attribute from <see> tag.");
5467 std::get<DocSimpleSect>(*vss).appendLinkWord(cref);
5468 retval = Token::make_RetVal_OK();
5525 Token retval = Token::make_RetVal_OK();
5535 retval = Token::make_RetVal_EndList();
5545 retval = Token::make_RetVal_EndList();
5561 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"found </details> tag without matching <details>");
5565 retval = Token::make_RetVal_EndHtmlDetails();
5571 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"found </blockquote> tag without matching <blockquote>");
5575 retval = Token::make_RetVal_EndBlockQuote();
5635 retval = Token::make_TK_NEWPARA();
5638 retval = Token::make_RetVal_EndDesc();
5647 retval = Token::make_RetVal_EndTable();
5650 retval = Token::make_RetVal_EndTableRow();
5653 retval = Token::make_RetVal_EndTableCell();
5656 retval = Token::make_RetVal_EndTableCell();
5700 retval = Token::make_TK_NEWPARA();
5714 retval = Token::make_RetVal_CloseXml();
5750 if (!std::get_if<DocAutoListItem>(n))
5758 const auto &docAutoList = std::get_if<DocAutoList>(n);
5761 indent = docAutoList->indent();
5770 const auto &docPara = std::get_if<DocPara>(n);
5776 return std::get<DocStyleChange>(*stack.top());
5786 indentStr.
fill(
' ',indent);
5801 Token retval = Token::make_TK_NONE();
5802 while (!tok.
is_any_of(TokenRetval::TK_NONE, TokenRetval::TK_EOF))
5806 if (tok.
is_any_of(TokenRetval::TK_WORD,TokenRetval::TK_LNKWORD,TokenRetval::TK_SYMBOL,TokenRetval::TK_URL,
5807 TokenRetval::TK_COMMAND_AT,TokenRetval::TK_COMMAND_BS,TokenRetval::TK_HTMLTAG)
5814 case TokenRetval::TK_WORD:
5817 case TokenRetval::TK_LNKWORD:
5820 case TokenRetval::TK_URL:
5823 case TokenRetval::TK_WHITESPACE:
5841 case TokenRetval::TK_LISTITEM:
5845 while (n && !std::holds_alternative<DocAutoList>(*n)) n=
::parent(n);
5846 const DocAutoList *al = std::get_if<DocAutoList>(n);
5853 retval = Token::make_TK_LISTITEM();
5863 al = std::get_if<DocAutoList>(n);
5877 }
while (retval.
is(TokenRetval::TK_LISTITEM) &&
5882 if (retval.
is(TokenRetval::RetVal_SimpleSec))
5888 if (
parser()->context.token->name.startsWith(
"rcs:"))
5892 tok = Token::make_TK_RCSTAG();
5896 tok = Token::make_TK_COMMAND_BS();
5901 else if (retval.
is(TokenRetval::TK_ENDLIST))
5917 case TokenRetval::TK_ENDLIST:
5918 AUTO_TRACE_ADD(
"Found end of list inside of paragraph at line {}",
parser()->tokenizer.getLineNr());
5919 if (std::get_if<DocAutoListItem>(
parent()))
5922 if (al && al->
indent()>=
parser()->context.token->indent)
5925 retval = Token::make_TK_ENDLIST();
5931 "has invalid indent level");
5940 case TokenRetval::TK_COMMAND_AT:
5942 case TokenRetval::TK_COMMAND_BS:
5947 while (n && !std::holds_alternative<DocSimpleSect>(*n) &&
5948 !std::holds_alternative<DocParamSect>(*n))
5959 retval = Token::make_RetVal_SimpleSec();
5965 while (n && !std::holds_alternative<DocSimpleListItem>(*n)) n=
::parent(n);
5970 retval = Token::make_RetVal_ListItem();
5980 if (retval.
is(TokenRetval::RetVal_SimpleSec))
5986 if (
parser()->context.token->name.startsWith(
"rcs:"))
5990 tok = Token::make_TK_RCSTAG();
5994 tok = Token::make_TK_COMMAND_BS();
5999 else if (retval.
value()>TokenRetval::TK_NONE && retval.
value()<TokenRetval::RetVal_OK)
6005 else if (retval.
value()!=TokenRetval::RetVal_OK)
6012 case TokenRetval::TK_HTMLTAG:
6014 if (!
parser()->context.token->endTag)
6026 if (!retval.
is(TokenRetval::RetVal_OK))
6032 case TokenRetval::TK_SYMBOL:
6043 parser()->context.token->name);
6047 case TokenRetval::TK_NEWPARA:
6048 retval = Token::make_TK_NEWPARA();
6050 case TokenRetval::TK_RCSTAG:
6053 while (n && !std::holds_alternative<DocSimpleSect>(*n) &&
6054 !std::holds_alternative<DocParamSect>(*n))
6064 retval = Token::make_RetVal_SimpleSec();
6075 "Found unexpected token (id={})",tok.
to_string());
6080 retval=Token::make_TK_NONE();
6083 DocPara *par = std::get_if<DocPara>(
parser()->context.nodeStack.top());
6084 if (!
parser()->context.token->endTag && par &&
6085 retval.
is(TokenRetval::TK_NEWPARA) &&
parser()->context.token->name.lower() ==
"p")
6089 INTERNAL_ASSERT(retval.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF,TokenRetval::TK_NEWPARA,TokenRetval::TK_LISTITEM,
6090 TokenRetval::TK_ENDLIST,TokenRetval::RetVal_OK)
6102 Token retval = Token::make_RetVal_OK();
6113 if (titleStr.
empty()) titleStr = sec->
label();
6127 if (isFirst) { par->markFirst(); isFirst=
false; }
6128 retval=par->parse();
6131 if (lastPar) lastPar->
markLast(
false);
6138 if (retval.
is(TokenRetval::TK_LISTITEM))
6142 if (retval.
is(TokenRetval::RetVal_Internal))
6146 if (retval.is(TokenRetval::RetVal_EndInternal))
6148 retval = Token::make_RetVal_OK();
6151 }
while (!retval.
is_any_of(TokenRetval::TK_NONE, TokenRetval::TK_EOF, TokenRetval::RetVal_Section, TokenRetval::RetVal_Subsection,
6152 TokenRetval::RetVal_Subsubsection, TokenRetval::RetVal_Paragraph, TokenRetval::RetVal_SubParagraph,
6153 TokenRetval::RetVal_SubSubParagraph, TokenRetval::RetVal_EndInternal)
6160 if (retval.
is(TokenRetval::RetVal_Subsection) &&
m_level<=1)
6163 while (retval.
is(TokenRetval::RetVal_Subsection))
6172 else if (retval.
is(TokenRetval::RetVal_Subsubsection) &&
m_level<=2)
6178 parser()->tokenizer.getLineNr(),
6179 "Unexpected subsubsection command found inside {}!",
6183 while (retval.
is(TokenRetval::RetVal_Subsubsection))
6190 if (!(
m_level < 2 && retval.
is(TokenRetval::RetVal_Subsection)))
break;
6192 else if (retval.
is(TokenRetval::RetVal_Paragraph) &&
m_level<=3)
6198 "Unexpected paragraph command found inside {}!",
6202 while (retval.
is(TokenRetval::RetVal_Paragraph))
6209 if (!(
m_level<3 && (retval.
is_any_of(TokenRetval::RetVal_Subsection,TokenRetval::RetVal_Subsubsection))))
break;
6211 else if (retval.
is(TokenRetval::RetVal_SubParagraph) &&
m_level<=4)
6217 "Unexpected subparagraph command found inside {}!",
6221 while (retval.
is(TokenRetval::RetVal_SubParagraph))
6228 if (!(
m_level<4 && (retval.
is_any_of(TokenRetval::RetVal_Subsection,TokenRetval::RetVal_Subsubsection,TokenRetval::RetVal_Paragraph))))
break;
6230 else if (retval.
is(TokenRetval::RetVal_SubSubParagraph) &&
m_level<=5)
6236 "Unexpected subsubparagraph command found inside {}!",
6240 while (retval.
is(TokenRetval::RetVal_SubSubParagraph))
6247 if (!(
m_level<5 && (retval.
is_any_of( TokenRetval::RetVal_Subsection, TokenRetval::RetVal_Subsubsection,
6248 TokenRetval::RetVal_Paragraph, TokenRetval::RetVal_SubParagraph))))
break;
6257 TokenRetval::RetVal_Section, TokenRetval::RetVal_Subsection,
6258 TokenRetval::RetVal_Subsubsection, TokenRetval::RetVal_Paragraph,
6259 TokenRetval::RetVal_SubParagraph, TokenRetval::RetVal_SubSubParagraph,
6260 TokenRetval::RetVal_Internal, TokenRetval::RetVal_EndInternal)
6276 while (!tok.
is_any_of(TokenRetval::TK_NONE, TokenRetval::TK_EOF))
6280 case TokenRetval::TK_WORD:
6283 case TokenRetval::TK_WHITESPACE:
6286 case TokenRetval::TK_SYMBOL:
6296 parser()->context.token->name);
6300 case TokenRetval::TK_COMMAND_AT:
6302 case TokenRetval::TK_COMMAND_BS:
6364 parser()->context.token->name);
6388 Token retval = Token::make_TK_NONE();
6398 if (isFirst) { par->markFirst(); isFirst=
false; }
6399 retval=par->parse();
6400 if (par->empty() && par->attribs().empty())
6409 auto checkParagraph = [
this,&retval](
Token t,
int level,
const char *sectionType,
const char *parentSectionType) {
6415 parser()->tokenizer.getLineNr(),
6416 "found {} command (id: '{}') outside of {} context!",
6417 sectionType,
parser()->context.token->sectionId,parentSectionType);
6421 if (!
parser()->context.token->sectionId.empty())
6434 sectionType,
parser()->context.token->sectionId,sectionType);
6435 retval = Token::make_TK_NONE();
6440 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Missing id for {}; ignoring {}",sectionType,sectionType);
6441 retval = Token::make_TK_NONE();
6446 checkParagraph(Token::make_RetVal_SubSubParagraph(), 6,
"subsubparagraph",
"subparagraph" );
6447 checkParagraph(Token::make_RetVal_SubParagraph(), 5,
"subparagraph",
"paragraph" );
6448 checkParagraph(Token::make_RetVal_Paragraph(), 4,
"paragraph",
"subsubsection" );
6449 checkParagraph(Token::make_RetVal_Subsubsection(), 3,
"subsubsection",
"subsection" );
6450 checkParagraph(Token::make_RetVal_Subsection(), 2,
"subsection",
"section" );
6452 if (retval.
is(TokenRetval::TK_LISTITEM))
6456 if (retval.
is(TokenRetval::RetVal_Internal))
6461 }
while (!retval.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF,TokenRetval::RetVal_Section));
6466 while (retval.
is(TokenRetval::RetVal_Section))
6468 if (!
parser()->context.token->sectionId.empty())
6481 retval = Token::make_TK_NONE();
6487 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)
Base class for nodes with children.
DocDiaFile(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)
Abstract node interface with type information.
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, bool retainEmpty=false)
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.