44#if !ENABLE_DOCPARSER_TRACING
48#define AUTO_TRACE(...) (void)0
49#define AUTO_TRACE_ADD(...) (void)0
50#define AUTO_TRACE_EXIT(...) (void)0
53#define INTERNAL_ASSERT(x) do {} while(0)
72 "uml",
"bpm",
"wire",
"dot",
"ditaa",
73 "salt",
"math",
"latex",
"gantt",
"mindmap",
74 "wbs",
"yaml",
"creole",
"json",
"flow",
75 "board",
"git",
"hcl",
"regex",
"ebnf",
76 "files",
"chen",
"chronology",
"chart",
"nwdiag",
77 "packetdiag",
"project",
"sprites"
87 const char *p = s.
data();
93 if (c==
'{') c=
'<';
else if (c==
'}') c=
'>';
122 std::visit([&](
auto &&x)->
decltype(
auto) {
return x.setParent(newParent); }, *n);
166 size_t len=locSymName.
length();
169 if (locSymName.
at(len-1)!=
':') locSymName.
append(
":");
170 if (locSymName.
at(0)!=
':') locSymName.
prepend(
":");
188 Doxygen::searchIndex.addWord(word,false);
205 Doxygen::searchIndex.addWord(word,false);
221 if (
id.left(anchorPrefix.
length()) == anchorPrefix)
311 parser()->tokenizer.getLineNr(),
312 "block marked with {} for \\snippet should appear twice in file {}, found it {:d} times",
326 "No previous '\\include' or '\\dontinclude' command for '\\{}' present",
337 size_t so = o, bo = 0;
338 bool nonEmpty =
FALSE;
351 else if (!isspace(
static_cast<uint8_t
>(c)))
381 else if (!isspace(
static_cast<uint8_t
>(c)))
414 else if (!isspace(
static_cast<uint8_t
>(c)))
445 else if (!isspace(
static_cast<uint8_t
>(c)))
489 if (
parser()->context.memberDef &&
parser()->context.memberDef->name().at(0)==
'@')
547 while (!tok.
is_any_of(TokenRetval::TK_NONE, TokenRetval::TK_EOF))
561 if (sec==
nullptr &&
parser()->context.lang==SrcLangExt::Markdown)
623 while (!tok.
is_any_of(TokenRetval::TK_NONE, TokenRetval::TK_EOF))
625 if (tok.
is_any_of(TokenRetval::TK_COMMAND_AT, TokenRetval::TK_COMMAND_BS))
632 if (!tok.
is(TokenRetval::TK_WHITESPACE))
638 if (!tok.
is_any_of(TokenRetval::TK_WORD,TokenRetval::TK_LNKWORD))
652 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Illegal command '{:c}{}' as part of a \\secreflist",
657 else if (tok.
is(TokenRetval::TK_WHITESPACE))
663 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Unexpected token {} inside section reference list",
695 while (!tok.
is_any_of(TokenRetval::TK_NONE, TokenRetval::TK_EOF))
714 AUTO_TRACE(
"target='{}',context='{}'",target,context);
717 auto lang =
parser->context.lang;
719 if (sec==
nullptr && !
parser->context.prefix.isEmpty())
779 m_file = dd->getOutputFileBase();
786 bool isFile = compound ?
790 if (compound && lang==SrcLangExt::Markdown) lang = compound->
getLanguage();
812 int funcPos =
m_text.find(
'(');
831 toFileDef(compound)->generateSourceFile()
845 warn_doc_error(
parser->context.fileName,
parser->tokenizer.getLineNr(),
"unable to resolve reference to '{}' for \\ref command",
851 for (
auto &&elem : elements)
861 for (
auto &dn : children)
863 DocPara *para = std::get_if<DocPara>(&dn);
875 for (
auto &cn : children)
882 for (
auto &ccn : *opt_children)
894 char cmdCharStr[2] = { cmdChar, 0 };
897 while (!tok.
is_any_of(TokenRetval::TK_NONE, TokenRetval::TK_EOF))
903 case TokenRetval::TK_HTMLTAG:
916 if (
parser()->context.insideHtmlLink)
921 "Potential recursion while resolving {:c}{} command!",cmdChar,cmdName);
948 if (numBibFiles>0 && cite && !cite->
text().
isEmpty())
959 warn_doc_error(
parser->context.fileName,
parser->tokenizer.getLineNr(),
"\\cite command found but no bib files specified via CITE_BIB_FILES!");
961 else if (cite==
nullptr)
963 warn_doc_error(
parser->context.fileName,
parser->tokenizer.getLineNr(),
"unable to resolve reference to '{}' for \\cite command",
968 warn_doc_error(
parser->context.fileName,
parser->tokenizer.getLineNr(),
"\\cite command to '{}' does not have an associated number",
980 if (!opt.noPar()) txt +=
"[";
984 if (opt.isNumber()) txt += citeInfo->
text();
985 else if (opt.isShortAuthor()) txt += citeInfo->
shortAuthor();
986 else if (opt.isYear()) txt += citeInfo->
year();
989 if (!opt.noPar()) txt +=
"]";
1004 m_refText = m_refText.right(m_refText.length()-1);
1011 if (compound && compound->isLinkable())
1013 m_file = compound->getOutputFileBase();
1014 m_ref = compound->getReference();
1017 (
toFileDef(compound))->generateSourceFile()
1027 warn_doc_error(parser->context.fileName,parser->tokenizer.getLineNr(),
"unable to resolve link to '{}' for \\link command",
1039 while (!tok.
is_any_of(TokenRetval::TK_NONE, TokenRetval::TK_EOF))
1043 switch (tok.
value())
1045 case TokenRetval::TK_COMMAND_AT:
1047 case TokenRetval::TK_COMMAND_BS:
1063 case TokenRetval::TK_SYMBOL:
1064 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Unsupported symbol '{}' found as part of a \\link",
1065 parser()->context.token->name);
1067 case TokenRetval::TK_HTMLTAG:
1068 if (
parser()->context.token->name!=
"see" || !isXmlLink)
1070 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Unexpected xml/html command {} found as part of a \\link",
1071 parser()->context.token->name);
1074 case TokenRetval::TK_LNKWORD:
1075 case TokenRetval::TK_WORD:
1084 else if ((p=w.
find(
'}'))!=-1)
1086 int l =
static_cast<int>(w.
length());
1090 result=w.
right(l-p-1);
1104 if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
1107 parser()->tokenizer.getLineNr(),
1108 "Unexpected end of comment while inside link command");
1128 p->relPath =
parser->context.relPath;
1138 if (fd==
nullptr && !
p->name.endsWith(
".dot"))
1149 "Possible candidates:\n{}",
p->name,
1157 "in any of the paths specified via DOTFILE_DIRS!",
p->name);
1166 p->relPath =
parser->context.relPath;
1176 if (fd==
nullptr && !
p->name.endsWith(
".msc"))
1187 "Possible candidates:\n{}",
qPrint(
p->name),
1195 "in any of the paths specified via MSCFILE_DIRS!",
p->name);
1206 p->relPath =
parser->context.relPath;
1216 if (fd==
nullptr && !
p->name.endsWith(
".dia"))
1227 "Possible candidates:\n{}",
p->name,
1235 "in any of the paths specified via DIAFILE_DIRS!",
p->name);
1245 p->relPath =
parser->context.relPath;
1255 if (fd==
nullptr && !
p->name.endsWith(
".puml"))
1258 if (fd==
nullptr && !
p->name.endsWith(
".pu"))
1270 "Possible candidates:\n{}",
p->name,
1278 "in any of the paths specified via PLANTUMLFILE_DIRS!",
p->name);
1289 p->relPath =
parser->context.relPath;
1299 if (fd==
nullptr && !
p->name.endsWith(
".mmd"))
1310 "Possible candidates:\n{}",
p->name,
1318 "in any of the paths specified via MERMAIDFILE_DIRS!",
p->name);
1336 while (!tok.
is_any_of(TokenRetval::TK_NONE, TokenRetval::TK_EOF))
1363 QCString locName =
p->url.isEmpty() ?
p->name :
p->url;
1364 int len =
static_cast<int>(locName.
length());
1365 int fnd = locName.
find(
'?');
1366 if (fnd==-1) fnd=len;
1367 return fnd>=4 && locName.
mid(fnd-4,4)==
".svg";
1381 Token retval(TokenRetval::RetVal_OK);
1385 while (!tok.
is_any_of(TokenRetval::TK_NONE, TokenRetval::TK_EOF))
1389 switch (tok.
value())
1391 case TokenRetval::TK_HTMLTAG:
1450 if (!
parser()->context.token->endTag)
1461 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Unexpected html tag <{}{}> found within <h{:d}> context",
1474 if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
1491 while (!tok.
is_any_of(TokenRetval::TK_NONE, TokenRetval::TK_EOF))
1494 if (tok.
value()==TokenRetval::TK_HTMLTAG &&
1496 parser()->context.token->endTag
1501 else if (tok.
is_any_of(TokenRetval::TK_COMMAND_AT, TokenRetval::TK_COMMAND_BS) &&
1514 if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
1526 Token retval(TokenRetval::TK_NONE);
1537 retval=par->
parse();
1539 while (retval.
is(TokenRetval::TK_NEWPARA));
1542 if (retval.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
1544 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"unexpected end of comment while inside <details> block");
1555 return retval.
is(TokenRetval::RetVal_EndHtmlDetails) ? Token::make_RetVal_OK() : retval;
1571 Token retval(TokenRetval::RetVal_OK);
1575 while (!tok.
is_any_of(TokenRetval::TK_NONE, TokenRetval::TK_EOF))
1579 switch (tok.
value())
1581 case TokenRetval::TK_HTMLTAG:
1594 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Unexpected html tag <{}{}> found within <a href=...> context",
1595 parser()->context.token->endTag?
"/":
"",
parser()->context.token->name);
1606 if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
1609 " <a href=...> tag");
1621 Token retval(TokenRetval::RetVal_OK);
1631 if (isFirst) { par->markFirst(); isFirst=
FALSE; }
1632 retval=par->parse();
1633 if (!par->isEmpty())
1642 if (retval.
is(TokenRetval::TK_LISTITEM))
1646 }
while (!retval.
is_any_of(TokenRetval::TK_NONE, TokenRetval::TK_EOF,
1647 TokenRetval::RetVal_Section, TokenRetval::RetVal_Subsection, TokenRetval::RetVal_Subsubsection,
1648 TokenRetval::RetVal_Paragraph, TokenRetval::RetVal_SubParagraph, TokenRetval::RetVal_SubSubParagraph,
1649 TokenRetval::RetVal_EndInternal));
1653 while ((level==1 && retval.
is(TokenRetval::RetVal_Section)) ||
1654 (level==2 && retval.
is(TokenRetval::RetVal_Subsection)) ||
1655 (level==3 && retval.
is(TokenRetval::RetVal_Subsubsection)) ||
1656 (level==4 && retval.
is(TokenRetval::RetVal_Paragraph)) ||
1657 (level==5 && retval.
is(TokenRetval::RetVal_SubParagraph)) ||
1658 (level==6 && retval.
is(TokenRetval::RetVal_SubSubParagraph))
1667 if (retval.
is(TokenRetval::RetVal_Internal))
1669 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"\\internal command found inside internal section");
1681 Token retval(TokenRetval::RetVal_OK);
1684 if (!tok.
is(TokenRetval::TK_WHITESPACE))
1692 while (!tok.
is_any_of(TokenRetval::TK_NONE, TokenRetval::TK_EOF))
1694 switch (tok.
value())
1696 case TokenRetval::TK_WHITESPACE:
1699 case TokenRetval::TK_WORD:
1700 case TokenRetval::TK_LNKWORD:
1703 case TokenRetval::TK_SYMBOL:
1725 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Unexpected symbol '{}' found as argument of \\addindex",
parser()->context.token->name);
1730 case TokenRetval::TK_COMMAND_AT:
1732 case TokenRetval::TK_COMMAND_BS:
1754 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Unexpected command {} found as argument of \\addindex",
1755 parser()->context.token->name);
1779 for (
const auto &opt :
attribs)
1781 if (opt.name==
"id" && !opt.value.isEmpty())
1806 Token retval = Token::make_TK_NONE();
1809 while (!tok.
is_any_of(TokenRetval::TK_NONE, TokenRetval::TK_EOF))
1813 switch (tok.
value())
1815 case TokenRetval::TK_HTMLTAG:
1820 retval = Token::make_RetVal_OK();
1825 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Unexpected html tag <{}{}> found within <caption> context",
1826 parser()->context.token->endTag?
"/":
"",
parser()->context.token->name);
1837 if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
1852 Token retval = Token::make_RetVal_OK();
1863 retval=par->
parse();
1864 if (retval.
is(TokenRetval::TK_HTMLTAG))
1869 retval = Token::make_TK_NEWPARA();
1873 retval = Token::make_TK_NEWPARA();
1877 while (retval.
is_any_of(TokenRetval::TK_NEWPARA,TokenRetval::RetVal_EndParBlock));
1886 Token retval = Token::make_RetVal_OK();
1897 retval=par->
parse();
1898 if (retval.
is(TokenRetval::TK_HTMLTAG))
1903 retval = Token::make_TK_NEWPARA();
1907 retval = Token::make_TK_NEWPARA();
1911 while (retval.
is(TokenRetval::TK_NEWPARA));
1919 for (
const auto &attr :
attribs())
1921 if (attr.name.lower()==
"rowspan")
1923 return attr.value.toUInt();
1931 for (
const auto &attr :
attribs())
1933 if (attr.name.lower()==
"colspan")
1935 return std::max(1u,attr.value.toUInt());
1943 for (
const auto &attr :
attribs())
1947 if (attrName==
"align")
1949 if (attrValue==
"center")
1951 else if (attrValue==
"right")
1955 else if (attrName==
"class" && attrValue.
startsWith(
"markdowntable"))
1957 if (attrValue==
"markdowntableheadcenter")
1959 else if (attrValue==
"markdowntableheadright")
1961 else if (attrValue==
"markdowntableheadleft")
1963 else if (attrValue==
"markdowntableheadnone")
1965 else if (attrValue==
"markdowntablebodycenter")
1967 else if (attrValue==
"markdowntablebodyright")
1969 else if (attrValue==
"markdowntablebodyleft")
1971 else if (attrValue==
"markdowntablebodynone")
1981 for (
const auto &attr :
attribs())
1985 if (attrName==
"valign")
1987 if (attrValue==
"top")
1989 else if (attrValue==
"bottom")
1991 else if (attrValue==
"middle")
2006 const DocHtmlCell *cell = std::get_if<DocHtmlCell>(&n);
2022 while (tok.
is_any_of(TokenRetval::TK_WHITESPACE,TokenRetval::TK_NEWPARA,TokenRetval::TK_HTMLTAG,
2023 TokenRetval::TK_COMMAND_AT,TokenRetval::TK_COMMAND_BS))
2025 if (tok.
is(TokenRetval::TK_HTMLTAG))
2041 else if (tok.
is_any_of(TokenRetval::TK_COMMAND_AT, TokenRetval::TK_COMMAND_BS))
2051 if (!tok.
is(TokenRetval::TK_WORD))
2079 Token retval = Token::make_RetVal_OK();
2088 if (tok.
is(TokenRetval::TK_HTMLTAG))
2101 "found <{}{}> instead!",
parser()->context.token->endTag ?
"/" :
"",
parser()->context.token->name);
2106 else if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
2109 " for a html description title");
2114 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"expected <td> or <th> tag but found {} token instead!",
2128 retval=cell->
parse();
2129 isHeading = retval.
is(TokenRetval::RetVal_TableHCell);
2131 if (retval.
is(TokenRetval::RetVal_EndTableCell))
2137 if (tok.
is(TokenRetval::TK_HTMLTAG))
2140 !
parser()->context.token->endTag)
2142 retval = Token::make_RetVal_TableCell();
2147 if (
parser()->context.token->endTag)
2149 retval = Token::make_RetVal_EndTableRow();
2153 retval = Token::make_RetVal_TableRow();
2158 retval = Token::make_RetVal_EndTable();
2163 "found <{}{}> instead!",
parser()->context.token->endTag ?
"/" :
"",
parser()->context.token->name);
2170 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"expected <td>, <th> or <tr> tag but found {} token instead!",
2176 while (retval.
is_any_of(TokenRetval::RetVal_TableCell,TokenRetval::RetVal_TableHCell));
2186 Token retval = Token::make_RetVal_OK();
2197 if (tok.
is(TokenRetval::TK_HTMLTAG))
2209 "found <{}> instead!",
parser()->context.token->name);
2214 else if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
2217 " for a html description title");
2222 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"expected <td> or <th> tag but found {} token instead!",
2235 while (retval.
is_any_of(TokenRetval::RetVal_TableCell,TokenRetval::RetVal_TableHCell));
2259 const DocHtmlRow *row = std::get_if<DocHtmlRow>(&rowNode);
2272 Token retval = Token::make_RetVal_OK();
2279 if (tok.
is(TokenRetval::TK_HTMLTAG))
2285 retval = Token::make_RetVal_TableRow();
2296 retval=std::get<DocHtmlCaption>(*m_caption).parse();
2298 if (retval.
is(TokenRetval::RetVal_OK))
2307 "found <{}{}> instead!",
parser()->context.token->endTag ?
"/" :
"",
parser()->context.token->name);
2310 else if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
2313 " for a <tr> or <caption> tag");
2322 while (retval.
is(TokenRetval::RetVal_TableRow))
2327 if (retval.is(TokenRetval::RetVal_EndTableRow))
2335 retval = Token::make_RetVal_TableRow();
2339 retval = Token::make_RetVal_EndTable();
2341 else if (retval.is(TokenRetval::TK_HTMLTAG))
2344 "found <{}> instead!",
parser()->context.token->name);
2350 "found token {} instead!",retval.to_string());
2351 retval=Token::make_RetVal_OK();
2359 return retval.
is(TokenRetval::RetVal_EndTable) ? Token::make_RetVal_OK() : retval;
2365 Token retval = Token::make_RetVal_OK();
2374 bool isHeader=
FALSE;
2375 if (tok.
is(TokenRetval::TK_HTMLTAG))
2380 retval = Token::make_RetVal_TableRow();
2384 retval = Token::make_RetVal_TableRow();
2390 while (retval.
is(TokenRetval::RetVal_TableRow))
2394 retval=tr->parseXml(isHeader);
2429 DocHtmlRow *row = std::get_if<DocHtmlRow>(&rowNode);
2432 for (
auto &cellNode : row->
children())
2434 DocHtmlCell *cell = std::get_if<DocHtmlCell>(&cellNode);
2437 uint32_t rs = cell->
rowSpan();
2438 uint32_t cs = cell->
colSpan();
2440 for (
size_t i=0;i<rowSpans.size();i++)
2442 if (rowSpans[i].rowsLeft>0 &&
2443 rowSpans[i].column==colIdx)
2445 colIdx=rowSpans[i].column+1;
2449 if (rs>0) rowSpans.emplace_back(rs,colIdx);
2457 for (
size_t i=0;i<rowSpans.size();i++)
2459 if (rowSpans[i].rowsLeft>0) rowSpans[i].rowsLeft--;
2465 if (colIdx-1>maxCols) maxCols=colIdx-1;
2475 Token retval = Token::make_TK_NONE();
2479 while (!tok.
is_any_of(TokenRetval::TK_NONE, TokenRetval::TK_EOF))
2483 switch (tok.
value())
2485 case TokenRetval::TK_COMMAND_AT:
2487 case TokenRetval::TK_COMMAND_BS:
2490 bool isJavaLink=
FALSE;
2496 if (!tok.
is(TokenRetval::TK_WHITESPACE))
2505 if (!tok.
is(TokenRetval::TK_WORD))
2507 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"unexpected token {} as the argument of '{:c}{}' command",
2525 if (!tok.
is(TokenRetval::TK_WHITESPACE))
2534 if (!tok.
is(TokenRetval::TK_WORD))
2536 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"unexpected token {} as the argument of \\{} command",
2544 QCString leftOver = lnk->parse(isJavaLink);
2545 if (!leftOver.isEmpty())
2559 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Illegal command '{:c}{}' found as part of a <dt> tag",
2564 case TokenRetval::TK_SYMBOL:
2565 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Unsupported symbol '{}' found as part of a <dt> tag",
2566 parser()->context.token->name);
2568 case TokenRetval::TK_HTMLTAG:
2573 retval = Token::make_RetVal_DescData();
2583 retval = Token::make_RetVal_DescTitle();
2588 retval = Token::make_RetVal_EndDesc();
2593 if (!
parser()->context.token->endTag)
2604 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Unexpected html tag <{}{}> found within <dt> context",
2605 parser()->context.token->endTag?
"/":
"",
parser()->context.token->name);
2617 if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
2634 Token retval = Token::make_TK_NONE();
2644 retval=par->
parse();
2646 while (retval.
is(TokenRetval::TK_NEWPARA));
2657 Token retval = Token::make_RetVal_OK();
2665 if (tok.
is(TokenRetval::TK_HTMLTAG))
2675 "found <{}> instead!",
parser()->context.token->name);
2680 else if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
2683 " for a html description title");
2700 if (retval.is(TokenRetval::RetVal_DescData))
2703 while (retval.is(TokenRetval::RetVal_DescData))
2710 else if (!retval.is(TokenRetval::RetVal_DescTitle))
2715 }
while (retval.
is(TokenRetval::RetVal_DescTitle));
2717 if (retval.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
2719 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"unexpected end of comment while inside <dl> block");
2724 return retval.
is(TokenRetval::RetVal_EndDesc) ? Token::make_RetVal_OK() : retval;
2732 Token retval = Token::make_TK_NONE();
2743 retval=par->
parse();
2745 while (retval.
is(TokenRetval::TK_NEWPARA));
2755 Token retval = Token::make_TK_NONE();
2766 retval=par->
parse();
2767 if (retval.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
break;
2771 if (retval.
is(TokenRetval::RetVal_ListItem))
2776 while (!retval.
is(TokenRetval::RetVal_CloseXml));
2789 Token retval = Token::make_RetVal_OK();
2798 if (tok.
is(TokenRetval::TK_HTMLTAG))
2807 ) &&
parser()->context.token->endTag
2813 retval = Token::make_RetVal_EndList();
2821 "found <{}{}> instead!",
parser()->context.token->endTag?
"/":
"",
parser()->context.token->name);
2826 else if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
2831 " for a html list item");
2848 }
while (retval.
is(TokenRetval::RetVal_ListItem));
2850 if (retval.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
2852 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"unexpected end of comment while inside <{:c}l> block",
2858 return retval.
is(TokenRetval::RetVal_EndList) ? Token::make_RetVal_OK() : retval;
2864 Token retval = Token::make_RetVal_OK();
2873 if (tok.
is(TokenRetval::TK_HTMLTAG))
2884 "found <{}> instead!",
parser()->context.token->name);
2889 else if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
2892 " for a html list item");
2906 retval=li->parseXml();
2907 if (retval.is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
break;
2909 }
while (retval.
is(TokenRetval::RetVal_ListItem));
2911 if (retval.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
2913 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"unexpected end of comment while inside <list type=\"{}\"> block",
2919 return (retval.
is_any_of(TokenRetval::RetVal_EndList,TokenRetval::RetVal_CloseXml) ||
parser()->context.token->name==
"list") ?
2920 Token::make_RetVal_OK() : retval;
2928 Token retval = Token::make_TK_NONE();
2939 retval=par->
parse();
2941 while (retval.
is(TokenRetval::TK_NEWPARA));
2944 if (retval.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
2946 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"unexpected end of comment while inside <blockquote> block");
2950 return retval.
is(TokenRetval::RetVal_EndBlockQuote) ? Token::make_RetVal_OK() : retval;
2958 Token retval = Token::make_TK_NONE();
2969 retval=par->
parse();
2971 while (retval.
is(TokenRetval::TK_NEWPARA));
2975 return retval.
is(TokenRetval::RetVal_EndBlockQuote) ? Token::make_RetVal_OK() : retval;
3002 Token rv = Token::make_TK_NONE();
3008 }
while (rv.
is(TokenRetval::RetVal_ListItem));
3009 return (!rv.
is(TokenRetval::TK_NEWPARA)) ? rv : Token::make_RetVal_OK();
3022 Token retval = Token::make_RetVal_OK();
3032 if (isFirst) { par->markFirst(); isFirst=
FALSE; }
3033 retval=par->parse();
3034 if (!par->isEmpty())
3045 }
while (retval.
is(TokenRetval::TK_NEWPARA) &&
parser()->context.token->indent>
m_indent);
3064 Token retval = Token::make_RetVal_OK();
3071 switch (
parser()->context.token->id)
3093 while (retval.
is(TokenRetval::TK_LISTITEM) &&
3097 (
parser()->context.token->id==-1 ||
parser()->context.token->id>=num)
3114 while (!tok.
is_any_of(TokenRetval::TK_NONE, TokenRetval::TK_EOF))
3146 return m_title && std::get<DocTitle>(*m_title).hasTitle();
3158 std::get_if<DocTitle>(
m_title.get())->parse();
3162 if (!
children().empty() && std::holds_alternative<DocPara>(
children().back()))
3180 Token retval = par->parse();
3200 return Token::make_RetVal_OK();
3208 Token retval = Token::make_RetVal_OK();
3212 if (!
children().empty() && std::holds_alternative<DocPara>(
children().back()))
3214 std::get<DocPara>(
children().back()).markLast(
false);
3226 retval = par->parse();
3227 if (retval.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
break;
3228 if (retval.
is(TokenRetval::RetVal_CloseXml))
3230 retval = Token::make_RetVal_OK();
3242 if (
children().empty() || (p=std::get_if<DocPara>(&
children().back()))==
nullptr)
3264 case See:
return "see";
3265 case Return:
return "return";
3267 case Authors:
return "author";
3268 case Version:
return "version";
3269 case Since:
return "since";
3270 case Date:
return "date";
3271 case Note:
return "note";
3272 case Warning:
return "warning";
3273 case Pre:
return "pre";
3274 case Post:
return "post";
3276 case Invar:
return "invariant";
3277 case Remark:
return "remark";
3280 case User:
return "user";
3281 case Rcs:
return "rcs";
3291 Token retval = Token::make_RetVal_OK();
3299 if (!tok.
is(TokenRetval::TK_WHITESPACE))
3303 retval = Token::make_RetVal_EndParBlock();
3307 tok=tokenizer.
lex();
3308 while (tok.
is(TokenRetval::TK_WORD))
3313 if (typeSeparator!=-1)
3318 if (
parent() && std::holds_alternative<DocParamSect>(*
parent()))
3320 std::get<DocParamSect>(*
parent()).m_hasTypeSpecifier=
true;
3337 tok=tokenizer.
lex();
3340 if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
3343 "argument of command {}",saveCmdName);
3344 retval = Token::make_RetVal_EndParBlock();
3347 if (!tok.
is(TokenRetval::TK_WHITESPACE))
3349 if (!tok.
is(TokenRetval::TK_NEWPARA))
3352 "argument of command {}",tok.
to_string(),saveCmdName);
3354 retval = Token::make_RetVal_EndParBlock();
3360 retval = par->
parse();
3372 Token retval = Token::make_RetVal_OK();
3393 retval = par->parse();
3415 if (retval.is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
break;
3417 }
while (retval.
is(TokenRetval::RetVal_CloseXml) &&
3422 if (retval.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
3428 retval = Token::make_RetVal_OK();
3440 Token retval = Token::make_RetVal_OK();
3448 if (!
children().empty() && std::holds_alternative<DocParamList>(
children().back()))
3463 retval = pl->parseXml(cmdName);
3467 retval = pl->parse(cmdName);
3469 if (retval.
is(TokenRetval::RetVal_EndParBlock))
3471 retval = Token::make_RetVal_OK();
3490 bool needsSeparator =
FALSE;
3492 (ss=
children().get_last<DocSimpleSect>()) &&
3497 needsSeparator =
TRUE;
3504 Token rv = Token::make_RetVal_OK();
3513 return (!rv.
is(TokenRetval::TK_NEWPARA)) ? rv : Token::make_RetVal_OK();
3518 bool xmlContext=
FALSE,
3524 (ps=
children().get_last<DocParamSect>()) &&
3536 return (!rv.
is(TokenRetval::TK_NEWPARA)) ? rv : Token::make_RetVal_OK();
3544 if (!tok.
is(TokenRetval::TK_WHITESPACE))
3552 if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
3554 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"no emoji name given or unexpected end of comment block while parsing the "
3555 "argument of command '{:c}{}'",cmdChar,cmdName);
3559 else if (!tok.
is(TokenRetval::TK_WORD))
3574 if (!tok.
is(TokenRetval::TK_WHITESPACE))
3582 if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
3584 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"unexpected end of comment block while parsing the "
3585 "argument of command '{:c}{}'",cmdChar,cmdName);
3588 else if (!tok.
is_any_of(TokenRetval::TK_WORD,TokenRetval::TK_LNKWORD))
3598 switch (opt->
kind())
3618 std::string lstFormat =
theTranslator->trWriteList(
static_cast<int>(lst->size())).str();
3619 static const reg::Ex marker(R
"(@(\d+))");
3624 for ( ; it!=
end ; ++it)
3626 const auto &match = *it;
3627 size_t newIndex = match.position();
3628 size_t matchLen = match.length();
3629 optionValue += lstFormat.substr(index,newIndex-index);
3630 unsigned long entryIndex = std::stoul(match[1].str());
3631 if (entryIndex<(
unsigned long)lst->size())
3633 optionValue += lst->at(entryIndex);
3635 index=newIndex+matchLen;
3637 optionValue+=lstFormat.substr(index);
3642 warn(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Obsolete setting for '{:c}{}': '{}'",
3643 cmdChar,cmdName,
parser()->context.token->name);
3647 "Disabled setting (i.e. not supported in this doxygen executable) for '{:c}{}': '{}'",
3648 cmdChar,cmdName,
parser()->context.token->name);
3661 warn(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Unknown option for '{:c}{}': '{}'",
3662 cmdChar,cmdName,
parser()->context.token->name);
3672 ASSERT(retval.
is(TokenRetval::TK_WHITESPACE));
3675 if (retval.
is(TokenRetval::RetVal_OK))
3696 if (!tok.
is(TokenRetval::TK_WHITESPACE))
3704 if (!tok.
is(TokenRetval::TK_WORD))
3718 bool specDateOnlyWS = !specDateRaw.
isEmpty() && specDate.
isEmpty();
3719 if (!specDate.
isEmpty() && !tok.
is_any_of(TokenRetval::TK_WORD,TokenRetval::TK_NONE,TokenRetval::TK_EOF))
3721 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"invalid <date_time> argument for command '{:c}{}'",
3732 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"invalid <date_time> argument for command '{:c}{}': {}",
3733 cmdChar,cmdName,
err);
3745 if ((usedFormat&bitMask) && !(specFormat&bitMask))
3747 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.",
3765 if (!tok.
is(TokenRetval::TK_WHITESPACE))
3774 if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
3776 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"unexpected end of comment block while parsing the "
3777 "argument of command {}", saveCmdName);
3780 else if (!tok.
is(TokenRetval::TK_WORD))
3804 (!n1_docIncOp && !n1_docWs) ||
3805 (n1_docWs && n2 && !n2_docIncOp);
3810 n1_docIncOp->markLast(
false);
3812 else if (n1_docWs && n2_docIncOp)
3825 if (!tok.
is(TokenRetval::TK_WHITESPACE))
3834 if (!tok.
is(TokenRetval::TK_WORD))
3861 AUTO_TRACE(
"cmdName={} isJavaLink={}",cmdName,isJavaLink);
3864 if (!tok.
is(TokenRetval::TK_WHITESPACE))
3872 if (!tok.
is(TokenRetval::TK_WORD))
3878 if (saveCmdName ==
"javalink")
3887 if (saveCmdName ==
"javalink")
3893 QCString leftOver = lnk->parse(isJavaLink);
3905 bool isBlock =
false;
3906 bool trimLeft =
false;
3907 bool localScope =
false;
3909 if (tok.
is(TokenRetval::TK_WORD) &&
parser()->context.token->name==
"{")
3915 auto contains = [&optList](
const char *kw)
3917 return std::find(optList.begin(),optList.end(),kw)!=optList.end();
3919 localScope = contains(
"local");
3920 if (contains(
"nostrip"))
3922 stripCodeComments =
false;
3924 else if (contains(
"strip"))
3926 stripCodeComments =
true;
3933 if (contains(
"lineno"))
3940 if (!tok.
is(TokenRetval::TK_WHITESPACE))
3947 else if (tok.
is(TokenRetval::TK_WORD) &&
parser()->context.token->name==
"[")
3955 else if (!tok.
is(TokenRetval::TK_WHITESPACE))
3964 if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
3966 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"unexpected end of comment block while parsing the "
3967 "argument of command {}",saveCmdName);
3970 else if (!tok.
is(TokenRetval::TK_WORD))
3984 if (!tok.
is(TokenRetval::TK_WORD))
3986 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"expected block identifier, but found token {} instead while parsing the {} command",
4001 blockId,isBlock,trimLeft);
4011 if (!tok.
is(TokenRetval::TK_WHITESPACE))
4014 cmdChar,saveCmdName);
4018 if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
4020 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"unexpected end of comment block while parsing the "
4021 "argument of command '{:c}{}'", cmdChar,saveCmdName);
4024 else if (!tok.
is_any_of(TokenRetval::TK_WORD,TokenRetval::TK_LNKWORD))
4041 return retval.is(TokenRetval::RetVal_OK) ? Token::make_TK_NEWPARA() : retval;
4063 if (
parser()->context.xmlComment)
4069 while (i<l && (
parser()->context.token->verb.at(i)==
' ' ||
parser()->context.token->verb.at(i)==
'\n'))
4071 if (
parser()->context.token->verb.at(i)==
'\n') li=i+1;
4081 if (retval.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
4092 if (
parser()->context.memberDef)
4098 bool hasParamCommand =
false;
4099 bool hasReturnCommand =
false;
4134 Token retval = Token::make_RetVal_OK();
4140 std::string str{cmdChar};
4144 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Found unexpanded alias '{:c}{}'. Check if number of arguments passed is correct.",cmdChar,cmdName);
4293 retval = Token::make_RetVal_Section();
4299 retval = Token::make_RetVal_Subsection();
4305 retval = Token::make_RetVal_Subsubsection();
4311 retval = Token::make_RetVal_Paragraph();
4317 retval = Token::make_RetVal_SubParagraph();
4323 retval = Token::make_RetVal_SubSubParagraph();
4343 if (retval.is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
4355 if (retval.is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
4367 if (retval.is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
4379 if (retval.is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
4391 if (retval.is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
4403 if (retval.is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
4417 int idx = fullMatch.
find(
'{');
4418 int idxEnd = fullMatch.
find(
"}",idx+1);
4424 for (
const auto &opt : optList)
4426 if (opt.empty())
continue;
4429 if (locOpt ==
"code")
4435 warn(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Unknown option '{}' for '\\iliteral'",opt);
4443 if (retval.is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
4451 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"javadoc literal section ended without end marker");
4470 if (retval.is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
4491 dv->setText(
parser()->context.token->verb);
4492 dv->setWidth(width);
4493 dv->setHeight(height);
4494 dv->setLocation(
parser()->context.fileName,
parser()->tokenizer.getLineNr());
4497 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"ignoring \\dot command because HAVE_DOT is not set");
4500 if (retval.is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
4521 dv->setText(
parser()->context.token->verb);
4522 dv->setWidth(width);
4523 dv->setHeight(height);
4524 dv->setLocation(
parser()->context.fileName,
parser()->tokenizer.getLineNr());
4525 if (retval.is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
4539 int idx = fullMatch.
find(
'{');
4540 int idxEnd = fullMatch.
find(
"}",idx+1);
4547 for (
const auto &opt : optList)
4549 if (opt.empty())
continue;
4557 warn(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Multiple definition of engine for '\\startuml'");
4570 warn(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Multiple use of filename for '\\startuml'");
4579 if (engine.
isEmpty()) engine =
"uml";
4585 assert(retval.is(TokenRetval::RetVal_OK));
4606 if (engine ==
"ditaa")
4608 dv->setUseBitmap(
true);
4610 else if (engine ==
"uml")
4612 int i = trimmedVerb.
find(
'\n');
4613 QCString firstLine = i==-1 ? trimmedVerb : trimmedVerb.
left(i);
4616 dv->setText(trimmedVerb);
4617 dv->setWidth(width);
4618 dv->setHeight(height);
4619 dv->setLocation(
parser()->context.fileName,
parser()->tokenizer.getLineNr());
4622 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"ignoring \\startuml command because PLANTUML_JAR_PATH is not set");
4625 if (retval.is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
4638 int idx = fullMatch.
find(
'{');
4639 int idxEnd = fullMatch.
find(
"}",idx+1);
4653 assert(retval.is(TokenRetval::RetVal_OK));
4673 dv->setText(trimmedVerb);
4674 dv->setWidth(width);
4675 dv->setHeight(height);
4676 dv->setLocation(
parser()->context.fileName,
parser()->tokenizer.getLineNr());
4677 if (retval.is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
4685 retval = Token::make_RetVal_EndParBlock();
4746 retval = Token::make_RetVal_Internal();
4749 retval = Token::make_RetVal_EndInternal();
4818 "ignoring \\dotfile command because HAVE_DOT is not set");
4912 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Unexpected command '{}' in paragraph context",cmdName);
4915 INTERNAL_ASSERT(retval.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF,TokenRetval::RetVal_OK,TokenRetval::RetVal_SimpleSec
4916 TokenRetval::TK_LISTITEM,TokenRetval::TK_ENDLIST,TokenRetval::TK_NEWPARA
4917 TokenRetval::RetVal_Section,TokenRetval::RetVal_EndList
4918 TokenRetval::RetVal_Internal,TokenRetval::RetVal_SwitchLang
4919 TokenRetval::RetVal_EndInternal)
4926 const char *attrName,
4930 for (
const auto &opt : tagHtmlAttribs)
4932 if (opt.name==attrName)
4934 *result = opt.value;
4943 AUTO_TRACE(
"tagName={} #tagHtmlAttrs={}",tagName,tagHtmlAttribs.size());
4944 Token retval = Token::make_RetVal_OK();
4950 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"HTML tag ('<{}/>') may not use the 'empty tag' XHTML syntax.",
4956 if (!
parser()->context.token->emptyTag)
4964 if (!
parser()->context.token->emptyTag)
4972 if (
parser()->context.token->emptyTag)
break;
4979 retval = Token::make_RetVal_ListItem();
5001 if (
parser()->context.token->emptyTag)
break;
5002 if (
parser()->context.xmlComment)
5047 if (
parser()->context.token->emptyTag)
break;
5053 retval = Token::make_TK_NEWPARA();
5056 if (!
parser()->context.token->emptyTag)
5065 retval = Token::make_RetVal_DescTitle();
5075 retval = Token::make_RetVal_DescData();
5083 if (!
parser()->context.token->emptyTag)
5091 retval = Token::make_RetVal_TableRow();
5094 retval = Token::make_RetVal_TableCell();
5097 retval = Token::make_RetVal_TableHCell();
5144 if (!
parser()->context.token->emptyTag)
5151 if (!
parser()->context.token->emptyTag)
5161 if (!
parser()->context.token->emptyTag)
5164 while (n && !std::holds_alternative<DocHtmlDetails>(*n)) n=
::parent(n);
5174 retval = Token::make_TK_NEWPARA();
5188 retval = Token::make_TK_NEWPARA();
5194 retval = Token::make_RetVal_TableCell();
5264 retval = Token::make_RetVal_TableRow();
5268 retval = Token::make_RetVal_ListItem();
5283 retval = Token::make_RetVal_TableCell();
5297 if (
parser()->context.token->emptyTag)
5311 if (!leftOver.isEmpty())
5329 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Missing 'cref' or 'langword' attribute from <see> tag.");
5357 std::get<DocSimpleSect>(*vss).appendLinkWord(cref);
5358 retval = Token::make_RetVal_OK();
5415 Token retval = Token::make_RetVal_OK();
5425 retval = Token::make_RetVal_EndList();
5435 retval = Token::make_RetVal_EndList();
5451 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"found </details> tag without matching <details>");
5455 retval = Token::make_RetVal_EndHtmlDetails();
5461 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"found </blockquote> tag without matching <blockquote>");
5465 retval = Token::make_RetVal_EndBlockQuote();
5525 retval = Token::make_TK_NEWPARA();
5528 retval = Token::make_RetVal_EndDesc();
5537 retval = Token::make_RetVal_EndTable();
5540 retval = Token::make_RetVal_EndTableRow();
5543 retval = Token::make_RetVal_EndTableCell();
5546 retval = Token::make_RetVal_EndTableCell();
5590 retval = Token::make_TK_NEWPARA();
5604 retval = Token::make_RetVal_CloseXml();
5640 if (!std::get_if<DocAutoListItem>(n))
5648 const auto docAutoList = std::get_if<DocAutoList>(n);
5651 indent = docAutoList->indent();
5660 const auto docPara = std::get_if<DocPara>(n);
5666 return std::get<DocStyleChange>(*stack.top());
5676 indentStr.
fill(
' ',indent);
5691 Token retval = Token::make_TK_NONE();
5692 while (!tok.
is_any_of(TokenRetval::TK_NONE, TokenRetval::TK_EOF))
5696 if (tok.
is_any_of(TokenRetval::TK_WORD,TokenRetval::TK_LNKWORD,TokenRetval::TK_SYMBOL,TokenRetval::TK_URL,
5697 TokenRetval::TK_COMMAND_AT,TokenRetval::TK_COMMAND_BS,TokenRetval::TK_HTMLTAG)
5704 case TokenRetval::TK_WORD:
5707 case TokenRetval::TK_LNKWORD:
5710 case TokenRetval::TK_URL:
5713 case TokenRetval::TK_WHITESPACE:
5731 case TokenRetval::TK_LISTITEM:
5735 while (n && !std::holds_alternative<DocAutoList>(*n)) n=
::parent(n);
5736 const DocAutoList *al = std::get_if<DocAutoList>(n);
5743 retval = Token::make_TK_LISTITEM();
5753 al = std::get_if<DocAutoList>(n);
5767 }
while (retval.
is(TokenRetval::TK_LISTITEM) &&
5772 if (retval.
is(TokenRetval::RetVal_SimpleSec))
5778 if (
parser()->context.token->name.startsWith(
"rcs:"))
5782 tok = Token::make_TK_RCSTAG();
5786 tok = Token::make_TK_COMMAND_BS();
5791 else if (retval.
is(TokenRetval::TK_ENDLIST))
5807 case TokenRetval::TK_ENDLIST:
5808 AUTO_TRACE_ADD(
"Found end of list inside of paragraph at line {}",
parser()->tokenizer.getLineNr());
5809 if (std::get_if<DocAutoListItem>(
parent()))
5812 if (al && al->
indent()>=
parser()->context.token->indent)
5815 retval = Token::make_TK_ENDLIST();
5821 "has invalid indent level");
5830 case TokenRetval::TK_COMMAND_AT:
5832 case TokenRetval::TK_COMMAND_BS:
5837 while (n && !std::holds_alternative<DocSimpleSect>(*n) &&
5838 !std::holds_alternative<DocParamSect>(*n))
5849 retval = Token::make_RetVal_SimpleSec();
5855 while (n && !std::holds_alternative<DocSimpleListItem>(*n)) n=
::parent(n);
5860 retval = Token::make_RetVal_ListItem();
5870 if (retval.
is(TokenRetval::RetVal_SimpleSec))
5876 if (
parser()->context.token->name.startsWith(
"rcs:"))
5880 tok = Token::make_TK_RCSTAG();
5884 tok = Token::make_TK_COMMAND_BS();
5889 else if (retval.
value()>TokenRetval::TK_NONE && retval.
value()<TokenRetval::RetVal_OK)
5895 else if (retval.
value()!=TokenRetval::RetVal_OK)
5902 case TokenRetval::TK_HTMLTAG:
5904 if (!
parser()->context.token->endTag)
5916 if (!retval.
is(TokenRetval::RetVal_OK))
5922 case TokenRetval::TK_SYMBOL:
5933 parser()->context.token->name);
5937 case TokenRetval::TK_NEWPARA:
5938 retval = Token::make_TK_NEWPARA();
5940 case TokenRetval::TK_RCSTAG:
5943 while (n && !std::holds_alternative<DocSimpleSect>(*n) &&
5944 !std::holds_alternative<DocParamSect>(*n))
5954 retval = Token::make_RetVal_SimpleSec();
5965 "Found unexpected token (id={})",tok.
to_string());
5970 retval=Token::make_TK_NONE();
5973 DocPara *par = std::get_if<DocPara>(
parser()->context.nodeStack.top());
5974 if (!
parser()->context.token->endTag && par &&
5975 retval.
is(TokenRetval::TK_NEWPARA) &&
parser()->context.token->name.lower() ==
"p")
5979 INTERNAL_ASSERT(retval.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF,TokenRetval::TK_NEWPARA,TokenRetval::TK_LISTITEM,
5980 TokenRetval::TK_ENDLIST,TokenRetval::RetVal_OK)
5992 Token retval = Token::make_RetVal_OK();
5995 if (!
m_id.isEmpty())
6017 if (isFirst) { par->markFirst(); isFirst=
FALSE; }
6018 retval=par->parse();
6019 if (!par->isEmpty())
6028 if (retval.
is(TokenRetval::TK_LISTITEM))
6032 if (retval.
is(TokenRetval::RetVal_Internal))
6036 if (retval.is(TokenRetval::RetVal_EndInternal))
6038 retval = Token::make_RetVal_OK();
6041 }
while (!retval.
is_any_of(TokenRetval::TK_NONE, TokenRetval::TK_EOF, TokenRetval::RetVal_Section, TokenRetval::RetVal_Subsection,
6042 TokenRetval::RetVal_Subsubsection, TokenRetval::RetVal_Paragraph, TokenRetval::RetVal_SubParagraph,
6043 TokenRetval::RetVal_SubSubParagraph, TokenRetval::RetVal_EndInternal)
6050 if (retval.
is(TokenRetval::RetVal_Subsection) &&
m_level<=1)
6053 while (retval.
is(TokenRetval::RetVal_Subsection))
6062 else if (retval.
is(TokenRetval::RetVal_Subsubsection) &&
m_level<=2)
6068 parser()->tokenizer.getLineNr(),
6069 "Unexpected subsubsection command found inside {}!",
6073 while (retval.
is(TokenRetval::RetVal_Subsubsection))
6080 if (!(
m_level < 2 && retval.
is(TokenRetval::RetVal_Subsection)))
break;
6082 else if (retval.
is(TokenRetval::RetVal_Paragraph) &&
m_level<=3)
6088 "Unexpected paragraph command found inside {}!",
6092 while (retval.
is(TokenRetval::RetVal_Paragraph))
6099 if (!(
m_level<3 && (retval.
is_any_of(TokenRetval::RetVal_Subsection,TokenRetval::RetVal_Subsubsection))))
break;
6101 else if (retval.
is(TokenRetval::RetVal_SubParagraph) &&
m_level<=4)
6107 "Unexpected subparagraph command found inside {}!",
6111 while (retval.
is(TokenRetval::RetVal_SubParagraph))
6118 if (!(
m_level<4 && (retval.
is_any_of(TokenRetval::RetVal_Subsection,TokenRetval::RetVal_Subsubsection,TokenRetval::RetVal_Paragraph))))
break;
6120 else if (retval.
is(TokenRetval::RetVal_SubSubParagraph) &&
m_level<=5)
6126 "Unexpected subsubparagraph command found inside {}!",
6130 while (retval.
is(TokenRetval::RetVal_SubSubParagraph))
6137 if (!(
m_level<5 && (retval.
is_any_of( TokenRetval::RetVal_Subsection, TokenRetval::RetVal_Subsubsection,
6138 TokenRetval::RetVal_Paragraph, TokenRetval::RetVal_SubParagraph))))
break;
6147 TokenRetval::RetVal_Section, TokenRetval::RetVal_Subsection,
6148 TokenRetval::RetVal_Subsubsection, TokenRetval::RetVal_Paragraph,
6149 TokenRetval::RetVal_SubParagraph, TokenRetval::RetVal_SubSubParagraph,
6150 TokenRetval::RetVal_Internal, TokenRetval::RetVal_EndInternal)
6166 while (!tok.
is_any_of(TokenRetval::TK_NONE, TokenRetval::TK_EOF))
6170 case TokenRetval::TK_WORD:
6173 case TokenRetval::TK_WHITESPACE:
6176 case TokenRetval::TK_SYMBOL:
6186 parser()->context.token->name);
6190 case TokenRetval::TK_COMMAND_AT:
6192 case TokenRetval::TK_COMMAND_BS:
6254 parser()->context.token->name);
6278 Token retval = Token::make_TK_NONE();
6288 if (isFirst) { par->markFirst(); isFirst=
FALSE; }
6289 retval=par->parse();
6290 if (par->isEmpty() && par->attribs().empty())
6299 auto checkParagraph = [
this,&retval](
Token t,
int level,
const char *sectionType,
const char *parentSectionType) {
6305 parser()->tokenizer.getLineNr(),
6306 "found {} command (id: '{}') outside of {} context!",
6307 sectionType,
parser()->context.token->sectionId,parentSectionType);
6311 if (!
parser()->context.token->sectionId.isEmpty())
6324 sectionType,
parser()->context.token->sectionId,sectionType);
6325 retval = Token::make_TK_NONE();
6330 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Missing id for {}; ignoring {}",sectionType,sectionType);
6331 retval = Token::make_TK_NONE();
6336 checkParagraph(Token::make_RetVal_SubSubParagraph(), 6,
"subsubparagraph",
"subparagraph" );
6337 checkParagraph(Token::make_RetVal_SubParagraph(), 5,
"subparagraph",
"paragraph" );
6338 checkParagraph(Token::make_RetVal_Paragraph(), 4,
"paragraph",
"subsubsection" );
6339 checkParagraph(Token::make_RetVal_Subsubsection(), 3,
"subsubsection",
"subsection" );
6340 checkParagraph(Token::make_RetVal_Subsection(), 2,
"subsection",
"section" );
6342 if (retval.
is(TokenRetval::TK_LISTITEM))
6346 if (retval.
is(TokenRetval::RetVal_Internal))
6351 }
while (!retval.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF,TokenRetval::RetVal_Section));
6356 while (retval.
is(TokenRetval::RetVal_Section))
6358 if (!
parser()->context.token->sectionId.isEmpty())
6371 retval = Token::make_TK_NONE();
6377 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
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)
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)
DocMermaidFile(DocParser *parser, DocNodeVariant *parent, const QCString &name, const QCString &context, const QCString &srcFile, int srcLine)
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)
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)
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 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)
void handlePendingStyleCommands(DocNodeVariant *parent, DocNodeList &children, size_t numberOfElementsToClose=0)
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)
bool defaultHandleToken(DocNodeVariant *parent, Token &tok, DocNodeList &children, bool handleWord=TRUE)
void handleRef(DocNodeVariant *parent, DocNodeList &children, char cmdChar, const QCString &cmdName)
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 handleImage(DocNodeVariant *parent, DocNodeList &children)
void handleStyleEnter(DocNodeVariant *parent, DocNodeList &children, DocStyleChange::Style s, const QCString &tagName, const HtmlAttribList *attribs)
void handleCite(DocNodeVariant *parent, DocNodeList &children)
void handlePrefix(DocNodeVariant *parent, DocNodeList &children)
Token handleStyleArgument(DocNodeVariant *parent, DocNodeList &children, const QCString &cmdName)
void handleIFile(char cmdChar, const QCString &cmdName)
void handleILine(char cmdChar, 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)
void parse(char cmdChar, const QCString &cmdName)
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 setStateMermaidOpt()
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 * mermaidFileNameLinkedMap
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 Requirement
static constexpr int Page
bool is(TokenRetval rv) const
TOKEN_SPECIFICATIONS RETVAL_SPECIFICATIONS const char * to_string() const
TokenRetval value() const
bool is_any_of(ARGS... args) const
char command_to_char() const
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::multiset< std::string > StringMultiSet
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)
constexpr bool holds_one_of_alternatives(const DocNodeVariant &v)
returns true iff v holds one of types passed as template parameters
std::variant< DocWord, DocLinkedWord, DocURL, DocLineBreak, DocHorRuler, DocAnchor, DocCite, DocStyleChange, DocSymbol, DocEmoji, DocWhiteSpace, DocSeparator, DocVerbatim, DocInclude, DocIncOperator, DocFormula, DocIndexEntry, DocAutoList, DocAutoListItem, DocTitle, DocXRefItem, DocImage, DocDotFile, DocMscFile, DocDiaFile, DocVhdlFlow, DocLink, DocRef, DocInternalRef, DocHRef, DocHtmlHeader, DocHtmlDescTitle, DocHtmlDescList, DocSection, DocSecRefItem, DocSecRefList, DocInternal, DocParBlock, DocSimpleList, DocHtmlList, DocSimpleSect, DocSimpleSectSep, DocParamSect, DocPara, DocParamList, DocSimpleListItem, DocHtmlListItem, DocHtmlDescData, DocHtmlCell, DocHtmlCaption, DocHtmlRow, DocHtmlTable, DocHtmlBlockQuote, DocText, DocRoot, DocHtmlDetails, DocHtmlSummary, DocPlantUmlFile, DocMermaidFile > DocNodeVariant
DocNodeList * call_method_children(DocNodeVariant *v)
constexpr DocNodeVariant * parent(DocNodeVariant *n)
returns the parent node of a given node n or nullptr if the node has no parent.
std::unique_ptr< DocNodeVariant > createDocNode(Args &&...args)
Private header shared between docparser.cpp and docnode.cpp.
bool insideUL(const DocNodeVariant *n)
bool insideTable(const DocNodeVariant *n)
IterableStack< const DocNodeVariant * > DocStyleChangeStack
bool insidePRE(const DocNodeVariant *n)
bool insideLI(const DocNodeVariant *n)
bool insideDL(const DocNodeVariant *n)
bool insideBlockQuote(const DocNodeVariant *n)
bool insideDetails(const DocNodeVariant *n)
bool insideOL(const DocNodeVariant *n)
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,...
Parser's context to store all global variables.
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.