42#if !ENABLE_DOCPARSER_TRACING
46#define AUTO_TRACE(...) (void)0
47#define AUTO_TRACE_ADD(...) (void)0
48#define AUTO_TRACE_EXIT(...) (void)0
51#define INTERNAL_ASSERT(x) do {} while(0)
70 "uml",
"bpm",
"wire",
"dot",
"ditaa",
71 "salt",
"math",
"latex",
"gantt",
"mindmap",
72 "wbs",
"yaml",
"creole",
"json",
"flow",
73 "board",
"git",
"hcl",
"regex",
"ebnf",
74 "files",
"chen",
"chronology"
84 const char *p = s.
data();
90 if (c==
'{') c=
'<';
else if (c==
'}') c=
'>';
119 std::visit([&](
auto &&x)->
decltype(
auto) {
return x.setParent(newParent); }, *n);
163 size_t len=locSymName.
length();
166 if (locSymName.
at(len-1)!=
':') locSymName.
append(
":");
167 if (locSymName.
at(0)!=
':') locSymName.
prepend(
":");
185 Doxygen::searchIndex.addWord(word,false);
202 Doxygen::searchIndex.addWord(word,false);
218 if (
id.left(anchorPrefix.
length()) == anchorPrefix)
308 parser()->tokenizer.getLineNr(),
309 "block marked with {} for \\snippet should appear twice in file {}, found it {:d} times",
323 "No previous '\\include' or '\\dontinclude' command for '\\{}' present",
334 size_t so = o, bo = 0;
335 bool nonEmpty =
FALSE;
348 else if (!isspace(
static_cast<uint8_t
>(c)))
378 else if (!isspace(
static_cast<uint8_t
>(c)))
411 else if (!isspace(
static_cast<uint8_t
>(c)))
442 else if (!isspace(
static_cast<uint8_t
>(c)))
486 if (
parser()->context.memberDef &&
parser()->context.memberDef->name().at(0)==
'@')
545 while (!tok.
is_any_of(TokenRetval::TK_NONE, TokenRetval::TK_EOF))
559 if (sec==
nullptr &&
parser()->context.lang==SrcLangExt::Markdown)
618 while (!tok.
is_any_of(TokenRetval::TK_NONE, TokenRetval::TK_EOF))
620 if (tok.
is_any_of(TokenRetval::TK_COMMAND_AT, TokenRetval::TK_COMMAND_BS))
627 if (!tok.
is(TokenRetval::TK_WHITESPACE))
633 if (!tok.
is_any_of(TokenRetval::TK_WORD,TokenRetval::TK_LNKWORD))
647 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Illegal command '{:c}{}' as part of a \\secreflist",
652 else if (tok.
is(TokenRetval::TK_WHITESPACE))
658 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Unexpected token {} inside section reference list",
690 while (!tok.
is_any_of(TokenRetval::TK_NONE, TokenRetval::TK_EOF))
709 AUTO_TRACE(
"target='{}',context='{}'",target,context);
712 auto lang =
parser->context.lang;
714 if (sec==
nullptr && !
parser->context.prefix.isEmpty())
766 m_file = dd->getOutputFileBase();
773 bool isFile = compound ?
777 if (compound && lang==SrcLangExt::Markdown) lang = compound->
getLanguage();
799 int funcPos =
m_text.find(
'(');
818 toFileDef(compound)->generateSourceFile()
832 warn_doc_error(
parser->context.fileName,
parser->tokenizer.getLineNr(),
"unable to resolve reference to '{}' for \\ref command",
838 for (
auto &&elem : elements)
848 for (
auto &dn : children)
850 DocPara *para = std::get_if<DocPara>(&dn);
862 for (
auto &cn : children)
869 for (
auto &ccn : *opt_children)
883 while (!tok.
is_any_of(TokenRetval::TK_NONE, TokenRetval::TK_EOF))
889 case TokenRetval::TK_HTMLTAG:
902 if (
parser()->context.insideHtmlLink)
907 "Potential recursion while resolving \\ref command!");
934 if (numBibFiles>0 && cite && !cite->
text().
isEmpty())
945 warn_doc_error(
parser->context.fileName,
parser->tokenizer.getLineNr(),
"\\cite command found but no bib files specified via CITE_BIB_FILES!");
947 else if (cite==
nullptr)
949 warn_doc_error(
parser->context.fileName,
parser->tokenizer.getLineNr(),
"unable to resolve reference to '{}' for \\cite command",
954 warn_doc_error(
parser->context.fileName,
parser->tokenizer.getLineNr(),
"\\cite command to '{}' does not have an associated number",
966 if (!opt.noPar()) txt +=
"[";
970 if (opt.isNumber()) txt += citeInfo->
text();
971 else if (opt.isShortAuthor()) txt += citeInfo->
shortAuthor();
972 else if (opt.isYear()) txt += citeInfo->
year();
975 if (!opt.noPar()) txt +=
"]";
990 m_refText = m_refText.right(m_refText.length()-1);
997 if (compound && compound->isLinkable())
999 m_file = compound->getOutputFileBase();
1000 m_ref = compound->getReference();
1003 (
toFileDef(compound))->generateSourceFile()
1013 warn_doc_error(parser->context.fileName,parser->tokenizer.getLineNr(),
"unable to resolve link to '{}' for \\link command",
1025 while (!tok.
is_any_of(TokenRetval::TK_NONE, TokenRetval::TK_EOF))
1029 switch (tok.
value())
1031 case TokenRetval::TK_COMMAND_AT:
1033 case TokenRetval::TK_COMMAND_BS:
1049 case TokenRetval::TK_SYMBOL:
1050 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Unsupported symbol '{}' found as part of a \\link",
1051 parser()->context.token->name);
1053 case TokenRetval::TK_HTMLTAG:
1054 if (
parser()->context.token->name!=
"see" || !isXmlLink)
1056 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Unexpected xml/html command {} found as part of a \\link",
1057 parser()->context.token->name);
1060 case TokenRetval::TK_LNKWORD:
1061 case TokenRetval::TK_WORD:
1070 else if ((p=w.
find(
'}'))!=-1)
1072 int l =
static_cast<int>(w.
length());
1076 result=w.
right(l-p-1);
1090 if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
1093 parser()->tokenizer.getLineNr(),
1094 "Unexpected end of comment while inside link command");
1114 p->relPath =
parser->context.relPath;
1124 if (fd==
nullptr && !
p->name.endsWith(
".dot"))
1135 "Possible candidates:\n{}",
p->name,
1143 "in any of the paths specified via DOTFILE_DIRS!",
p->name);
1152 p->relPath =
parser->context.relPath;
1162 if (fd==
nullptr && !
p->name.endsWith(
".msc"))
1173 "Possible candidates:\n{}",
qPrint(
p->name),
1181 "in any of the paths specified via MSCFILE_DIRS!",
p->name);
1192 p->relPath =
parser->context.relPath;
1202 if (fd==
nullptr && !
p->name.endsWith(
".dia"))
1213 "Possible candidates:\n{}",
p->name,
1221 "in any of the paths specified via DIAFILE_DIRS!",
p->name);
1231 p->relPath =
parser->context.relPath;
1241 if (fd==
nullptr && !
p->name.endsWith(
".puml"))
1244 if (fd==
nullptr && !
p->name.endsWith(
".pu"))
1256 "Possible candidates:\n{}",
p->name,
1264 "in any of the paths specified via PLANTUMLFILE_DIRS!",
p->name);
1282 while (!tok.
is_any_of(TokenRetval::TK_NONE, TokenRetval::TK_EOF))
1309 QCString locName =
p->url.isEmpty() ?
p->name :
p->url;
1310 int len =
static_cast<int>(locName.
length());
1311 int fnd = locName.
find(
'?');
1312 if (fnd==-1) fnd=len;
1313 return fnd>=4 && locName.
mid(fnd-4,4)==
".svg";
1327 Token retval(TokenRetval::RetVal_OK);
1331 while (!tok.
is_any_of(TokenRetval::TK_NONE, TokenRetval::TK_EOF))
1335 switch (tok.
value())
1337 case TokenRetval::TK_HTMLTAG:
1396 if (!
parser()->context.token->endTag)
1407 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Unexpected html tag <{}{}> found within <h{:d}> context",
1420 if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
1437 while (!tok.
is_any_of(TokenRetval::TK_NONE, TokenRetval::TK_EOF))
1440 if (tok.
value()==TokenRetval::TK_HTMLTAG &&
1442 parser()->context.token->endTag
1454 if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
1466 Token retval(TokenRetval::TK_NONE);
1477 retval=par->
parse();
1479 while (retval.
is(TokenRetval::TK_NEWPARA));
1482 if (retval.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
1484 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"unexpected end of comment while inside <details> block");
1495 return retval.
is(TokenRetval::RetVal_EndHtmlDetails) ? Token::make_RetVal_OK() : retval;
1511 Token retval(TokenRetval::RetVal_OK);
1515 while (!tok.
is_any_of(TokenRetval::TK_NONE, TokenRetval::TK_EOF))
1519 switch (tok.
value())
1521 case TokenRetval::TK_HTMLTAG:
1534 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Unexpected html tag <{}{}> found within <a href=...> context",
1535 parser()->context.token->endTag?
"/":
"",
parser()->context.token->name);
1546 if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
1549 " <a href=...> tag");
1561 Token retval(TokenRetval::RetVal_OK);
1571 if (isFirst) { par->markFirst(); isFirst=
FALSE; }
1572 retval=par->parse();
1573 if (!par->isEmpty())
1582 if (retval.
is(TokenRetval::TK_LISTITEM))
1586 }
while (!retval.
is_any_of(TokenRetval::TK_NONE, TokenRetval::TK_EOF,
1587 TokenRetval::RetVal_Section, TokenRetval::RetVal_Subsection, TokenRetval::RetVal_Subsubsection,
1588 TokenRetval::RetVal_Paragraph, TokenRetval::RetVal_SubParagraph, TokenRetval::RetVal_SubSubParagraph,
1589 TokenRetval::RetVal_EndInternal));
1593 while ((level==1 && retval.
is(TokenRetval::RetVal_Section)) ||
1594 (level==2 && retval.
is(TokenRetval::RetVal_Subsection)) ||
1595 (level==3 && retval.
is(TokenRetval::RetVal_Subsubsection)) ||
1596 (level==4 && retval.
is(TokenRetval::RetVal_Paragraph)) ||
1597 (level==5 && retval.
is(TokenRetval::RetVal_SubParagraph)) ||
1598 (level==6 && retval.
is(TokenRetval::RetVal_SubSubParagraph))
1607 if (retval.
is(TokenRetval::RetVal_Internal))
1609 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"\\internal command found inside internal section");
1621 Token retval(TokenRetval::RetVal_OK);
1624 if (!tok.
is(TokenRetval::TK_WHITESPACE))
1632 while (!tok.
is_any_of(TokenRetval::TK_NONE, TokenRetval::TK_EOF))
1634 switch (tok.
value())
1636 case TokenRetval::TK_WHITESPACE:
1639 case TokenRetval::TK_WORD:
1640 case TokenRetval::TK_LNKWORD:
1643 case TokenRetval::TK_SYMBOL:
1665 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Unexpected symbol '{}' found as argument of \\addindex",
parser()->context.token->name);
1670 case TokenRetval::TK_COMMAND_AT:
1672 case TokenRetval::TK_COMMAND_BS:
1694 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Unexpected command {} found as argument of \\addindex",
1695 parser()->context.token->name);
1719 for (
const auto &opt :
attribs)
1721 if (opt.name==
"id" && !opt.value.isEmpty())
1746 Token retval = Token::make_TK_NONE();
1749 while (!tok.
is_any_of(TokenRetval::TK_NONE, TokenRetval::TK_EOF))
1753 switch (tok.
value())
1755 case TokenRetval::TK_HTMLTAG:
1760 retval = Token::make_RetVal_OK();
1765 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Unexpected html tag <{}{}> found within <caption> context",
1766 parser()->context.token->endTag?
"/":
"",
parser()->context.token->name);
1777 if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
1792 Token retval = Token::make_RetVal_OK();
1803 retval=par->
parse();
1804 if (retval.
is(TokenRetval::TK_HTMLTAG))
1809 retval = Token::make_TK_NEWPARA();
1813 retval = Token::make_TK_NEWPARA();
1817 while (retval.
is_any_of(TokenRetval::TK_NEWPARA,TokenRetval::RetVal_EndParBlock));
1826 Token retval = Token::make_RetVal_OK();
1837 retval=par->
parse();
1838 if (retval.
is(TokenRetval::TK_HTMLTAG))
1843 retval = Token::make_TK_NEWPARA();
1847 retval = Token::make_TK_NEWPARA();
1851 while (retval.
is(TokenRetval::TK_NEWPARA));
1859 for (
const auto &attr :
attribs())
1861 if (attr.name.lower()==
"rowspan")
1863 return attr.value.toUInt();
1871 for (
const auto &attr :
attribs())
1873 if (attr.name.lower()==
"colspan")
1875 return std::max(1u,attr.value.toUInt());
1883 for (
const auto &attr :
attribs())
1887 if (attrName==
"align")
1889 if (attrValue==
"center")
1891 else if (attrValue==
"right")
1895 else if (attrName==
"class" && attrValue.
startsWith(
"markdowntable"))
1897 if (attrValue==
"markdowntableheadcenter")
1899 else if (attrValue==
"markdowntableheadright")
1901 else if (attrValue==
"markdowntableheadleft")
1903 else if (attrValue==
"markdowntableheadnone")
1905 else if (attrValue==
"markdowntablebodycenter")
1907 else if (attrValue==
"markdowntablebodyright")
1909 else if (attrValue==
"markdowntablebodyleft")
1911 else if (attrValue==
"markdowntablebodynone")
1921 for (
const auto &attr :
attribs())
1925 if (attrName==
"valign")
1927 if (attrValue==
"top")
1929 else if (attrValue==
"bottom")
1931 else if (attrValue==
"middle")
1946 const DocHtmlCell *cell = std::get_if<DocHtmlCell>(&n);
1962 while (tok.
is_any_of(TokenRetval::TK_WHITESPACE,TokenRetval::TK_NEWPARA,TokenRetval::TK_HTMLTAG,
1963 TokenRetval::TK_COMMAND_AT,TokenRetval::TK_COMMAND_BS))
1965 if (tok.
is(TokenRetval::TK_HTMLTAG))
1981 else if (tok.
is(TokenRetval::TK_COMMAND_AT) || tok.
is(TokenRetval::TK_COMMAND_BS))
1991 if (!tok.
is(TokenRetval::TK_WORD))
2019 Token retval = Token::make_RetVal_OK();
2028 if (tok.
is(TokenRetval::TK_HTMLTAG))
2041 "found <{}{}> instead!",
parser()->context.token->endTag ?
"/" :
"",
parser()->context.token->name);
2046 else if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
2049 " for a html description title");
2054 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"expected <td> or <th> tag but found {} token instead!",
2068 retval=cell->
parse();
2069 isHeading = retval.
is(TokenRetval::RetVal_TableHCell);
2071 if (retval.
is(TokenRetval::RetVal_EndTableCell))
2077 if (tok.
is(TokenRetval::TK_HTMLTAG))
2080 !
parser()->context.token->endTag)
2082 retval = Token::make_RetVal_TableCell();
2087 if (
parser()->context.token->endTag)
2089 retval = Token::make_RetVal_EndTableRow();
2093 retval = Token::make_RetVal_TableRow();
2098 retval = Token::make_RetVal_EndTable();
2103 "found <{}{}> instead!",
parser()->context.token->endTag ?
"/" :
"",
parser()->context.token->name);
2110 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"expected <td>, <th> or <tr> tag but found {} token instead!",
2116 while (retval.
is_any_of(TokenRetval::RetVal_TableCell,TokenRetval::RetVal_TableHCell));
2126 Token retval = Token::make_RetVal_OK();
2137 if (tok.
is(TokenRetval::TK_HTMLTAG))
2149 "found <{}> instead!",
parser()->context.token->name);
2154 else if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
2157 " for a html description title");
2162 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"expected <td> or <th> tag but found {} token instead!",
2175 while (retval.
is_any_of(TokenRetval::RetVal_TableCell,TokenRetval::RetVal_TableHCell));
2199 const DocHtmlRow *row = std::get_if<DocHtmlRow>(&rowNode);
2212 Token retval = Token::make_RetVal_OK();
2219 if (tok.
is(TokenRetval::TK_HTMLTAG))
2225 retval = Token::make_RetVal_TableRow();
2236 retval=std::get<DocHtmlCaption>(*m_caption).parse();
2238 if (retval.
is(TokenRetval::RetVal_OK))
2247 "found <{}{}> instead!",
parser()->context.token->endTag ?
"/" :
"",
parser()->context.token->name);
2250 else if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
2253 " for a <tr> or <caption> tag");
2262 while (retval.
is(TokenRetval::RetVal_TableRow))
2267 if (retval.is(TokenRetval::RetVal_EndTableRow))
2275 retval = Token::make_RetVal_TableRow();
2279 retval = Token::make_RetVal_EndTable();
2284 "found token {} instead!",retval.to_string());
2285 retval=Token::make_RetVal_OK();
2293 return retval.
is(TokenRetval::RetVal_EndTable) ? Token::make_RetVal_OK() : retval;
2299 Token retval = Token::make_RetVal_OK();
2308 bool isHeader=
FALSE;
2309 if (tok.
is(TokenRetval::TK_HTMLTAG))
2314 retval = Token::make_RetVal_TableRow();
2318 retval = Token::make_RetVal_TableRow();
2324 while (retval.
is(TokenRetval::RetVal_TableRow))
2328 retval=tr->parseXml(isHeader);
2363 DocHtmlRow *row = std::get_if<DocHtmlRow>(&rowNode);
2366 for (
auto &cellNode : row->
children())
2368 DocHtmlCell *cell = std::get_if<DocHtmlCell>(&cellNode);
2371 uint32_t rs = cell->
rowSpan();
2372 uint32_t cs = cell->
colSpan();
2374 for (
size_t i=0;i<rowSpans.size();i++)
2376 if (rowSpans[i].rowsLeft>0 &&
2377 rowSpans[i].column==colIdx)
2379 colIdx=rowSpans[i].column+1;
2383 if (rs>0) rowSpans.emplace_back(rs,colIdx);
2391 for (
size_t i=0;i<rowSpans.size();i++)
2393 if (rowSpans[i].rowsLeft>0) rowSpans[i].rowsLeft--;
2399 if (colIdx-1>maxCols) maxCols=colIdx-1;
2409 Token retval = Token::make_TK_NONE();
2413 while (!tok.
is_any_of(TokenRetval::TK_NONE, TokenRetval::TK_EOF))
2417 switch (tok.
value())
2419 case TokenRetval::TK_COMMAND_AT:
2421 case TokenRetval::TK_COMMAND_BS:
2424 bool isJavaLink=
FALSE;
2430 if (!tok.
is(TokenRetval::TK_WHITESPACE))
2439 if (!tok.
is(TokenRetval::TK_WORD))
2441 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"unexpected token {} as the argument of '{:c}{}' command",
2459 if (!tok.
is(TokenRetval::TK_WHITESPACE))
2468 if (!tok.
is(TokenRetval::TK_WORD))
2470 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"unexpected token {} as the argument of \\{} command",
2478 QCString leftOver = lnk->parse(isJavaLink);
2479 if (!leftOver.isEmpty())
2493 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Illegal command '{:c}{}' found as part of a <dt> tag",
2498 case TokenRetval::TK_SYMBOL:
2499 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Unsupported symbol '{}' found as part of a <dt> tag",
2500 parser()->context.token->name);
2502 case TokenRetval::TK_HTMLTAG:
2507 retval = Token::make_RetVal_DescData();
2517 retval = Token::make_RetVal_DescTitle();
2522 retval = Token::make_RetVal_EndDesc();
2527 if (!
parser()->context.token->endTag)
2538 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Unexpected html tag <{}{}> found within <dt> context",
2539 parser()->context.token->endTag?
"/":
"",
parser()->context.token->name);
2551 if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
2567 Token retval = Token::make_TK_NONE();
2577 retval=par->
parse();
2579 while (retval.
is(TokenRetval::TK_NEWPARA));
2590 Token retval = Token::make_RetVal_OK();
2598 if (tok.
is(TokenRetval::TK_HTMLTAG))
2608 "found <{}> instead!",
parser()->context.token->name);
2613 else if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
2616 " for a html description title");
2633 if (retval.is(TokenRetval::RetVal_DescData))
2636 while (retval.is(TokenRetval::RetVal_DescData))
2643 else if (!retval.is(TokenRetval::RetVal_DescTitle))
2648 }
while (retval.
is(TokenRetval::RetVal_DescTitle));
2650 if (retval.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
2652 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"unexpected end of comment while inside <dl> block");
2657 return retval.
is(TokenRetval::RetVal_EndDesc) ? Token::make_RetVal_OK() : retval;
2665 Token retval = Token::make_TK_NONE();
2676 retval=par->
parse();
2678 while (retval.
is(TokenRetval::TK_NEWPARA));
2688 Token retval = Token::make_TK_NONE();
2699 retval=par->
parse();
2700 if (retval.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
break;
2704 if (retval.
is(TokenRetval::RetVal_ListItem))
2709 while (!retval.
is(TokenRetval::RetVal_CloseXml));
2722 Token retval = Token::make_RetVal_OK();
2731 if (tok.
is(TokenRetval::TK_HTMLTAG))
2740 ) &&
parser()->context.token->endTag
2746 retval = Token::make_RetVal_EndList();
2754 "found <{}{}> instead!",
parser()->context.token->endTag?
"/":
"",
parser()->context.token->name);
2759 else if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
2764 " for a html list item");
2781 }
while (retval.
is(TokenRetval::RetVal_ListItem));
2783 if (retval.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
2785 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"unexpected end of comment while inside <{:c}l> block",
2791 return retval.
is(TokenRetval::RetVal_EndList) ? Token::make_RetVal_OK() : retval;
2797 Token retval = Token::make_RetVal_OK();
2806 if (tok.
is(TokenRetval::TK_HTMLTAG))
2817 "found <{}> instead!",
parser()->context.token->name);
2822 else if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
2825 " for a html list item");
2839 retval=li->parseXml();
2840 if (retval.is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
break;
2842 }
while (retval.
is(TokenRetval::RetVal_ListItem));
2844 if (retval.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
2846 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"unexpected end of comment while inside <list type=\"{}\"> block",
2852 return (retval.
is_any_of(TokenRetval::RetVal_EndList,TokenRetval::RetVal_CloseXml) ||
parser()->context.token->name==
"list") ?
2853 Token::make_RetVal_OK() : retval;
2861 Token retval = Token::make_TK_NONE();
2872 retval=par->
parse();
2874 while (retval.
is(TokenRetval::TK_NEWPARA));
2877 if (retval.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
2879 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"unexpected end of comment while inside <blockquote> block");
2883 return retval.
is(TokenRetval::RetVal_EndBlockQuote) ? Token::make_RetVal_OK() : retval;
2891 Token retval = Token::make_TK_NONE();
2902 retval=par->
parse();
2904 while (retval.
is(TokenRetval::TK_NEWPARA));
2908 return retval.
is(TokenRetval::RetVal_EndBlockQuote) ? Token::make_RetVal_OK() : retval;
2935 Token rv = Token::make_TK_NONE();
2941 }
while (rv.
is(TokenRetval::RetVal_ListItem));
2942 return (!rv.
is(TokenRetval::TK_NEWPARA)) ? rv : Token::make_RetVal_OK();
2955 Token retval = Token::make_RetVal_OK();
2965 if (isFirst) { par->markFirst(); isFirst=
FALSE; }
2966 retval=par->parse();
2967 if (!par->isEmpty())
2978 }
while (retval.
is(TokenRetval::TK_NEWPARA) &&
parser()->context.token->indent>
m_indent);
2997 Token retval = Token::make_RetVal_OK();
3004 switch (
parser()->context.token->id)
3026 while (retval.
is(TokenRetval::TK_LISTITEM) &&
3030 (
parser()->context.token->id==-1 ||
parser()->context.token->id>=num)
3046 while (!tok.
is_any_of(TokenRetval::TK_NONE, TokenRetval::TK_EOF))
3078 return m_title && std::get<DocTitle>(*m_title).hasTitle();
3090 std::get_if<DocTitle>(
m_title.get())->parse();
3094 if (!
children().empty() && std::holds_alternative<DocPara>(
children().back()))
3112 Token retval = par->parse();
3132 return Token::make_RetVal_OK();
3140 Token retval = Token::make_RetVal_OK();
3144 if (!
children().empty() && std::holds_alternative<DocPara>(
children().back()))
3146 std::get<DocPara>(
children().back()).markLast(
false);
3158 retval = par->parse();
3159 if (retval.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
break;
3160 if (retval.
is(TokenRetval::RetVal_CloseXml))
3162 retval = Token::make_RetVal_OK();
3174 if (
children().empty() || (p=std::get_if<DocPara>(&
children().back()))==
nullptr)
3196 case See:
return "see";
3197 case Return:
return "return";
3199 case Authors:
return "author";
3200 case Version:
return "version";
3201 case Since:
return "since";
3202 case Date:
return "date";
3203 case Note:
return "note";
3204 case Warning:
return "warning";
3205 case Pre:
return "pre";
3206 case Post:
return "post";
3208 case Invar:
return "invariant";
3209 case Remark:
return "remark";
3212 case User:
return "user";
3213 case Rcs:
return "rcs";
3223 Token retval = Token::make_RetVal_OK();
3229 if (!tok.
is(TokenRetval::TK_WHITESPACE))
3233 retval = Token::make_RetVal_EndParBlock();
3238 while (tok.
is(TokenRetval::TK_WORD))
3243 if (typeSeparator!=-1)
3249 if (
parent() && std::holds_alternative<DocParamSect>(*
parent()))
3251 std::get<DocParamSect>(*
parent()).m_hasTypeSpecifier=
true;
3270 if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
3272 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"unexpected end of comment block while parsing the "
3273 "argument of command {}",saveCmdName);
3274 retval = Token::make_RetVal_EndParBlock();
3277 if (!tok.
is(TokenRetval::TK_WHITESPACE))
3279 if (!tok.
is(TokenRetval::TK_NEWPARA))
3281 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"unexpected token {} in comment block while parsing the "
3282 "argument of command {}",tok.
to_string(),saveCmdName);
3284 retval = Token::make_RetVal_EndParBlock();
3290 retval = par->
parse();
3302 Token retval = Token::make_RetVal_OK();
3323 retval = par->parse();
3345 if (retval.is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
break;
3347 }
while (retval.
is(TokenRetval::RetVal_CloseXml) &&
3352 if (retval.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
3358 retval = Token::make_RetVal_OK();
3370 Token retval = Token::make_RetVal_OK();
3378 if (!
children().empty() && std::holds_alternative<DocParamList>(
children().back()))
3393 retval = pl->parseXml(cmdName);
3397 retval = pl->parse(cmdName);
3399 if (retval.
is(TokenRetval::RetVal_EndParBlock))
3401 retval = Token::make_RetVal_OK();
3420 bool needsSeparator =
FALSE;
3422 (ss=
children().get_last<DocSimpleSect>()) &&
3427 needsSeparator =
TRUE;
3434 Token rv = Token::make_RetVal_OK();
3443 return (!rv.
is(TokenRetval::TK_NEWPARA)) ? rv : Token::make_RetVal_OK();
3448 bool xmlContext=
FALSE,
3454 (ps=
children().get_last<DocParamSect>()) &&
3466 return (!rv.
is(TokenRetval::TK_NEWPARA)) ? rv : Token::make_RetVal_OK();
3477 if (tok.
is(TokenRetval::TK_WORD) &&
parser()->context.token->name==
"{")
3482 for (
auto const &opt : optList)
3484 if (opt ==
"number")
3488 warn(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Multiple options specified with \\{}, discarding '{}'", saveCmdName, opt);
3495 else if (opt ==
"year")
3499 warn(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Multiple options specified with \\{}, discarding '{}'", saveCmdName, opt);
3506 else if (opt ==
"shortauthor")
3510 warn(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Multiple options specified with \\{}, discarding '{}'", saveCmdName, opt);
3517 else if (opt ==
"nopar")
3521 else if (opt ==
"nocite")
3527 warn(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Unknown option specified with \\{}, discarding '{}'", saveCmdName, opt);
3535 if (!tok.
is(TokenRetval::TK_WHITESPACE))
3542 else if (!tok.
is(TokenRetval::TK_WHITESPACE))
3545 cmdChar,saveCmdName);
3555 if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
3557 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"THE ONE unexpected end of comment block while parsing the "
3558 "argument of command '{:c}{}'",cmdChar,saveCmdName);
3561 else if (!tok.
is_any_of(TokenRetval::TK_WORD,TokenRetval::TK_LNKWORD))
3579 if (!tok.
is(TokenRetval::TK_WHITESPACE))
3587 if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
3589 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"no emoji name given or unexpected end of comment block while parsing the "
3590 "argument of command '{:c}{}'",cmdChar,cmdName);
3594 else if (!tok.
is(TokenRetval::TK_WORD))
3609 if (!tok.
is(TokenRetval::TK_WHITESPACE))
3617 if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
3619 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"unexpected end of comment block while parsing the "
3620 "argument of command '{:c}{}'",cmdChar,cmdName);
3623 else if (!tok.
is_any_of(TokenRetval::TK_WORD,TokenRetval::TK_LNKWORD))
3633 switch (opt->
kind())
3653 std::string lstFormat =
theTranslator->trWriteList(
static_cast<int>(lst->size())).str();
3654 static const reg::Ex marker(R
"(@(\d+))");
3659 for ( ; it!=
end ; ++it)
3661 const auto &match = *it;
3662 size_t newIndex = match.position();
3663 size_t matchLen = match.length();
3664 optionValue += lstFormat.substr(index,newIndex-index);
3665 unsigned long entryIndex = std::stoul(match[1].str());
3666 if (entryIndex<(
unsigned long)lst->size())
3668 optionValue += lst->at(entryIndex);
3670 index=newIndex+matchLen;
3672 optionValue+=lstFormat.substr(index);
3677 warn(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Obsolete setting for '{:c}{}': '{}'",
3678 cmdChar,cmdName,
parser()->context.token->name);
3682 "Disabled setting (i.e. not supported in this doxygen executable) for '{:c}{}': '{}'",
3683 cmdChar,cmdName,
parser()->context.token->name);
3696 warn(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Unknown option for '{:c}{}': '{}'",
3697 cmdChar,cmdName,
parser()->context.token->name);
3707 ASSERT(retval.
is(TokenRetval::TK_WHITESPACE));
3710 if (retval.
is(TokenRetval::RetVal_OK))
3730 if (!tok.
is(TokenRetval::TK_WHITESPACE))
3738 if (!tok.
is(TokenRetval::TK_WORD))
3752 bool specDateOnlyWS = !specDateRaw.
isEmpty() && specDate.
isEmpty();
3753 if (!specDate.
isEmpty() && !tok.
is_any_of(TokenRetval::TK_WORD,TokenRetval::TK_NONE,TokenRetval::TK_EOF))
3755 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"invalid <date_time> argument for command '{:c}{}'",
3766 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"invalid <date_time> argument for command '{:c}{}': {}",
3767 cmdChar,cmdName,
err);
3779 if ((usedFormat&bitMask) && !(specFormat&bitMask))
3781 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.",
3799 if (!tok.
is(TokenRetval::TK_WORD))
3812 if (!tok.
is(TokenRetval::TK_WHITESPACE))
3821 if (!tok.
is(TokenRetval::TK_WORD))
3837 if (!tok.
is(TokenRetval::TK_WHITESPACE))
3846 if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
3848 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"unexpected end of comment block while parsing the "
3849 "argument of command {}", saveCmdName);
3852 else if (!tok.
is(TokenRetval::TK_WORD))
3876 (!n1_docIncOp && !n1_docWs) ||
3877 (n1_docWs && n2 && !n2_docIncOp);
3882 n1_docIncOp->markLast(
false);
3884 else if (n1_docWs && n2_docIncOp)
3897 if (!tok.
is(TokenRetval::TK_WHITESPACE))
3906 if (!tok.
is(TokenRetval::TK_WORD))
3933 AUTO_TRACE(
"cmdName={} isJavaLink={}",cmdName,isJavaLink);
3936 if (!tok.
is(TokenRetval::TK_WHITESPACE))
3944 if (!tok.
is(TokenRetval::TK_WORD))
3950 if (saveCmdName ==
"javalink")
3959 if (saveCmdName ==
"javalink")
3965 QCString leftOver = lnk->parse(isJavaLink);
3977 if (!tok.
is(TokenRetval::TK_WHITESPACE))
3980 cmdChar,
qPrint(saveCmdName));
3985 if (!tok.
is(TokenRetval::TK_WORD))
4004 bool isBlock =
false;
4005 bool trimLeft =
false;
4006 bool localScope =
false;
4008 if (tok.
is(TokenRetval::TK_WORD) &&
parser()->context.token->name==
"{")
4014 auto contains = [&optList](
const char *kw)
4016 return std::find(optList.begin(),optList.end(),kw)!=optList.end();
4018 localScope = contains(
"local");
4019 if (contains(
"nostrip"))
4021 stripCodeComments =
false;
4023 else if (contains(
"strip"))
4025 stripCodeComments =
true;
4032 if (contains(
"lineno"))
4039 if (!tok.
is(TokenRetval::TK_WHITESPACE))
4046 else if (tok.
is(TokenRetval::TK_WORD) &&
parser()->context.token->name==
"[")
4054 else if (!tok.
is(TokenRetval::TK_WHITESPACE))
4063 if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
4065 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"unexpected end of comment block while parsing the "
4066 "argument of command {}",saveCmdName);
4069 else if (!tok.
is(TokenRetval::TK_WORD))
4083 if (!tok.
is(TokenRetval::TK_WORD))
4085 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"expected block identifier, but found token {} instead while parsing the {} command",
4100 blockId,isBlock,trimLeft);
4110 if (!tok.
is(TokenRetval::TK_WHITESPACE))
4113 cmdChar,saveCmdName);
4117 if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
4119 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"unexpected end of comment block while parsing the "
4120 "argument of command '{:c}{}'", cmdChar,saveCmdName);
4123 else if (!tok.
is_any_of(TokenRetval::TK_WORD,TokenRetval::TK_LNKWORD))
4140 return retval.is(TokenRetval::RetVal_OK) ? Token::make_TK_NEWPARA() : retval;
4162 if (
parser()->context.xmlComment)
4168 while (i<l && (
parser()->context.token->verb.at(i)==
' ' ||
parser()->context.token->verb.at(i)==
'\n'))
4170 if (
parser()->context.token->verb.at(i)==
'\n') li=i+1;
4180 if (retval.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
4191 if (
parser()->context.memberDef)
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 int idx = fullMatch.
find(
'{');
4513 int idxEnd = fullMatch.
find(
"}",idx+1);
4519 for (
const auto &opt : optList)
4521 if (opt.empty())
continue;
4524 if (locOpt ==
"code")
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 int idx = fullMatch.
find(
'{');
4635 int idxEnd = fullMatch.
find(
"}",idx+1);
4642 for (
const auto &opt : optList)
4644 if (opt.empty())
continue;
4652 warn(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Multiple definition of engine for '\\startuml'");
4665 warn(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Multiple use of filename for '\\startuml'");
4674 if (engine.
isEmpty()) engine =
"uml";
4680 assert(retval.is(TokenRetval::RetVal_OK));
4701 if (engine ==
"ditaa")
4703 dv->setUseBitmap(
true);
4705 else if (engine ==
"uml")
4707 int i = trimmedVerb.
find(
'\n');
4708 QCString firstLine = i==-1 ? trimmedVerb : trimmedVerb.
left(i);
4711 dv->setText(trimmedVerb);
4712 dv->setWidth(width);
4713 dv->setHeight(height);
4714 dv->setLocation(
parser()->context.fileName,
parser()->tokenizer.getLineNr());
4717 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"ignoring \\startuml command because PLANTUML_JAR_PATH is not set");
4720 if (retval.is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
4728 retval = Token::make_RetVal_EndParBlock();
4787 retval = Token::make_RetVal_Internal();
4790 retval = Token::make_RetVal_EndInternal();
4859 "ignoring \\dotfile command because HAVE_DOT is not set");
4947 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Unexpected command '{}' in paragraph context",cmdName);
4950 INTERNAL_ASSERT(retval.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF,TokenRetval::RetVal_OK,TokenRetval::RetVal_SimpleSec
4951 TokenRetval::TK_LISTITEM,TokenRetval::TK_ENDLIST,TokenRetval::TK_NEWPARA
4952 TokenRetval::RetVal_Section,TokenRetval::RetVal_EndList
4953 TokenRetval::RetVal_Internal,TokenRetval::RetVal_SwitchLang
4954 TokenRetval::RetVal_EndInternal)
4961 const char *attrName,
4965 for (
const auto &opt : tagHtmlAttribs)
4967 if (opt.name==attrName)
4969 *result = opt.value;
4978 AUTO_TRACE(
"tagName={} #tagHtmlAttrs={}",tagName,tagHtmlAttribs.size());
4979 Token retval = Token::make_RetVal_OK();
4985 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"HTML tag ('<{}/>') may not use the 'empty tag' XHTML syntax.",
4991 if (!
parser()->context.token->emptyTag)
4999 if (!
parser()->context.token->emptyTag)
5007 if (
parser()->context.token->emptyTag)
break;
5014 retval = Token::make_RetVal_ListItem();
5036 if (
parser()->context.token->emptyTag)
break;
5037 if (
parser()->context.xmlComment)
5082 if (
parser()->context.token->emptyTag)
break;
5088 retval = Token::make_TK_NEWPARA();
5091 if (!
parser()->context.token->emptyTag)
5100 retval = Token::make_RetVal_DescTitle();
5110 retval = Token::make_RetVal_DescData();
5118 if (!
parser()->context.token->emptyTag)
5126 retval = Token::make_RetVal_TableRow();
5129 retval = Token::make_RetVal_TableCell();
5132 retval = Token::make_RetVal_TableHCell();
5179 if (!
parser()->context.token->emptyTag)
5186 if (!
parser()->context.token->emptyTag)
5196 if (!
parser()->context.token->emptyTag)
5199 while (n && !std::holds_alternative<DocHtmlDetails>(*n)) n=
::parent(n);
5209 retval = Token::make_TK_NEWPARA();
5223 retval = Token::make_TK_NEWPARA();
5229 retval = Token::make_RetVal_TableCell();
5299 retval = Token::make_RetVal_TableRow();
5303 retval = Token::make_RetVal_ListItem();
5318 retval = Token::make_RetVal_TableCell();
5332 if (
parser()->context.token->emptyTag)
5349 if (!leftOver.isEmpty())
5367 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Missing 'cref' or 'langword' attribute from <see> tag.");
5395 std::get<DocSimpleSect>(*vss).appendLinkWord(cref);
5396 retval = Token::make_RetVal_OK();
5453 Token retval = Token::make_RetVal_OK();
5463 retval = Token::make_RetVal_EndList();
5473 retval = Token::make_RetVal_EndList();
5489 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"found </details> tag without matching <details>");
5493 retval = Token::make_RetVal_EndHtmlDetails();
5499 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"found </blockquote> tag without matching <blockquote>");
5503 retval = Token::make_RetVal_EndBlockQuote();
5563 retval = Token::make_TK_NEWPARA();
5566 retval = Token::make_RetVal_EndDesc();
5575 retval = Token::make_RetVal_EndTable();
5578 retval = Token::make_RetVal_EndTableRow();
5581 retval = Token::make_RetVal_EndTableCell();
5584 retval = Token::make_RetVal_EndTableCell();
5628 retval = Token::make_TK_NEWPARA();
5642 retval = Token::make_RetVal_CloseXml();
5678 if (!std::get_if<DocAutoListItem>(n))
5686 const auto docAutoList = std::get_if<DocAutoList>(n);
5689 indent = docAutoList->indent();
5698 const auto docPara = std::get_if<DocPara>(n);
5704 return std::get<DocStyleChange>(*stack.top());
5714 indentStr.
fill(
' ',indent);
5729 Token retval = Token::make_TK_NONE();
5730 while (!tok.
is_any_of(TokenRetval::TK_NONE, TokenRetval::TK_EOF))
5734 if (tok.
is_any_of(TokenRetval::TK_WORD,TokenRetval::TK_LNKWORD,TokenRetval::TK_SYMBOL,TokenRetval::TK_URL,
5735 TokenRetval::TK_COMMAND_AT,TokenRetval::TK_COMMAND_BS,TokenRetval::TK_HTMLTAG)
5742 case TokenRetval::TK_WORD:
5745 case TokenRetval::TK_LNKWORD:
5748 case TokenRetval::TK_URL:
5751 case TokenRetval::TK_WHITESPACE:
5769 case TokenRetval::TK_LISTITEM:
5773 while (n && !std::holds_alternative<DocAutoList>(*n)) n=
::parent(n);
5774 const DocAutoList *al = std::get_if<DocAutoList>(n);
5781 retval = Token::make_TK_LISTITEM();
5791 al = std::get_if<DocAutoList>(n);
5805 }
while (retval.
is(TokenRetval::TK_LISTITEM) &&
5810 if (retval.
is(TokenRetval::RetVal_SimpleSec))
5816 if (
parser()->context.token->name.startsWith(
"rcs:"))
5820 tok = Token::make_TK_RCSTAG();
5824 tok = Token::make_TK_COMMAND_BS();
5829 else if (retval.
is(TokenRetval::TK_ENDLIST))
5845 case TokenRetval::TK_ENDLIST:
5846 AUTO_TRACE_ADD(
"Found end of list inside of paragraph at line {}",
parser()->tokenizer.getLineNr());
5847 if (std::get_if<DocAutoListItem>(
parent()))
5850 if (al && al->
indent()>=
parser()->context.token->indent)
5853 retval = Token::make_TK_ENDLIST();
5859 "has invalid indent level");
5868 case TokenRetval::TK_COMMAND_AT:
5870 case TokenRetval::TK_COMMAND_BS:
5875 while (n && !std::holds_alternative<DocSimpleSect>(*n) &&
5876 !std::holds_alternative<DocParamSect>(*n))
5887 retval = Token::make_RetVal_SimpleSec();
5893 while (n && !std::holds_alternative<DocSimpleListItem>(*n)) n=
::parent(n);
5898 retval = Token::make_RetVal_ListItem();
5908 if (retval.
is(TokenRetval::RetVal_SimpleSec))
5914 if (
parser()->context.token->name.startsWith(
"rcs:"))
5918 tok = Token::make_TK_RCSTAG();
5922 tok = Token::make_TK_COMMAND_BS();
5927 else if (retval.
value()>TokenRetval::TK_NONE && retval.
value()<TokenRetval::RetVal_OK)
5933 else if (retval.
value()!=TokenRetval::RetVal_OK)
5940 case TokenRetval::TK_HTMLTAG:
5942 if (!
parser()->context.token->endTag)
5954 if (!retval.
is(TokenRetval::RetVal_OK))
5960 case TokenRetval::TK_SYMBOL:
5971 parser()->context.token->name);
5975 case TokenRetval::TK_NEWPARA:
5976 retval = Token::make_TK_NEWPARA();
5978 case TokenRetval::TK_RCSTAG:
5981 while (n && !std::holds_alternative<DocSimpleSect>(*n) &&
5982 !std::holds_alternative<DocParamSect>(*n))
5992 retval = Token::make_RetVal_SimpleSec();
6003 "Found unexpected token (id={})",tok.
to_string());
6008 retval=Token::make_TK_NONE();
6011 DocPara *par = std::get_if<DocPara>(
parser()->context.nodeStack.top());
6012 if (!
parser()->context.token->endTag && par &&
6013 retval.
is(TokenRetval::TK_NEWPARA) &&
parser()->context.token->name.lower() ==
"p")
6017 INTERNAL_ASSERT(retval.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF,TokenRetval::TK_NEWPARA,TokenRetval::TK_LISTITEM,
6018 TokenRetval::TK_ENDLIST,TokenRetval::RetVal_OK)
6030 Token retval = Token::make_RetVal_OK();
6033 if (!
m_id.isEmpty())
6055 if (isFirst) { par->markFirst(); isFirst=
FALSE; }
6056 retval=par->parse();
6057 if (!par->isEmpty())
6066 if (retval.
is(TokenRetval::TK_LISTITEM))
6070 if (retval.
is(TokenRetval::RetVal_Internal))
6074 if (retval.is(TokenRetval::RetVal_EndInternal))
6076 retval = Token::make_RetVal_OK();
6079 }
while (!retval.
is_any_of(TokenRetval::TK_NONE, TokenRetval::TK_EOF, TokenRetval::RetVal_Section, TokenRetval::RetVal_Subsection,
6080 TokenRetval::RetVal_Subsubsection, TokenRetval::RetVal_Paragraph, TokenRetval::RetVal_SubParagraph,
6081 TokenRetval::RetVal_SubSubParagraph, TokenRetval::RetVal_EndInternal)
6088 if (retval.
is(TokenRetval::RetVal_Subsection) &&
m_level<=1)
6091 while (retval.
is(TokenRetval::RetVal_Subsection))
6100 else if (retval.
is(TokenRetval::RetVal_Subsubsection) &&
m_level<=2)
6106 parser()->tokenizer.getLineNr(),
6107 "Unexpected subsubsection command found inside {}!",
6111 while (retval.
is(TokenRetval::RetVal_Subsubsection))
6118 if (!(
m_level < 2 && retval.
is(TokenRetval::RetVal_Subsection)))
break;
6120 else if (retval.
is(TokenRetval::RetVal_Paragraph) &&
m_level<=3)
6126 "Unexpected paragraph command found inside {}!",
6130 while (retval.
is(TokenRetval::RetVal_Paragraph))
6137 if (!(
m_level<3 && (retval.
is_any_of(TokenRetval::RetVal_Subsection,TokenRetval::RetVal_Subsubsection))))
break;
6139 else if (retval.
is(TokenRetval::RetVal_SubParagraph) &&
m_level<=4)
6145 "Unexpected subparagraph command found inside {}!",
6149 while (retval.
is(TokenRetval::RetVal_SubParagraph))
6156 if (!(
m_level<4 && (retval.
is_any_of(TokenRetval::RetVal_Subsection,TokenRetval::RetVal_Subsubsection,TokenRetval::RetVal_Paragraph))))
break;
6158 else if (retval.
is(TokenRetval::RetVal_SubSubParagraph) &&
m_level<=5)
6164 "Unexpected subsubparagraph command found inside {}!",
6168 while (retval.
is(TokenRetval::RetVal_SubSubParagraph))
6175 if (!(
m_level<5 && (retval.
is_any_of( TokenRetval::RetVal_Subsection, TokenRetval::RetVal_Subsubsection,
6176 TokenRetval::RetVal_Paragraph, TokenRetval::RetVal_SubParagraph))))
break;
6185 TokenRetval::RetVal_Section, TokenRetval::RetVal_Subsection,
6186 TokenRetval::RetVal_Subsubsection, TokenRetval::RetVal_Paragraph,
6187 TokenRetval::RetVal_SubParagraph, TokenRetval::RetVal_SubSubParagraph,
6188 TokenRetval::RetVal_Internal, TokenRetval::RetVal_EndInternal)
6204 while (!tok.
is_any_of(TokenRetval::TK_NONE, TokenRetval::TK_EOF))
6208 case TokenRetval::TK_WORD:
6211 case TokenRetval::TK_WHITESPACE:
6214 case TokenRetval::TK_SYMBOL:
6224 parser()->context.token->name);
6228 case TokenRetval::TK_COMMAND_AT:
6230 case TokenRetval::TK_COMMAND_BS:
6292 parser()->context.token->name);
6316 Token retval = Token::make_TK_NONE();
6326 if (isFirst) { par->markFirst(); isFirst=
FALSE; }
6327 retval=par->parse();
6328 if (par->isEmpty() && par->attribs().empty())
6337 auto checkParagraph = [
this,&retval](
Token t,
int level,
const char *sectionType,
const char *parentSectionType) {
6343 parser()->tokenizer.getLineNr(),
6344 "found {} command (id: '{}') outside of {} context!",
6345 sectionType,
parser()->context.token->sectionId,parentSectionType);
6349 if (!
parser()->context.token->sectionId.isEmpty())
6362 sectionType,
parser()->context.token->sectionId,sectionType);
6363 retval = Token::make_TK_NONE();
6368 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Missing id for {}; ignoring {}",sectionType,sectionType);
6369 retval = Token::make_TK_NONE();
6374 checkParagraph(Token::make_RetVal_SubSubParagraph(), 6,
"subsubparagraph",
"subparagraph" );
6375 checkParagraph(Token::make_RetVal_SubParagraph(), 5,
"subparagraph",
"paragraph" );
6376 checkParagraph(Token::make_RetVal_Paragraph(), 4,
"paragraph",
"subsubsection" );
6377 checkParagraph(Token::make_RetVal_Subsubsection(), 3,
"subsubsection",
"subsection" );
6378 checkParagraph(Token::make_RetVal_Subsection(), 2,
"subsection",
"section" );
6380 if (retval.
is(TokenRetval::TK_LISTITEM))
6384 if (retval.
is(TokenRetval::RetVal_Internal))
6389 }
while (!retval.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF,TokenRetval::RetVal_Section));
6394 while (retval.
is(TokenRetval::RetVal_Section))
6396 if (!
parser()->context.token->sectionId.isEmpty())
6409 retval = Token::make_TK_NONE();
6415 retval = Token::make_TK_NONE();
bool isAliasCmd(std::string_view aliasCmd)
static AnchorGenerator & instance()
Returns the singleton instance.
QCString anchorPrefix() const
const CiteInfo * find(const QCString &label) const
Return the citation info for a given label.
static CitationManager & instance()
QCString fileName() const
constexpr void setNoCite() noexcept
static constexpr CiteInfoOption makeNumber()
constexpr void changeToNumber() noexcept
constexpr void setNoPar() noexcept
constexpr bool isUnknown() const noexcept
static constexpr CiteInfoOption makeYear()
static constexpr CiteInfoOption makeShortAuthor()
Class representing a Boolean type option.
QCString * valueStringRef()
Class representing an enum type option.
static ConfigImpl * instance()
ConfigOption * get(const QCString &name) const
Class representing an integer type option.
QCString * 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.
The common base class of all entity definitions found in the sources.
virtual SrcLangExt getLanguage() const =0
Returns the programming language this definition was written in.
virtual bool isLinkable() const =0
virtual DefType definitionType() const =0
virtual QCString briefDescription(bool abbreviate=FALSE) const =0
virtual QCString getReference() const =0
virtual QCString getSourceFileBase() const =0
virtual QCString documentation() const =0
virtual QCString getOutputFileBase() const =0
virtual Definition * getOuterScope() const =0
virtual const QCString & name() const =0
DocAnchor(DocParser *parser, DocNodeVariant *parent, const QCString &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)
Node representing a citation of some bibliographic reference.
DocCite(DocParser *parser, DocNodeVariant *parent, const QCString &target, const QCString &context, CiteInfoOption opt)
DocCompoundNode(DocParser *parser, DocNodeVariant *parent)
DocDiaFile(DocParser *parser, DocNodeVariant *parent, const QCString &name, const QCString &context, const QCString &srcFile, int srcLine)
std::unique_ptr< Private > p
DocDiagramFileBase(DocParser *parser, DocNodeVariant *parent, const QCString &name, const QCString &context, const QCString &srcFile, int srcLine)
DocDotFile(DocParser *parser, DocNodeVariant *parent, const QCString &name, const QCString &context, const QCString &srcFile, int srcLine)
Node representing an emoji.
DocEmoji(DocParser *parser, DocNodeVariant *parent, const QCString &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 QCString &name, Type t, const QCString &url=QCString(), bool inlineImage=TRUE)
std::unique_ptr< Private > p
Node representing a include/dontinclude operator block.
const char * typeAsString() const
QCString 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 QCString &target)
Node representing a line break.
Node representing a link to some item.
DocLink(DocParser *parser, DocNodeVariant *parent, const QCString &target)
QCString parse(bool, bool isXmlLink=FALSE)
DocLinkedWord(DocParser *parser, DocNodeVariant *parent, const QCString &word, const QCString &ref, const QCString &file, const QCString &anchor, const QCString &tooltip)
DocMscFile(DocParser *parser, DocNodeVariant *parent, const QCString &name, const QCString &context, const QCString &srcFile, int srcLine)
DocNode(DocParser *parser, DocNodeVariant *parent)
void setInsidePreformatted(bool p)
DocNodeVariant * thisVariant()
DocNodeVariant * parent()
Node representing an block of paragraphs.
Node representing a paragraph in the documentation tree.
Token handleSimpleSection(DocSimpleSect::Type t, bool xmlContext=FALSE)
void handleLink(const QCString &cmdName, bool isJavaLink)
void handleCite(char cmdChar, const QCString &cmdName)
DocPara(DocParser *parser, DocNodeVariant *parent)
void handleInclude(const QCString &cmdName, DocInclude::Type t)
Token handleCommand(char cmdChar, const QCString &cmdName)
void handleDoxyConfig(char cmdChar, const QCString &cmdName)
void handleSection(char cmdChar, const QCString &cmdName)
void handleFile(const QCString &cmdName)
void handleIFile(char cmdChar, const QCString &cmdName)
Token handleParamSection(const QCString &cmdName, DocParamSect::Type t, bool xmlContext, int direction)
void markLast(bool v=TRUE)
Token handleHtmlStartTag(const QCString &tagName, const HtmlAttribList &tagHtmlAttribs)
void handleEmoji(char cmdChar, const QCString &cmdName)
void handleIncludeOperator(const QCString &cmdName, DocIncOperator::Type t)
void markFirst(bool v=TRUE)
void handleRef(char cmdChar, const QCString &cmdName)
void handleILine(char cmdChar, const QCString &cmdName)
void setAttribs(const HtmlAttribList &attribs)
Token handleHtmlHeader(const HtmlAttribList &tagHtmlAttribs, int level)
void handleShowDate(char cmdChar, const QCString &cmdName)
Token handleHtmlEndTag(const QCString &tagName)
bool injectToken(Token tok, const QCString &tokText)
void markFirst(bool b=TRUE)
Token parseXml(const QCString ¶mName)
void markLast(bool b=TRUE)
Token parse(const QCString &cmdName)
DocParamSect::Type m_type
Node representing a parameter section.
friend class DocParamList
Token parse(const QCString &cmdName, bool xmlContext, Direction d)
bool defaultHandleToken(DocNodeVariant *parent, Token tok, DocNodeList &children, bool handleWord=TRUE)
void handleLinkedWord(DocNodeVariant *parent, DocNodeList &children, bool ignoreAutoLinkFlag=FALSE)
void handleInternalRef(DocNodeVariant *parent, DocNodeList &children)
void handleParameterType(DocNodeVariant *parent, DocNodeList &children, const QCString ¶mTypes)
void readTextFileByName(const QCString &file, QCString &text)
Token handleAHref(DocNodeVariant *parent, DocNodeList &children, const HtmlAttribList &tagHtmlAttribs)
Token internalValidatingParseDoc(DocNodeVariant *parent, DocNodeList &children, const QCString &doc)
void handleInitialStyleCommands(DocNodeVariant *parent, DocNodeList &children)
void handleStyleLeave(DocNodeVariant *parent, DocNodeList &children, DocStyleChange::Style s, const QCString &tagName)
void handlePendingStyleCommands(DocNodeVariant *parent, DocNodeList &children)
void handleImage(DocNodeVariant *parent, DocNodeList &children)
void handleStyleEnter(DocNodeVariant *parent, DocNodeList &children, DocStyleChange::Style s, const QCString &tagName, const HtmlAttribList *attribs)
void handlePrefix(DocNodeVariant *parent, DocNodeList &children)
Token handleStyleArgument(DocNodeVariant *parent, DocNodeList &children, const QCString &cmdName)
void handleAnchor(DocNodeVariant *parent, DocNodeList &children)
void handleImg(DocNodeVariant *parent, DocNodeList &children, const HtmlAttribList &tagHtmlAttribs)
void defaultHandleTitleAndSize(const CommandType cmd, DocNodeVariant *parent, DocNodeList &children, QCString &width, QCString &height)
void handleUnclosedStyleCommands()
void errorHandleDefaultToken(DocNodeVariant *parent, Token tok, DocNodeList &children, const QCString &txt)
DocPlantUmlFile(DocParser *parser, DocNodeVariant *parent, const QCString &name, const QCString &context, const QCString &srcFile, int srcLine)
Node representing a reference to some item.
SectionType m_sectionType
DocRef(DocParser *parser, DocNodeVariant *parent, const QCString &target, const QCString &context)
Node representing a reference to a section.
DocSecRefItem(DocParser *parser, DocNodeVariant *parent, const QCString &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 QCString &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.
QCString typeString() const
Token parse(bool userTitle, bool needsSeparator)
DocSimpleSect(DocParser *parser, DocNodeVariant *parent, Type t)
const DocNodeVariant * title() const
void appendLinkWord(const QCString &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 QCString &symName)
Node representing a simple section title.
void parseFromString(DocNodeVariant *, const QCString &title)
void setStateILiteralOpt()
void setStatePlantUMLOpt()
void setInsidePre(bool b)
void unputString(const QCString &tag)
void setStateDoxyConfig()
void setStateQuotedString()
void pushBackHtmlTag(const QCString &tag)
Node representing a URL (or email address).
Node representing a verbatim, unparsed text fragment.
DocVerbatim(DocParser *parser, DocNodeVariant *parent, const QCString &context, const QCString &text, Type t, bool isExample, const QCString &exampleFile, bool isBlock=FALSE, const QCString &lang=QCString())
std::unique_ptr< Private > p
QCString exampleFile() const
void setEngine(const QCString &e)
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 QCString &word)
Node representing an item of a cross-referenced list.
DocXRefItem(DocParser *parser, DocNodeVariant *parent, int id, const QCString &key)
static FileNameLinkedMap * plantUmlFileNameLinkedMap
static FileNameLinkedMap * dotFileNameLinkedMap
static NamespaceDefMutable * globalScope
static FileNameLinkedMap * mscFileNameLinkedMap
static FileNameLinkedMap * diaFileNameLinkedMap
static QCString htmlFileExtension
static PageLinkedMap * pageLinkedMap
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 QCString absFilePath() const =0
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.
static HtmlEntityMapper & instance()
Returns the one and only instance of the HTML entity mapper.
SymType name2sym(const QCString &symName) const
Give code of the requested HTML entity name.
const T * find(const std::string &key) const
A model of a class/file/namespace member symbol.
virtual const ClassDef * getClassDef() const =0
virtual const MemberDef * reimplements() const =0
virtual QCString objCMethodName(bool localLink, bool showStatic) const =0
A model of a page symbol.
virtual bool hasParentPage() const =0
This is an alternative implementation of QCString.
int find(char c, int index=0, bool cs=TRUE) const
QCString & prepend(const char *s)
size_t length() const
Returns the length of the string, not counting the 0-terminator.
bool startsWith(const char *s) const
QCString mid(size_t index, size_t len=static_cast< size_t >(-1)) const
bool endsWith(const char *s) const
char & at(size_t i)
Returns a reference to the character at index i.
bool isEmpty() const
Returns TRUE iff the string is empty.
QCString stripWhiteSpace() const
returns a copy of this string with leading and trailing whitespace removed
QCString fill(char c, int len=-1)
Fills a string with a predefined character.
const std::string & str() const
QCString & append(char c)
QCString right(size_t len) const
const char * data() const
Returns a pointer to the contents of the string in the form of a 0-terminated C string.
std::string_view view() const
QCString left(size_t len) const
This struct represents an item in the list of references.
List of cross-referenced items.
QCString sectionTitle() const
QCString fileName() const
RefItem * find(int itemId)
static RefListManager & instance()
class that provide information about a section.
QCString fileName() const
static SectionManager & instance()
returns a reference to the singleton
static constexpr int Anchor
static constexpr int Table
constexpr int level() const
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
static void createFlowChart(const MemberDef *)
Class representing a regular expression.
Class to iterate through matches.
#define Config_getList(name)
#define Config_getBool(name)
#define Config_getString(name)
std::unordered_set< std::string > StringUnorderedSet
std::vector< std::string > StringVector
QCString formatDateTime(const QCString &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...
QCString dateTimeFromString(const QCString &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 QCString stripKnownExtensions(const QCString &text)
static void unescapeCRef(QCString &s)
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, QCString *result)
std::vector< ActiveRowSpan > RowSpanList
List of ActiveRowSpan classes.
static void setParent(DocNodeVariant *n, DocNodeVariant *newParent)
static bool checkIfHtmlEndTagEndsAutoList(DocParser *parser, const DocNodeVariant *n)
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 > DocNodeVariant
constexpr bool holds_one_of_alternatives(const DocNodeVariant &v)
returns true iff v holds one of types passed as template parameters
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)
FileDef * toFileDef(Definition *d)
GroupDef * toGroupDef(Definition *d)
Translator * theTranslator
QCString markdownFileNameToId(const QCString &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
QCString trunc(const QCString &s, size_t numChars=15)
QCString substitute(const QCString &s, const QCString &src, const QCString &dst)
substitute all occurrences of src in s by dst
const char * qPrint(const char *s)
ActiveRowSpan(uint32_t rows, uint32_t col)
virtual QCString text() const =0
virtual QCString shortAuthor() const =0
virtual QCString label() const =0
virtual QCString year() const =0
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,...
StringMultiSet retvalsFound
bool includeFileShowLineNo
DocStyleChangeStack styleStack
StringMultiSet paramsFound
DefinitionStack copyStack
const MemberDef * memberDef
QCString linkToText(SrcLangExt lang, const QCString &link, bool isFileName)
SrcLangExt getLanguageFromFileName(const QCString &fileName, SrcLangExt defLang)
QCString stripIndentation(const QCString &s, bool skipFirstLine)
QCString showFileDefMatches(const FileNameLinkedMap *fnMap, const QCString &n)
QCString stripScope(const QCString &name)
bool resolveLink(const QCString &scName, const QCString &lr, bool, const Definition **resContext, QCString &resAnchor, SrcLangExt lang, const QCString &prefix)
QCString convertNameToFile(const QCString &name, bool allowDots, bool allowUnderscore)
StringVector split(const std::string &s, const std::string &delimiter)
split input string s by string delimiter delimiter.
QCString stripLeadingAndTrailingEmptyLines(const QCString &s, int &docLine)
Special version of QCString::stripWhiteSpace() that only strips completely blank lines.
FileDef * findFileDef(const FileNameLinkedMap *fnMap, const QCString &n, bool &ambig)
A bunch of utility functions.