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();
810 toFileDef(compound)->generateSourceFile()
824 warn_doc_error(
parser->context.fileName,
parser->tokenizer.getLineNr(),
"unable to resolve reference to '{}' for \\ref command",
830 for (
auto &&elem : elements)
840 for (
auto &dn : children)
842 DocPara *para = std::get_if<DocPara>(&dn);
854 for (
auto &cn : children)
861 for (
auto &ccn : *opt_children)
875 while (!tok.
is_any_of(TokenRetval::TK_NONE, TokenRetval::TK_EOF))
881 case TokenRetval::TK_HTMLTAG:
894 if (
parser()->context.insideHtmlLink)
899 "Potential recursion while resolving \\ref command!");
926 if (numBibFiles>0 && cite && !cite->
text().
isEmpty())
937 warn_doc_error(
parser->context.fileName,
parser->tokenizer.getLineNr(),
"\\cite command found but no bib files specified via CITE_BIB_FILES!");
939 else if (cite==
nullptr)
941 warn_doc_error(
parser->context.fileName,
parser->tokenizer.getLineNr(),
"unable to resolve reference to '{}' for \\cite command",
946 warn_doc_error(
parser->context.fileName,
parser->tokenizer.getLineNr(),
"\\cite command to '{}' does not have an associated number",
958 if (!opt.noPar()) txt +=
"[";
962 if (opt.isNumber()) txt += citeInfo->
text();
963 else if (opt.isShortAuthor()) txt += citeInfo->
shortAuthor();
964 else if (opt.isYear()) txt += citeInfo->
year();
967 if (!opt.noPar()) txt +=
"]";
982 m_refText = m_refText.right(m_refText.length()-1);
989 if (compound && compound->isLinkable())
991 m_file = compound->getOutputFileBase();
992 m_ref = compound->getReference();
995 (
toFileDef(compound))->generateSourceFile()
1005 warn_doc_error(parser->context.fileName,parser->tokenizer.getLineNr(),
"unable to resolve link to '{}' for \\link command",
1017 while (!tok.
is_any_of(TokenRetval::TK_NONE, TokenRetval::TK_EOF))
1021 switch (tok.
value())
1023 case TokenRetval::TK_COMMAND_AT:
1025 case TokenRetval::TK_COMMAND_BS:
1041 case TokenRetval::TK_SYMBOL:
1042 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Unsupported symbol '{}' found as part of a \\link",
1043 parser()->context.token->name);
1045 case TokenRetval::TK_HTMLTAG:
1046 if (
parser()->context.token->name!=
"see" || !isXmlLink)
1048 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Unexpected xml/html command {} found as part of a \\link",
1049 parser()->context.token->name);
1052 case TokenRetval::TK_LNKWORD:
1053 case TokenRetval::TK_WORD:
1062 else if ((p=w.
find(
'}'))!=-1)
1064 int l =
static_cast<int>(w.
length());
1068 result=w.
right(l-p-1);
1082 if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
1085 parser()->tokenizer.getLineNr(),
1086 "Unexpected end of comment while inside link command");
1106 p->relPath =
parser->context.relPath;
1116 if (fd==
nullptr && !
p->name.endsWith(
".dot"))
1127 "Possible candidates:\n{}",
p->name,
1135 "in any of the paths specified via DOTFILE_DIRS!",
p->name);
1144 p->relPath =
parser->context.relPath;
1154 if (fd==
nullptr && !
p->name.endsWith(
".msc"))
1165 "Possible candidates:\n{}",
qPrint(
p->name),
1173 "in any of the paths specified via MSCFILE_DIRS!",
p->name);
1184 p->relPath =
parser->context.relPath;
1194 if (fd==
nullptr && !
p->name.endsWith(
".dia"))
1205 "Possible candidates:\n{}",
p->name,
1213 "in any of the paths specified via DIAFILE_DIRS!",
p->name);
1223 p->relPath =
parser->context.relPath;
1233 if (fd==
nullptr && !
p->name.endsWith(
".puml"))
1236 if (fd==
nullptr && !
p->name.endsWith(
".pu"))
1248 "Possible candidates:\n{}",
p->name,
1256 "in any of the paths specified via PLANTUMLFILE_DIRS!",
p->name);
1274 while (!tok.
is_any_of(TokenRetval::TK_NONE, TokenRetval::TK_EOF))
1301 QCString locName =
p->url.isEmpty() ?
p->name :
p->url;
1302 int len =
static_cast<int>(locName.
length());
1303 int fnd = locName.
find(
'?');
1304 if (fnd==-1) fnd=len;
1305 return fnd>=4 && locName.
mid(fnd-4,4)==
".svg";
1319 Token retval(TokenRetval::RetVal_OK);
1323 while (!tok.
is_any_of(TokenRetval::TK_NONE, TokenRetval::TK_EOF))
1327 switch (tok.
value())
1329 case TokenRetval::TK_HTMLTAG:
1388 if (!
parser()->context.token->endTag)
1399 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Unexpected html tag <{}{}> found within <h{:d}> context",
1412 if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
1429 while (!tok.
is_any_of(TokenRetval::TK_NONE, TokenRetval::TK_EOF))
1433 if (tok.
value()==TokenRetval::TK_HTMLTAG &&
1435 parser()->context.token->endTag
1447 if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
1459 Token retval(TokenRetval::TK_NONE);
1470 retval=par->
parse();
1472 while (retval.
is(TokenRetval::TK_NEWPARA));
1475 if (retval.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
1477 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"unexpected end of comment while inside <details> block");
1488 return retval.
is(TokenRetval::RetVal_EndHtmlDetails) ? Token::make_RetVal_OK() : retval;
1504 Token retval(TokenRetval::RetVal_OK);
1508 while (!tok.
is_any_of(TokenRetval::TK_NONE, TokenRetval::TK_EOF))
1512 switch (tok.
value())
1514 case TokenRetval::TK_HTMLTAG:
1527 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Unexpected html tag <{}{}> found within <a href=...> context",
1528 parser()->context.token->endTag?
"/":
"",
parser()->context.token->name);
1539 if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
1542 " <a href=...> tag");
1554 Token retval(TokenRetval::RetVal_OK);
1564 if (isFirst) { par->markFirst(); isFirst=
FALSE; }
1565 retval=par->parse();
1566 if (!par->isEmpty())
1575 if (retval.
is(TokenRetval::TK_LISTITEM))
1579 }
while (!retval.
is_any_of(TokenRetval::TK_NONE, TokenRetval::TK_EOF,
1580 TokenRetval::RetVal_Section, TokenRetval::RetVal_Subsection, TokenRetval::RetVal_Subsubsection,
1581 TokenRetval::RetVal_Paragraph, TokenRetval::RetVal_SubParagraph, TokenRetval::RetVal_SubSubParagraph,
1582 TokenRetval::RetVal_EndInternal));
1586 while ((level==1 && retval.
is(TokenRetval::RetVal_Section)) ||
1587 (level==2 && retval.
is(TokenRetval::RetVal_Subsection)) ||
1588 (level==3 && retval.
is(TokenRetval::RetVal_Subsubsection)) ||
1589 (level==4 && retval.
is(TokenRetval::RetVal_Paragraph)) ||
1590 (level==5 && retval.
is(TokenRetval::RetVal_SubParagraph)) ||
1591 (level==6 && retval.
is(TokenRetval::RetVal_SubSubParagraph))
1600 if (retval.
is(TokenRetval::RetVal_Internal))
1602 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"\\internal command found inside internal section");
1614 Token retval(TokenRetval::RetVal_OK);
1617 if (!tok.
is(TokenRetval::TK_WHITESPACE))
1625 while (!tok.
is_any_of(TokenRetval::TK_NONE, TokenRetval::TK_EOF))
1627 switch (tok.
value())
1629 case TokenRetval::TK_WHITESPACE:
1632 case TokenRetval::TK_WORD:
1633 case TokenRetval::TK_LNKWORD:
1636 case TokenRetval::TK_SYMBOL:
1658 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Unexpected symbol '{}' found as argument of \\addindex",
parser()->context.token->name);
1663 case TokenRetval::TK_COMMAND_AT:
1665 case TokenRetval::TK_COMMAND_BS:
1687 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Unexpected command {} found as argument of \\addindex",
1688 parser()->context.token->name);
1712 for (
const auto &opt :
attribs)
1714 if (opt.name==
"id" && !opt.value.isEmpty())
1739 Token retval = Token::make_TK_NONE();
1742 while (!tok.
is_any_of(TokenRetval::TK_NONE, TokenRetval::TK_EOF))
1746 switch (tok.
value())
1748 case TokenRetval::TK_HTMLTAG:
1753 retval = Token::make_RetVal_OK();
1758 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Unexpected html tag <{}{}> found within <caption> context",
1759 parser()->context.token->endTag?
"/":
"",
parser()->context.token->name);
1770 if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
1785 Token retval = Token::make_RetVal_OK();
1796 retval=par->
parse();
1797 if (retval.
is(TokenRetval::TK_HTMLTAG))
1802 retval = Token::make_TK_NEWPARA();
1806 retval = Token::make_TK_NEWPARA();
1810 while (retval.
is_any_of(TokenRetval::TK_NEWPARA,TokenRetval::RetVal_EndParBlock));
1819 Token retval = Token::make_RetVal_OK();
1830 retval=par->
parse();
1831 if (retval.
is(TokenRetval::TK_HTMLTAG))
1836 retval = Token::make_TK_NEWPARA();
1840 retval = Token::make_TK_NEWPARA();
1844 while (retval.
is(TokenRetval::TK_NEWPARA));
1852 for (
const auto &attr :
attribs())
1854 if (attr.name.lower()==
"rowspan")
1856 return attr.value.toUInt();
1864 for (
const auto &attr :
attribs())
1866 if (attr.name.lower()==
"colspan")
1868 return std::max(1u,attr.value.toUInt());
1876 for (
const auto &attr :
attribs())
1880 if (attrName==
"align")
1882 if (attrValue==
"center")
1884 else if (attrValue==
"right")
1888 else if (attrName==
"class" && attrValue.
startsWith(
"markdowntable"))
1890 if (attrValue==
"markdowntableheadcenter")
1892 else if (attrValue==
"markdowntableheadright")
1894 else if (attrValue==
"markdowntableheadleft")
1896 else if (attrValue==
"markdowntableheadnone")
1898 else if (attrValue==
"markdowntablebodycenter")
1900 else if (attrValue==
"markdowntablebodyright")
1902 else if (attrValue==
"markdowntablebodyleft")
1904 else if (attrValue==
"markdowntablebodynone")
1914 for (
const auto &attr :
attribs())
1918 if (attrName==
"valign")
1920 if (attrValue==
"top")
1922 else if (attrValue==
"bottom")
1924 else if (attrValue==
"middle")
1939 const DocHtmlCell *cell = std::get_if<DocHtmlCell>(&n);
1955 while (tok.
is_any_of(TokenRetval::TK_WHITESPACE,TokenRetval::TK_NEWPARA,TokenRetval::TK_HTMLTAG,
1956 TokenRetval::TK_COMMAND_AT,TokenRetval::TK_COMMAND_BS))
1958 if (tok.
is(TokenRetval::TK_HTMLTAG))
1974 else if (tok.
is(TokenRetval::TK_COMMAND_AT) || tok.
is(TokenRetval::TK_COMMAND_BS))
1984 if (!tok.
is(TokenRetval::TK_WORD))
2012 Token retval = Token::make_RetVal_OK();
2021 if (tok.
is(TokenRetval::TK_HTMLTAG))
2034 "found <{}{}> instead!",
parser()->context.token->endTag ?
"/" :
"",
parser()->context.token->name);
2039 else if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
2042 " for a html description title");
2047 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"expected <td> or <th> tag but found {} token instead!",
2061 retval=cell->
parse();
2062 isHeading = retval.
is(TokenRetval::RetVal_TableHCell);
2064 if (retval.
is(TokenRetval::RetVal_EndTableCell))
2070 if (tok.
is(TokenRetval::TK_HTMLTAG))
2073 !
parser()->context.token->endTag)
2075 retval = Token::make_RetVal_TableCell();
2080 if (
parser()->context.token->endTag)
2082 retval = Token::make_RetVal_EndTableRow();
2086 retval = Token::make_RetVal_TableRow();
2091 retval = Token::make_RetVal_EndTable();
2096 "found <{}{}> instead!",
parser()->context.token->endTag ?
"/" :
"",
parser()->context.token->name);
2103 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"expected <td>, <th> or <tr> tag but found {} token instead!",
2109 while (retval.
is_any_of(TokenRetval::RetVal_TableCell,TokenRetval::RetVal_TableHCell));
2119 Token retval = Token::make_RetVal_OK();
2130 if (tok.
is(TokenRetval::TK_HTMLTAG))
2142 "found <{}> instead!",
parser()->context.token->name);
2147 else if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
2150 " for a html description title");
2155 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"expected <td> or <th> tag but found {} token instead!",
2168 while (retval.
is_any_of(TokenRetval::RetVal_TableCell,TokenRetval::RetVal_TableHCell));
2192 const DocHtmlRow *row = std::get_if<DocHtmlRow>(&rowNode);
2205 Token retval = Token::make_RetVal_OK();
2212 if (tok.
is(TokenRetval::TK_HTMLTAG))
2218 retval = Token::make_RetVal_TableRow();
2229 retval=std::get<DocHtmlCaption>(*m_caption).parse();
2231 if (retval.
is(TokenRetval::RetVal_OK))
2240 "found <{}{}> instead!",
parser()->context.token->endTag ?
"/" :
"",
parser()->context.token->name);
2243 else if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
2246 " for a <tr> or <caption> tag");
2255 while (retval.
is(TokenRetval::RetVal_TableRow))
2260 if (retval.is(TokenRetval::RetVal_EndTableRow))
2268 retval = Token::make_RetVal_TableRow();
2272 retval = Token::make_RetVal_EndTable();
2277 "found token {} instead!",retval.to_string());
2278 retval=Token::make_RetVal_OK();
2286 return retval.
is(TokenRetval::RetVal_EndTable) ? Token::make_RetVal_OK() : retval;
2292 Token retval = Token::make_RetVal_OK();
2301 bool isHeader=
FALSE;
2302 if (tok.
is(TokenRetval::TK_HTMLTAG))
2307 retval = Token::make_RetVal_TableRow();
2311 retval = Token::make_RetVal_TableRow();
2317 while (retval.
is(TokenRetval::RetVal_TableRow))
2321 retval=tr->parseXml(isHeader);
2356 DocHtmlRow *row = std::get_if<DocHtmlRow>(&rowNode);
2359 for (
auto &cellNode : row->
children())
2361 DocHtmlCell *cell = std::get_if<DocHtmlCell>(&cellNode);
2364 uint32_t rs = cell->
rowSpan();
2365 uint32_t cs = cell->
colSpan();
2367 for (
size_t i=0;i<rowSpans.size();i++)
2369 if (rowSpans[i].rowsLeft>0 &&
2370 rowSpans[i].column==colIdx)
2372 colIdx=rowSpans[i].column+1;
2376 if (rs>0) rowSpans.emplace_back(rs,colIdx);
2384 for (
size_t i=0;i<rowSpans.size();i++)
2386 if (rowSpans[i].rowsLeft>0) rowSpans[i].rowsLeft--;
2392 if (colIdx-1>maxCols) maxCols=colIdx-1;
2402 Token retval = Token::make_TK_NONE();
2406 while (!tok.
is_any_of(TokenRetval::TK_NONE, TokenRetval::TK_EOF))
2410 switch (tok.
value())
2412 case TokenRetval::TK_COMMAND_AT:
2414 case TokenRetval::TK_COMMAND_BS:
2417 bool isJavaLink=
FALSE;
2423 if (!tok.
is(TokenRetval::TK_WHITESPACE))
2432 if (!tok.
is(TokenRetval::TK_WORD))
2434 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"unexpected token {} as the argument of '{:c}{}' command",
2452 if (!tok.
is(TokenRetval::TK_WHITESPACE))
2461 if (!tok.
is(TokenRetval::TK_WORD))
2463 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"unexpected token {} as the argument of \\{} command",
2471 QCString leftOver = lnk->parse(isJavaLink);
2472 if (!leftOver.isEmpty())
2482 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Illegal command '{:c}{}' found as part of a <dt> tag",
2487 case TokenRetval::TK_SYMBOL:
2488 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Unsupported symbol '{}' found as part of a <dt> tag",
2489 parser()->context.token->name);
2491 case TokenRetval::TK_HTMLTAG:
2496 retval = Token::make_RetVal_DescData();
2506 retval = Token::make_RetVal_DescTitle();
2511 retval = Token::make_RetVal_EndDesc();
2516 if (!
parser()->context.token->endTag)
2523 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Unexpected html tag <{}{}> found within <dt> context",
2524 parser()->context.token->endTag?
"/":
"",
parser()->context.token->name);
2536 if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
2552 Token retval = Token::make_TK_NONE();
2562 retval=par->
parse();
2564 while (retval.
is(TokenRetval::TK_NEWPARA));
2575 Token retval = Token::make_RetVal_OK();
2583 if (tok.
is(TokenRetval::TK_HTMLTAG))
2593 "found <{}> instead!",
parser()->context.token->name);
2598 else if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
2601 " for a html description title");
2618 if (retval.is(TokenRetval::RetVal_DescData))
2621 while (retval.is(TokenRetval::RetVal_DescData))
2628 else if (!retval.is(TokenRetval::RetVal_DescTitle))
2633 }
while (retval.
is(TokenRetval::RetVal_DescTitle));
2635 if (retval.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
2637 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"unexpected end of comment while inside <dl> block");
2642 return retval.
is(TokenRetval::RetVal_EndDesc) ? Token::make_RetVal_OK() : retval;
2650 Token retval = Token::make_TK_NONE();
2661 retval=par->
parse();
2663 while (retval.
is(TokenRetval::TK_NEWPARA));
2673 Token retval = Token::make_TK_NONE();
2684 retval=par->
parse();
2685 if (retval.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
break;
2689 if (retval.
is(TokenRetval::RetVal_ListItem))
2694 while (!retval.
is(TokenRetval::RetVal_CloseXml));
2707 Token retval = Token::make_RetVal_OK();
2716 if (tok.
is(TokenRetval::TK_HTMLTAG))
2725 ) &&
parser()->context.token->endTag
2731 retval = Token::make_RetVal_EndList();
2739 "found <{}{}> instead!",
parser()->context.token->endTag?
"/":
"",
parser()->context.token->name);
2744 else if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
2749 " for a html list item");
2766 }
while (retval.
is(TokenRetval::RetVal_ListItem));
2768 if (retval.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
2770 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"unexpected end of comment while inside <{:c}l> block",
2776 return retval.
is(TokenRetval::RetVal_EndList) ? Token::make_RetVal_OK() : retval;
2782 Token retval = Token::make_RetVal_OK();
2791 if (tok.
is(TokenRetval::TK_HTMLTAG))
2802 "found <{}> instead!",
parser()->context.token->name);
2807 else if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
2810 " for a html list item");
2824 retval=li->parseXml();
2825 if (retval.is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
break;
2827 }
while (retval.
is(TokenRetval::RetVal_ListItem));
2829 if (retval.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
2831 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"unexpected end of comment while inside <list type=\"{}\"> block",
2837 return (retval.
is_any_of(TokenRetval::RetVal_EndList,TokenRetval::RetVal_CloseXml) ||
parser()->context.token->name==
"list") ?
2838 Token::make_RetVal_OK() : retval;
2846 Token retval = Token::make_TK_NONE();
2857 retval=par->
parse();
2859 while (retval.
is(TokenRetval::TK_NEWPARA));
2862 if (retval.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
2864 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"unexpected end of comment while inside <blockquote> block");
2868 return retval.
is(TokenRetval::RetVal_EndBlockQuote) ? Token::make_RetVal_OK() : retval;
2876 Token retval = Token::make_TK_NONE();
2887 retval=par->
parse();
2889 while (retval.
is(TokenRetval::TK_NEWPARA));
2893 return retval.
is(TokenRetval::RetVal_EndBlockQuote) ? Token::make_RetVal_OK() : retval;
2920 Token rv = Token::make_TK_NONE();
2926 }
while (rv.
is(TokenRetval::RetVal_ListItem));
2927 return (!rv.
is(TokenRetval::TK_NEWPARA)) ? rv : Token::make_RetVal_OK();
2940 Token retval = Token::make_RetVal_OK();
2950 if (isFirst) { par->markFirst(); isFirst=
FALSE; }
2951 retval=par->parse();
2952 if (!par->isEmpty())
2963 }
while (retval.
is(TokenRetval::TK_NEWPARA) &&
parser()->context.token->indent>
m_indent);
2982 Token retval = Token::make_RetVal_OK();
2989 switch (
parser()->context.token->id)
3011 while (retval.
is(TokenRetval::TK_LISTITEM) &&
3015 (
parser()->context.token->id==-1 ||
parser()->context.token->id>=num)
3031 while (!tok.
is_any_of(TokenRetval::TK_NONE, TokenRetval::TK_EOF))
3063 return m_title && std::get<DocTitle>(*m_title).hasTitle();
3075 std::get_if<DocTitle>(
m_title.get())->parse();
3079 if (!
children().empty() && std::holds_alternative<DocPara>(
children().back()))
3097 Token retval = par->parse();
3117 return Token::make_RetVal_OK();
3125 Token retval = Token::make_RetVal_OK();
3129 if (!
children().empty() && std::holds_alternative<DocPara>(
children().back()))
3131 std::get<DocPara>(
children().back()).markLast(
false);
3143 retval = par->parse();
3144 if (retval.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
break;
3145 if (retval.
is(TokenRetval::RetVal_CloseXml))
3147 retval = Token::make_RetVal_OK();
3159 if (
children().empty() || (p=std::get_if<DocPara>(&
children().back()))==
nullptr)
3181 case See:
return "see";
3182 case Return:
return "return";
3184 case Authors:
return "author";
3185 case Version:
return "version";
3186 case Since:
return "since";
3187 case Date:
return "date";
3188 case Note:
return "note";
3189 case Warning:
return "warning";
3190 case Pre:
return "pre";
3191 case Post:
return "post";
3193 case Invar:
return "invariant";
3194 case Remark:
return "remark";
3197 case User:
return "user";
3198 case Rcs:
return "rcs";
3208 Token retval = Token::make_RetVal_OK();
3214 if (!tok.
is(TokenRetval::TK_WHITESPACE))
3218 retval = Token::make_RetVal_EndParBlock();
3223 while (tok.
is(TokenRetval::TK_WORD))
3228 if (typeSeparator!=-1)
3234 if (
parent() && std::holds_alternative<DocParamSect>(*
parent()))
3236 std::get<DocParamSect>(*
parent()).m_hasTypeSpecifier=
true;
3255 if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
3257 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"unexpected end of comment block while parsing the "
3258 "argument of command {}",saveCmdName);
3259 retval = Token::make_RetVal_EndParBlock();
3262 if (!tok.
is(TokenRetval::TK_WHITESPACE))
3264 if (!tok.
is(TokenRetval::TK_NEWPARA))
3266 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"unexpected token {} in comment block while parsing the "
3267 "argument of command {}",tok.
to_string(),saveCmdName);
3269 retval = Token::make_RetVal_EndParBlock();
3275 retval = par->
parse();
3287 Token retval = Token::make_RetVal_OK();
3308 retval = par->parse();
3330 if (retval.is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
break;
3332 }
while (retval.
is(TokenRetval::RetVal_CloseXml) &&
3337 if (retval.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
3343 retval = Token::make_RetVal_OK();
3355 Token retval = Token::make_RetVal_OK();
3363 if (!
children().empty() && std::holds_alternative<DocParamList>(
children().back()))
3378 retval = pl->parseXml(cmdName);
3382 retval = pl->parse(cmdName);
3384 if (retval.
is(TokenRetval::RetVal_EndParBlock))
3386 retval = Token::make_RetVal_OK();
3405 bool needsSeparator =
FALSE;
3407 (ss=
children().get_last<DocSimpleSect>()) &&
3412 needsSeparator =
TRUE;
3419 Token rv = Token::make_RetVal_OK();
3428 return (!rv.
is(TokenRetval::TK_NEWPARA)) ? rv : Token::make_RetVal_OK();
3433 bool xmlContext=
FALSE,
3439 (ps=
children().get_last<DocParamSect>()) &&
3451 return (!rv.
is(TokenRetval::TK_NEWPARA)) ? rv : Token::make_RetVal_OK();
3462 if (tok.
is(TokenRetval::TK_WORD) &&
parser()->context.token->name==
"{")
3467 for (
auto const &opt : optList)
3469 if (opt ==
"number")
3473 warn(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Multiple options specified with \\{}, discarding '{}'", saveCmdName, opt);
3480 else if (opt ==
"year")
3484 warn(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Multiple options specified with \\{}, discarding '{}'", saveCmdName, opt);
3491 else if (opt ==
"shortauthor")
3495 warn(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Multiple options specified with \\{}, discarding '{}'", saveCmdName, opt);
3502 else if (opt ==
"nopar")
3506 else if (opt ==
"nocite")
3512 warn(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Unknown option specified with \\{}, discarding '{}'", saveCmdName, opt);
3520 if (!tok.
is(TokenRetval::TK_WHITESPACE))
3527 else if (!tok.
is(TokenRetval::TK_WHITESPACE))
3530 cmdChar,saveCmdName);
3540 if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
3542 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"THE ONE unexpected end of comment block while parsing the "
3543 "argument of command '{:c}{}'",cmdChar,saveCmdName);
3546 else if (!tok.
is_any_of(TokenRetval::TK_WORD,TokenRetval::TK_LNKWORD))
3564 if (!tok.
is(TokenRetval::TK_WHITESPACE))
3572 if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
3574 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"no emoji name given or unexpected end of comment block while parsing the "
3575 "argument of command '{:c}{}'",cmdChar,cmdName);
3579 else if (!tok.
is(TokenRetval::TK_WORD))
3594 if (!tok.
is(TokenRetval::TK_WHITESPACE))
3602 if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
3604 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"unexpected end of comment block while parsing the "
3605 "argument of command '{:c}{}'",cmdChar,cmdName);
3608 else if (!tok.
is_any_of(TokenRetval::TK_WORD,TokenRetval::TK_LNKWORD))
3618 switch (opt->
kind())
3638 std::string lstFormat =
theTranslator->trWriteList(
static_cast<int>(lst->size())).str();
3639 static const reg::Ex marker(R
"(@(\d+))");
3644 for ( ; it!=
end ; ++it)
3646 const auto &match = *it;
3647 size_t newIndex = match.position();
3648 size_t matchLen = match.length();
3649 optionValue += lstFormat.substr(index,newIndex-index);
3650 unsigned long entryIndex = std::stoul(match[1].str());
3651 if (entryIndex<(
unsigned long)lst->size())
3653 optionValue += lst->at(entryIndex);
3655 index=newIndex+matchLen;
3657 optionValue+=lstFormat.substr(index);
3662 warn(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Obsolete setting for '{:c}{}': '{}'",
3663 cmdChar,cmdName,
parser()->context.token->name);
3667 "Disabled setting (i.e. not supported in this doxygen executable) for '{:c}{}': '{}'",
3668 cmdChar,cmdName,
parser()->context.token->name);
3681 warn(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Unknown option for '{:c}{}': '{}'",
3682 cmdChar,cmdName,
parser()->context.token->name);
3692 ASSERT(retval.
is(TokenRetval::TK_WHITESPACE));
3695 if (retval.
is(TokenRetval::RetVal_OK))
3715 if (!tok.
is(TokenRetval::TK_WHITESPACE))
3723 if (!tok.
is(TokenRetval::TK_WORD))
3737 bool specDateOnlyWS = !specDateRaw.
isEmpty() && specDate.
isEmpty();
3738 if (!specDate.
isEmpty() && !tok.
is_any_of(TokenRetval::TK_WORD,TokenRetval::TK_NONE,TokenRetval::TK_EOF))
3740 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"invalid <date_time> argument for command '{:c}{}'",
3751 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"invalid <date_time> argument for command '{:c}{}': {}",
3752 cmdChar,cmdName,
err);
3764 if ((usedFormat&bitMask) && !(specFormat&bitMask))
3766 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.",
3784 if (!tok.
is(TokenRetval::TK_WORD))
3797 if (!tok.
is(TokenRetval::TK_WHITESPACE))
3806 if (!tok.
is(TokenRetval::TK_WORD))
3822 if (!tok.
is(TokenRetval::TK_WHITESPACE))
3831 if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
3833 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"unexpected end of comment block while parsing the "
3834 "argument of command {}", saveCmdName);
3837 else if (!tok.
is(TokenRetval::TK_WORD))
3861 (!n1_docIncOp && !n1_docWs) ||
3862 (n1_docWs && n2 && !n2_docIncOp);
3867 n1_docIncOp->markLast(
false);
3869 else if (n1_docWs && n2_docIncOp)
3882 if (!tok.
is(TokenRetval::TK_WHITESPACE))
3891 if (!tok.
is(TokenRetval::TK_WORD))
3918 AUTO_TRACE(
"cmdName={} isJavaLink={}",cmdName,isJavaLink);
3921 if (!tok.
is(TokenRetval::TK_WHITESPACE))
3929 if (!tok.
is(TokenRetval::TK_WORD))
3935 if (saveCmdName ==
"javalink")
3944 if (saveCmdName ==
"javalink")
3950 QCString leftOver = lnk->parse(isJavaLink);
3962 if (!tok.
is(TokenRetval::TK_WHITESPACE))
3965 cmdChar,
qPrint(saveCmdName));
3970 if (!tok.
is(TokenRetval::TK_WORD))
3989 bool isBlock =
false;
3990 bool trimLeft =
false;
3991 bool localScope =
false;
3993 if (tok.
is(TokenRetval::TK_WORD) &&
parser()->context.token->name==
"{")
3999 auto contains = [&optList](
const char *kw)
4001 return std::find(optList.begin(),optList.end(),kw)!=optList.end();
4003 localScope = contains(
"local");
4004 if (contains(
"nostrip"))
4006 stripCodeComments =
false;
4008 else if (contains(
"strip"))
4010 stripCodeComments =
true;
4017 if (contains(
"lineno"))
4024 if (!tok.
is(TokenRetval::TK_WHITESPACE))
4031 else if (tok.
is(TokenRetval::TK_WORD) &&
parser()->context.token->name==
"[")
4039 else if (!tok.
is(TokenRetval::TK_WHITESPACE))
4048 if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
4050 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"unexpected end of comment block while parsing the "
4051 "argument of command {}",saveCmdName);
4054 else if (!tok.
is(TokenRetval::TK_WORD))
4068 if (!tok.
is(TokenRetval::TK_WORD))
4070 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"expected block identifier, but found token {} instead while parsing the {} command",
4085 blockId,isBlock,trimLeft);
4095 if (!tok.
is(TokenRetval::TK_WHITESPACE))
4098 cmdChar,saveCmdName);
4102 if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
4104 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"unexpected end of comment block while parsing the "
4105 "argument of command '{:c}{}'", cmdChar,saveCmdName);
4108 else if (!tok.
is_any_of(TokenRetval::TK_WORD,TokenRetval::TK_LNKWORD))
4125 return retval.is(TokenRetval::RetVal_OK) ? Token::make_TK_NEWPARA() : retval;
4147 if (
parser()->context.xmlComment)
4153 while (i<l && (
parser()->context.token->verb.at(i)==
' ' ||
parser()->context.token->verb.at(i)==
'\n'))
4155 if (
parser()->context.token->verb.at(i)==
'\n') li=i+1;
4165 if (retval.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
4176 if (
parser()->context.memberDef)
4214 Token retval = Token::make_RetVal_OK();
4220 std::string str{cmdChar};
4224 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Found unexpanded alias '{:c}{}'. Check if number of arguments passed is correct.",cmdChar,cmdName);
4373 retval = Token::make_RetVal_Section();
4379 retval = Token::make_RetVal_Subsection();
4385 retval = Token::make_RetVal_Subsubsection();
4391 retval = Token::make_RetVal_Paragraph();
4397 retval = Token::make_RetVal_SubParagraph();
4403 retval = Token::make_RetVal_SubSubParagraph();
4423 if (retval.is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
4435 if (retval.is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
4447 if (retval.is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
4459 if (retval.is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
4471 if (retval.is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
4483 if (retval.is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
4497 int idx = fullMatch.
find(
'{');
4498 int idxEnd = fullMatch.
find(
"}",idx+1);
4504 for (
const auto &opt : optList)
4506 if (opt.empty())
continue;
4509 if (locOpt ==
"code")
4515 warn(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Unknown option '{}' for '\\iliteral'",opt);
4523 if (retval.is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
4531 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"javadoc literal section ended without end marker");
4550 if (retval.is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
4571 dv->setText(
parser()->context.token->verb);
4572 dv->setWidth(width);
4573 dv->setHeight(height);
4574 dv->setLocation(
parser()->context.fileName,
parser()->tokenizer.getLineNr());
4577 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"ignoring \\dot command because HAVE_DOT is not set");
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());
4605 if (retval.is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
4619 int idx = fullMatch.
find(
'{');
4620 int idxEnd = fullMatch.
find(
"}",idx+1);
4627 for (
const auto &opt : optList)
4629 if (opt.empty())
continue;
4637 warn(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Multiple definition of engine for '\\startuml'");
4650 warn(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Multiple use of filename for '\\startuml'");
4659 if (engine.
isEmpty()) engine =
"uml";
4665 assert(retval.is(TokenRetval::RetVal_OK));
4686 if (engine ==
"ditaa")
4688 dv->setUseBitmap(
true);
4690 else if (engine ==
"uml")
4692 int i = trimmedVerb.
find(
'\n');
4693 QCString firstLine = i==-1 ? trimmedVerb : trimmedVerb.
left(i);
4696 dv->setText(trimmedVerb);
4697 dv->setWidth(width);
4698 dv->setHeight(height);
4699 dv->setLocation(
parser()->context.fileName,
parser()->tokenizer.getLineNr());
4702 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"ignoring \\startuml command because PLANTUML_JAR_PATH is not set");
4705 if (retval.is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
4713 retval = Token::make_RetVal_EndParBlock();
4772 retval = Token::make_RetVal_Internal();
4775 retval = Token::make_RetVal_EndInternal();
4844 "ignoring \\dotfile command because HAVE_DOT is not set");
4932 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Unexpected command '{}' in paragraph context",cmdName);
4935 INTERNAL_ASSERT(retval.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF,TokenRetval::RetVal_OK,TokenRetval::RetVal_SimpleSec
4936 TokenRetval::TK_LISTITEM,TokenRetval::TK_ENDLIST,TokenRetval::TK_NEWPARA
4937 TokenRetval::RetVal_Section,TokenRetval::RetVal_EndList
4938 TokenRetval::RetVal_Internal,TokenRetval::RetVal_SwitchLang
4939 TokenRetval::RetVal_EndInternal)
4946 const char *attrName,
4950 for (
const auto &opt : tagHtmlAttribs)
4952 if (opt.name==attrName)
4954 *result = opt.value;
4963 AUTO_TRACE(
"tagName={} #tagHtmlAttrs={}",tagName,tagHtmlAttribs.size());
4964 Token retval = Token::make_RetVal_OK();
4970 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"HTML tag ('<{}/>') may not use the 'empty tag' XHTML syntax.",
4976 if (!
parser()->context.token->emptyTag)
4984 if (!
parser()->context.token->emptyTag)
4992 if (
parser()->context.token->emptyTag)
break;
4999 retval = Token::make_RetVal_ListItem();
5021 if (
parser()->context.token->emptyTag)
break;
5022 if (
parser()->context.xmlComment)
5067 if (
parser()->context.token->emptyTag)
break;
5073 retval = Token::make_TK_NEWPARA();
5076 if (!
parser()->context.token->emptyTag)
5085 retval = Token::make_RetVal_DescTitle();
5095 retval = Token::make_RetVal_DescData();
5103 if (!
parser()->context.token->emptyTag)
5111 retval = Token::make_RetVal_TableRow();
5114 retval = Token::make_RetVal_TableCell();
5117 retval = Token::make_RetVal_TableHCell();
5164 if (!
parser()->context.token->emptyTag)
5171 if (!
parser()->context.token->emptyTag)
5181 if (!
parser()->context.token->emptyTag)
5184 while (n && !std::holds_alternative<DocHtmlDetails>(*n)) n=
::parent(n);
5194 retval = Token::make_TK_NEWPARA();
5208 retval = Token::make_TK_NEWPARA();
5214 retval = Token::make_RetVal_TableCell();
5284 retval = Token::make_RetVal_TableRow();
5288 retval = Token::make_RetVal_ListItem();
5303 retval = Token::make_RetVal_TableCell();
5317 if (
parser()->context.token->emptyTag)
5334 if (!leftOver.isEmpty())
5352 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Missing 'cref' or 'langword' attribute from <see> tag.");
5380 std::get<DocSimpleSect>(*vss).appendLinkWord(cref);
5381 retval = Token::make_RetVal_OK();
5438 Token retval = Token::make_RetVal_OK();
5448 retval = Token::make_RetVal_EndList();
5458 retval = Token::make_RetVal_EndList();
5474 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"found </details> tag without matching <details>");
5478 retval = Token::make_RetVal_EndHtmlDetails();
5484 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"found </blockquote> tag without matching <blockquote>");
5488 retval = Token::make_RetVal_EndBlockQuote();
5548 retval = Token::make_TK_NEWPARA();
5551 retval = Token::make_RetVal_EndDesc();
5560 retval = Token::make_RetVal_EndTable();
5563 retval = Token::make_RetVal_EndTableRow();
5566 retval = Token::make_RetVal_EndTableCell();
5569 retval = Token::make_RetVal_EndTableCell();
5613 retval = Token::make_TK_NEWPARA();
5627 retval = Token::make_RetVal_CloseXml();
5663 if (!std::get_if<DocAutoListItem>(n))
5671 const auto docAutoList = std::get_if<DocAutoList>(n);
5674 indent = docAutoList->indent();
5683 const auto docPara = std::get_if<DocPara>(n);
5689 return std::get<DocStyleChange>(*stack.top());
5699 indentStr.
fill(
' ',indent);
5714 Token retval = Token::make_TK_NONE();
5715 while (!tok.
is_any_of(TokenRetval::TK_NONE, TokenRetval::TK_EOF))
5719 if (tok.
is_any_of(TokenRetval::TK_WORD,TokenRetval::TK_LNKWORD,TokenRetval::TK_SYMBOL,TokenRetval::TK_URL,
5720 TokenRetval::TK_COMMAND_AT,TokenRetval::TK_COMMAND_BS,TokenRetval::TK_HTMLTAG)
5727 case TokenRetval::TK_WORD:
5730 case TokenRetval::TK_LNKWORD:
5733 case TokenRetval::TK_URL:
5736 case TokenRetval::TK_WHITESPACE:
5754 case TokenRetval::TK_LISTITEM:
5758 while (n && !std::holds_alternative<DocAutoList>(*n)) n=
::parent(n);
5759 const DocAutoList *al = std::get_if<DocAutoList>(n);
5766 retval = Token::make_TK_LISTITEM();
5776 al = std::get_if<DocAutoList>(n);
5790 }
while (retval.
is(TokenRetval::TK_LISTITEM) &&
5795 if (retval.
is(TokenRetval::RetVal_SimpleSec))
5801 if (
parser()->context.token->name.startsWith(
"rcs:"))
5805 tok = Token::make_TK_RCSTAG();
5809 tok = Token::make_TK_COMMAND_BS();
5814 else if (retval.
is(TokenRetval::TK_ENDLIST))
5830 case TokenRetval::TK_ENDLIST:
5831 AUTO_TRACE_ADD(
"Found end of list inside of paragraph at line {}",
parser()->tokenizer.getLineNr());
5832 if (std::get_if<DocAutoListItem>(
parent()))
5835 if (al && al->
indent()>=
parser()->context.token->indent)
5838 retval = Token::make_TK_ENDLIST();
5844 "has invalid indent level");
5853 case TokenRetval::TK_COMMAND_AT:
5855 case TokenRetval::TK_COMMAND_BS:
5860 while (n && !std::holds_alternative<DocSimpleSect>(*n) &&
5861 !std::holds_alternative<DocParamSect>(*n))
5872 retval = Token::make_RetVal_SimpleSec();
5878 while (n && !std::holds_alternative<DocSimpleListItem>(*n)) n=
::parent(n);
5883 retval = Token::make_RetVal_ListItem();
5893 if (retval.
is(TokenRetval::RetVal_SimpleSec))
5899 if (
parser()->context.token->name.startsWith(
"rcs:"))
5903 tok = Token::make_TK_RCSTAG();
5907 tok = Token::make_TK_COMMAND_BS();
5912 else if (retval.
value()>TokenRetval::TK_NONE && retval.
value()<TokenRetval::RetVal_OK)
5918 else if (retval.
value()!=TokenRetval::RetVal_OK)
5925 case TokenRetval::TK_HTMLTAG:
5927 if (!
parser()->context.token->endTag)
5939 if (!retval.
is(TokenRetval::RetVal_OK))
5945 case TokenRetval::TK_SYMBOL:
5956 parser()->context.token->name);
5960 case TokenRetval::TK_NEWPARA:
5961 retval = Token::make_TK_NEWPARA();
5963 case TokenRetval::TK_RCSTAG:
5966 while (n && !std::holds_alternative<DocSimpleSect>(*n) &&
5967 !std::holds_alternative<DocParamSect>(*n))
5977 retval = Token::make_RetVal_SimpleSec();
5988 "Found unexpected token (id={})",tok.
to_string());
5993 retval=Token::make_TK_NONE();
5996 DocPara *par = std::get_if<DocPara>(
parser()->context.nodeStack.top());
5997 if (!
parser()->context.token->endTag && par &&
5998 retval.
is(TokenRetval::TK_NEWPARA) &&
parser()->context.token->name.lower() ==
"p")
6002 INTERNAL_ASSERT(retval.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF,TokenRetval::TK_NEWPARA,TokenRetval::TK_LISTITEM,
6003 TokenRetval::TK_ENDLIST,TokenRetval::RetVal_OK)
6015 Token retval = Token::make_RetVal_OK();
6018 if (!
m_id.isEmpty())
6040 if (isFirst) { par->markFirst(); isFirst=
FALSE; }
6041 retval=par->parse();
6042 if (!par->isEmpty())
6051 if (retval.
is(TokenRetval::TK_LISTITEM))
6055 if (retval.
is(TokenRetval::RetVal_Internal))
6059 if (retval.is(TokenRetval::RetVal_EndInternal))
6061 retval = Token::make_RetVal_OK();
6064 }
while (!retval.
is_any_of(TokenRetval::TK_NONE, TokenRetval::TK_EOF, TokenRetval::RetVal_Section, TokenRetval::RetVal_Subsection,
6065 TokenRetval::RetVal_Subsubsection, TokenRetval::RetVal_Paragraph, TokenRetval::RetVal_SubParagraph,
6066 TokenRetval::RetVal_SubSubParagraph, TokenRetval::RetVal_EndInternal)
6073 if (retval.
is(TokenRetval::RetVal_Subsection) &&
m_level<=1)
6076 while (retval.
is(TokenRetval::RetVal_Subsection))
6085 else if (retval.
is(TokenRetval::RetVal_Subsubsection) &&
m_level<=2)
6091 parser()->tokenizer.getLineNr(),
6092 "Unexpected subsubsection command found inside {}!",
6096 while (retval.
is(TokenRetval::RetVal_Subsubsection))
6103 if (!(
m_level < 2 && retval.
is(TokenRetval::RetVal_Subsection)))
break;
6105 else if (retval.
is(TokenRetval::RetVal_Paragraph) &&
m_level<=3)
6111 "Unexpected paragraph command found inside {}!",
6115 while (retval.
is(TokenRetval::RetVal_Paragraph))
6122 if (!(
m_level<3 && (retval.
is_any_of(TokenRetval::RetVal_Subsection,TokenRetval::RetVal_Subsubsection))))
break;
6124 else if (retval.
is(TokenRetval::RetVal_SubParagraph) &&
m_level<=4)
6130 "Unexpected subparagraph command found inside {}!",
6134 while (retval.
is(TokenRetval::RetVal_SubParagraph))
6141 if (!(
m_level<4 && (retval.
is_any_of(TokenRetval::RetVal_Subsection,TokenRetval::RetVal_Subsubsection,TokenRetval::RetVal_Paragraph))))
break;
6143 else if (retval.
is(TokenRetval::RetVal_SubSubParagraph) &&
m_level<=5)
6149 "Unexpected subsubparagraph command found inside {}!",
6153 while (retval.
is(TokenRetval::RetVal_SubSubParagraph))
6160 if (!(
m_level<5 && (retval.
is_any_of( TokenRetval::RetVal_Subsection, TokenRetval::RetVal_Subsubsection,
6161 TokenRetval::RetVal_Paragraph, TokenRetval::RetVal_SubParagraph))))
break;
6170 TokenRetval::RetVal_Section, TokenRetval::RetVal_Subsection,
6171 TokenRetval::RetVal_Subsubsection, TokenRetval::RetVal_Paragraph,
6172 TokenRetval::RetVal_SubParagraph, TokenRetval::RetVal_SubSubParagraph,
6173 TokenRetval::RetVal_Internal, TokenRetval::RetVal_EndInternal)
6189 while (!tok.
is_any_of(TokenRetval::TK_NONE, TokenRetval::TK_EOF))
6193 case TokenRetval::TK_WORD:
6196 case TokenRetval::TK_WHITESPACE:
6199 case TokenRetval::TK_SYMBOL:
6209 parser()->context.token->name);
6213 case TokenRetval::TK_COMMAND_AT:
6215 case TokenRetval::TK_COMMAND_BS:
6277 parser()->context.token->name);
6301 Token retval = Token::make_TK_NONE();
6311 if (isFirst) { par->markFirst(); isFirst=
FALSE; }
6312 retval=par->parse();
6313 if (par->isEmpty() && par->attribs().empty())
6322 auto checkParagraph = [
this,&retval](
Token t,
int level,
const char *sectionType,
const char *parentSectionType) {
6328 parser()->tokenizer.getLineNr(),
6329 "found {} command (id: '{}') outside of {} context!",
6330 sectionType,
parser()->context.token->sectionId,parentSectionType);
6334 if (!
parser()->context.token->sectionId.isEmpty())
6347 sectionType,
parser()->context.token->sectionId,sectionType);
6348 retval = Token::make_TK_NONE();
6353 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Missing id for {}; ignoring {}",sectionType,sectionType);
6354 retval = Token::make_TK_NONE();
6359 checkParagraph(Token::make_RetVal_SubSubParagraph(), 6,
"subsubparagraph",
"subparagraph" );
6360 checkParagraph(Token::make_RetVal_SubParagraph(), 5,
"subparagraph",
"paragraph" );
6361 checkParagraph(Token::make_RetVal_Paragraph(), 4,
"paragraph",
"subsubsection" );
6362 checkParagraph(Token::make_RetVal_Subsubsection(), 3,
"subsubsection",
"subsection" );
6363 checkParagraph(Token::make_RetVal_Subsection(), 2,
"subsection",
"section" );
6365 if (retval.
is(TokenRetval::TK_LISTITEM))
6369 if (retval.
is(TokenRetval::RetVal_Internal))
6374 }
while (!retval.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF,TokenRetval::RetVal_Section));
6379 while (retval.
is(TokenRetval::RetVal_Section))
6381 if (!
parser()->context.token->sectionId.isEmpty())
6394 retval = Token::make_TK_NONE();
6400 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.