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=
'>';
120 std::visit([&](
auto &&x)->
decltype(
auto) {
return x.setParent(newParent); }, *n);
164 size_t len=locSymName.
length();
167 if (locSymName.
at(len-1)!=
':') locSymName.
append(
":");
168 if (locSymName.
at(0)!=
':') locSymName.
prepend(
":");
186 Doxygen::searchIndex.addWord(word,false);
203 Doxygen::searchIndex.addWord(word,false);
219 if (
id.left(anchorPrefix.
length()) == anchorPrefix)
309 parser()->tokenizer.getLineNr(),
310 "block marked with {} for \\snippet should appear twice in file {}, found it {:d} times",
324 "No previous '\\include' or '\\dontinclude' command for '\\{}' present",
335 size_t so = o, bo = 0;
336 bool nonEmpty =
FALSE;
349 else if (!isspace(
static_cast<uint8_t
>(c)))
379 else if (!isspace(
static_cast<uint8_t
>(c)))
412 else if (!isspace(
static_cast<uint8_t
>(c)))
443 else if (!isspace(
static_cast<uint8_t
>(c)))
487 if (
parser()->context.memberDef &&
parser()->context.memberDef->name().at(0)==
'@')
546 while (!tok.
is_any_of(TokenRetval::TK_NONE, TokenRetval::TK_EOF))
560 if (sec==
nullptr &&
parser()->context.lang==SrcLangExt::Markdown)
619 while (!tok.
is_any_of(TokenRetval::TK_NONE, TokenRetval::TK_EOF))
621 if (tok.
is_any_of(TokenRetval::TK_COMMAND_AT, TokenRetval::TK_COMMAND_BS))
628 if (!tok.
is(TokenRetval::TK_WHITESPACE))
634 if (!tok.
is_any_of(TokenRetval::TK_WORD,TokenRetval::TK_LNKWORD))
648 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Illegal command '{:c}{}' as part of a \\secreflist",
653 else if (tok.
is(TokenRetval::TK_WHITESPACE))
659 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Unexpected token {} inside section reference list",
691 while (!tok.
is_any_of(TokenRetval::TK_NONE, TokenRetval::TK_EOF))
710 AUTO_TRACE(
"target='{}',context='{}'",target,context);
713 auto lang =
parser->context.lang;
715 if (sec==
nullptr && !
parser->context.prefix.isEmpty())
767 m_file = dd->getOutputFileBase();
774 bool isFile = compound ?
778 if (compound && lang==SrcLangExt::Markdown) lang = compound->
getLanguage();
811 toFileDef(compound)->generateSourceFile()
825 warn_doc_error(
parser->context.fileName,
parser->tokenizer.getLineNr(),
"unable to resolve reference to '{}' for \\ref command",
831 for (
auto &&elem : elements)
841 for (
auto &dn : children)
843 DocPara *para = std::get_if<DocPara>(&dn);
855 for (
auto &cn : children)
862 for (
auto &ccn : *opt_children)
876 while (!tok.
is_any_of(TokenRetval::TK_NONE, TokenRetval::TK_EOF))
882 case TokenRetval::TK_HTMLTAG:
895 if (
parser()->context.insideHtmlLink)
900 "Potential recursion while resolving \\ref command!");
927 if (numBibFiles>0 && cite && !cite->
text().
isEmpty())
938 warn_doc_error(
parser->context.fileName,
parser->tokenizer.getLineNr(),
"\\cite command found but no bib files specified via CITE_BIB_FILES!");
940 else if (cite==
nullptr)
942 warn_doc_error(
parser->context.fileName,
parser->tokenizer.getLineNr(),
"unable to resolve reference to '{}' for \\cite command",
947 warn_doc_error(
parser->context.fileName,
parser->tokenizer.getLineNr(),
"\\cite command to '{}' does not have an associated number",
959 if (!opt.noPar()) txt +=
"[";
963 if (opt.isNumber()) txt += citeInfo->
text();
964 else if (opt.isShortAuthor()) txt += citeInfo->
shortAuthor();
965 else if (opt.isYear()) txt += citeInfo->
year();
968 if (!opt.noPar()) txt +=
"]";
983 m_refText = m_refText.right(m_refText.length()-1);
990 if (compound && compound->isLinkable())
992 m_file = compound->getOutputFileBase();
993 m_ref = compound->getReference();
996 (
toFileDef(compound))->generateSourceFile()
1006 warn_doc_error(parser->context.fileName,parser->tokenizer.getLineNr(),
"unable to resolve link to '{}' for \\link command",
1018 while (!tok.
is_any_of(TokenRetval::TK_NONE, TokenRetval::TK_EOF))
1022 switch (tok.
value())
1024 case TokenRetval::TK_COMMAND_AT:
1026 case TokenRetval::TK_COMMAND_BS:
1042 case TokenRetval::TK_SYMBOL:
1043 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Unsupported symbol '{}' found as part of a \\link",
1044 parser()->context.token->name);
1046 case TokenRetval::TK_HTMLTAG:
1047 if (
parser()->context.token->name!=
"see" || !isXmlLink)
1049 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Unexpected xml/html command {} found as part of a \\link",
1050 parser()->context.token->name);
1053 case TokenRetval::TK_LNKWORD:
1054 case TokenRetval::TK_WORD:
1063 else if ((p=w.
find(
'}'))!=-1)
1065 int l =
static_cast<int>(w.
length());
1069 result=w.
right(l-p-1);
1083 if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
1086 parser()->tokenizer.getLineNr(),
1087 "Unexpected end of comment while inside link command");
1107 p->relPath =
parser->context.relPath;
1117 if (fd==
nullptr && !
p->name.endsWith(
".dot"))
1128 "Possible candidates:\n{}",
p->name,
1136 "in any of the paths specified via DOTFILE_DIRS!",
p->name);
1145 p->relPath =
parser->context.relPath;
1155 if (fd==
nullptr && !
p->name.endsWith(
".msc"))
1166 "Possible candidates:\n{}",
qPrint(
p->name),
1174 "in any of the paths specified via MSCFILE_DIRS!",
p->name);
1185 p->relPath =
parser->context.relPath;
1195 if (fd==
nullptr && !
p->name.endsWith(
".dia"))
1206 "Possible candidates:\n{}",
p->name,
1214 "in any of the paths specified via DIAFILE_DIRS!",
p->name);
1224 p->relPath =
parser->context.relPath;
1234 if (fd==
nullptr && !
p->name.endsWith(
".puml"))
1237 if (fd==
nullptr && !
p->name.endsWith(
".pu"))
1249 "Possible candidates:\n{}",
p->name,
1257 "in any of the paths specified via PLANTUMLFILE_DIRS!",
p->name);
1275 while (!tok.
is_any_of(TokenRetval::TK_NONE, TokenRetval::TK_EOF))
1302 QCString locName =
p->url.isEmpty() ?
p->name :
p->url;
1303 int len =
static_cast<int>(locName.
length());
1304 int fnd = locName.
find(
'?');
1305 if (fnd==-1) fnd=len;
1306 return fnd>=4 && locName.
mid(fnd-4,4)==
".svg";
1320 Token retval(TokenRetval::RetVal_OK);
1324 while (!tok.
is_any_of(TokenRetval::TK_NONE, TokenRetval::TK_EOF))
1328 switch (tok.
value())
1330 case TokenRetval::TK_HTMLTAG:
1389 if (!
parser()->context.token->endTag)
1400 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Unexpected html tag <{}{}> found within <h{:d}> context",
1413 if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
1430 while (!tok.
is_any_of(TokenRetval::TK_NONE, TokenRetval::TK_EOF))
1434 if (tok.
value()==TokenRetval::TK_HTMLTAG &&
1436 parser()->context.token->endTag
1448 if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
1460 Token retval(TokenRetval::TK_NONE);
1471 retval=par->
parse();
1473 while (retval.
is(TokenRetval::TK_NEWPARA));
1476 if (retval.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
1478 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"unexpected end of comment while inside <details> block");
1489 return retval.
is(TokenRetval::RetVal_EndHtmlDetails) ? Token::make_RetVal_OK() : retval;
1505 Token retval(TokenRetval::RetVal_OK);
1509 while (!tok.
is_any_of(TokenRetval::TK_NONE, TokenRetval::TK_EOF))
1513 switch (tok.
value())
1515 case TokenRetval::TK_HTMLTAG:
1528 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Unexpected html tag <{}{}> found within <a href=...> context",
1529 parser()->context.token->endTag?
"/":
"",
parser()->context.token->name);
1540 if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
1543 " <a href=...> tag");
1555 Token retval(TokenRetval::RetVal_OK);
1565 if (isFirst) { par->markFirst(); isFirst=
FALSE; }
1566 retval=par->parse();
1567 if (!par->isEmpty())
1576 if (retval.
is(TokenRetval::TK_LISTITEM))
1580 }
while (!retval.
is_any_of(TokenRetval::TK_NONE, TokenRetval::TK_EOF,
1581 TokenRetval::RetVal_Section, TokenRetval::RetVal_Subsection, TokenRetval::RetVal_Subsubsection,
1582 TokenRetval::RetVal_Paragraph, TokenRetval::RetVal_SubParagraph, TokenRetval::RetVal_SubSubParagraph,
1583 TokenRetval::RetVal_EndInternal));
1587 while ((level==1 && retval.
is(TokenRetval::RetVal_Section)) ||
1588 (level==2 && retval.
is(TokenRetval::RetVal_Subsection)) ||
1589 (level==3 && retval.
is(TokenRetval::RetVal_Subsubsection)) ||
1590 (level==4 && retval.
is(TokenRetval::RetVal_Paragraph)) ||
1591 (level==5 && retval.
is(TokenRetval::RetVal_SubParagraph)) ||
1592 (level==6 && retval.
is(TokenRetval::RetVal_SubSubParagraph))
1601 if (retval.
is(TokenRetval::RetVal_Internal))
1603 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"\\internal command found inside internal section");
1615 Token retval(TokenRetval::RetVal_OK);
1618 if (!tok.
is(TokenRetval::TK_WHITESPACE))
1626 while (!tok.
is_any_of(TokenRetval::TK_NONE, TokenRetval::TK_EOF))
1628 switch (tok.
value())
1630 case TokenRetval::TK_WHITESPACE:
1633 case TokenRetval::TK_WORD:
1634 case TokenRetval::TK_LNKWORD:
1637 case TokenRetval::TK_SYMBOL:
1659 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Unexpected symbol '{}' found as argument of \\addindex",
parser()->context.token->name);
1664 case TokenRetval::TK_COMMAND_AT:
1666 case TokenRetval::TK_COMMAND_BS:
1688 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Unexpected command {} found as argument of \\addindex",
1689 parser()->context.token->name);
1713 for (
const auto &opt :
attribs)
1715 if (opt.name==
"id" && !opt.value.isEmpty())
1740 Token retval = Token::make_TK_NONE();
1743 while (!tok.
is_any_of(TokenRetval::TK_NONE, TokenRetval::TK_EOF))
1747 switch (tok.
value())
1749 case TokenRetval::TK_HTMLTAG:
1754 retval = Token::make_RetVal_OK();
1759 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Unexpected html tag <{}{}> found within <caption> context",
1760 parser()->context.token->endTag?
"/":
"",
parser()->context.token->name);
1771 if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
1786 Token retval = Token::make_RetVal_OK();
1797 retval=par->
parse();
1798 if (retval.
is(TokenRetval::TK_HTMLTAG))
1803 retval = Token::make_TK_NEWPARA();
1807 retval = Token::make_TK_NEWPARA();
1811 while (retval.
is_any_of(TokenRetval::TK_NEWPARA,TokenRetval::RetVal_EndParBlock));
1820 Token retval = Token::make_RetVal_OK();
1831 retval=par->
parse();
1832 if (retval.
is(TokenRetval::TK_HTMLTAG))
1837 retval = Token::make_TK_NEWPARA();
1841 retval = Token::make_TK_NEWPARA();
1845 while (retval.
is(TokenRetval::TK_NEWPARA));
1853 for (
const auto &attr :
attribs())
1855 if (attr.name.lower()==
"rowspan")
1857 return attr.value.toUInt();
1865 for (
const auto &attr :
attribs())
1867 if (attr.name.lower()==
"colspan")
1869 return std::max(1u,attr.value.toUInt());
1877 for (
const auto &attr :
attribs())
1881 if (attrName==
"align")
1883 if (attrValue==
"center")
1885 else if (attrValue==
"right")
1889 else if (attrName==
"class" && attrValue.
startsWith(
"markdowntable"))
1891 if (attrValue==
"markdowntableheadcenter")
1893 else if (attrValue==
"markdowntableheadright")
1895 else if (attrValue==
"markdowntableheadleft")
1897 else if (attrValue==
"markdowntableheadnone")
1899 else if (attrValue==
"markdowntablebodycenter")
1901 else if (attrValue==
"markdowntablebodyright")
1903 else if (attrValue==
"markdowntablebodyleft")
1905 else if (attrValue==
"markdowntablebodynone")
1915 for (
const auto &attr :
attribs())
1919 if (attrName==
"valign")
1921 if (attrValue==
"top")
1923 else if (attrValue==
"bottom")
1925 else if (attrValue==
"middle")
1940 const DocHtmlCell *cell = std::get_if<DocHtmlCell>(&n);
1956 while (tok.
is_any_of(TokenRetval::TK_WHITESPACE,TokenRetval::TK_NEWPARA,TokenRetval::TK_HTMLTAG,
1957 TokenRetval::TK_COMMAND_AT,TokenRetval::TK_COMMAND_BS))
1959 if (tok.
is(TokenRetval::TK_HTMLTAG))
1975 else if (tok.
is(TokenRetval::TK_COMMAND_AT) || tok.
is(TokenRetval::TK_COMMAND_BS))
1985 if (!tok.
is(TokenRetval::TK_WORD))
2013 Token retval = Token::make_RetVal_OK();
2022 if (tok.
is(TokenRetval::TK_HTMLTAG))
2035 "found <{}{}> instead!",
parser()->context.token->endTag ?
"/" :
"",
parser()->context.token->name);
2040 else if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
2043 " for a html description title");
2048 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"expected <td> or <th> tag but found {} token instead!",
2062 retval=cell->
parse();
2063 isHeading = retval.
is(TokenRetval::RetVal_TableHCell);
2065 if (retval.
is(TokenRetval::RetVal_EndTableCell))
2071 if (tok.
is(TokenRetval::TK_HTMLTAG))
2074 !
parser()->context.token->endTag)
2076 retval = Token::make_RetVal_TableCell();
2081 if (
parser()->context.token->endTag)
2083 retval = Token::make_RetVal_EndTableRow();
2087 retval = Token::make_RetVal_TableRow();
2092 retval = Token::make_RetVal_EndTable();
2097 "found <{}{}> instead!",
parser()->context.token->endTag ?
"/" :
"",
parser()->context.token->name);
2104 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"expected <td>, <th> or <tr> tag but found {} token instead!",
2110 while (retval.
is_any_of(TokenRetval::RetVal_TableCell,TokenRetval::RetVal_TableHCell));
2120 Token retval = Token::make_RetVal_OK();
2131 if (tok.
is(TokenRetval::TK_HTMLTAG))
2143 "found <{}> instead!",
parser()->context.token->name);
2148 else if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
2151 " for a html description title");
2156 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"expected <td> or <th> tag but found {} token instead!",
2169 while (retval.
is_any_of(TokenRetval::RetVal_TableCell,TokenRetval::RetVal_TableHCell));
2193 const DocHtmlRow *row = std::get_if<DocHtmlRow>(&rowNode);
2206 Token retval = Token::make_RetVal_OK();
2213 if (tok.
is(TokenRetval::TK_HTMLTAG))
2219 retval = Token::make_RetVal_TableRow();
2230 retval=std::get<DocHtmlCaption>(*m_caption).parse();
2232 if (retval.
is(TokenRetval::RetVal_OK))
2241 "found <{}{}> instead!",
parser()->context.token->endTag ?
"/" :
"",
parser()->context.token->name);
2244 else if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
2247 " for a <tr> or <caption> tag");
2256 while (retval.
is(TokenRetval::RetVal_TableRow))
2261 if (retval.is(TokenRetval::RetVal_EndTableRow))
2269 retval = Token::make_RetVal_TableRow();
2273 retval = Token::make_RetVal_EndTable();
2278 "found token {} instead!",retval.to_string());
2279 retval=Token::make_RetVal_OK();
2287 return retval.
is(TokenRetval::RetVal_EndTable) ? Token::make_RetVal_OK() : retval;
2293 Token retval = Token::make_RetVal_OK();
2302 bool isHeader=
FALSE;
2303 if (tok.
is(TokenRetval::TK_HTMLTAG))
2308 retval = Token::make_RetVal_TableRow();
2312 retval = Token::make_RetVal_TableRow();
2318 while (retval.
is(TokenRetval::RetVal_TableRow))
2322 retval=tr->parseXml(isHeader);
2357 DocHtmlRow *row = std::get_if<DocHtmlRow>(&rowNode);
2360 for (
auto &cellNode : row->
children())
2362 DocHtmlCell *cell = std::get_if<DocHtmlCell>(&cellNode);
2365 uint32_t rs = cell->
rowSpan();
2366 uint32_t cs = cell->
colSpan();
2368 for (
size_t i=0;i<rowSpans.size();i++)
2370 if (rowSpans[i].rowsLeft>0 &&
2371 rowSpans[i].column==colIdx)
2373 colIdx=rowSpans[i].column+1;
2377 if (rs>0) rowSpans.emplace_back(rs,colIdx);
2385 for (
size_t i=0;i<rowSpans.size();i++)
2387 if (rowSpans[i].rowsLeft>0) rowSpans[i].rowsLeft--;
2393 if (colIdx-1>maxCols) maxCols=colIdx-1;
2403 Token retval = Token::make_TK_NONE();
2407 while (!tok.
is_any_of(TokenRetval::TK_NONE, TokenRetval::TK_EOF))
2411 switch (tok.
value())
2413 case TokenRetval::TK_COMMAND_AT:
2415 case TokenRetval::TK_COMMAND_BS:
2418 bool isJavaLink=
FALSE;
2424 if (!tok.
is(TokenRetval::TK_WHITESPACE))
2433 if (!tok.
is(TokenRetval::TK_WORD))
2435 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"unexpected token {} as the argument of '{:c}{}' command",
2453 if (!tok.
is(TokenRetval::TK_WHITESPACE))
2462 if (!tok.
is(TokenRetval::TK_WORD))
2464 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"unexpected token {} as the argument of \\{} command",
2472 QCString leftOver = lnk->parse(isJavaLink);
2473 if (!leftOver.isEmpty())
2483 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Illegal command '{:c}{}' found as part of a <dt> tag",
2488 case TokenRetval::TK_SYMBOL:
2489 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Unsupported symbol '{}' found as part of a <dt> tag",
2490 parser()->context.token->name);
2492 case TokenRetval::TK_HTMLTAG:
2497 retval = Token::make_RetVal_DescData();
2507 retval = Token::make_RetVal_DescTitle();
2512 retval = Token::make_RetVal_EndDesc();
2517 if (!
parser()->context.token->endTag)
2524 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Unexpected html tag <{}{}> found within <dt> context",
2525 parser()->context.token->endTag?
"/":
"",
parser()->context.token->name);
2537 if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
2553 Token retval = Token::make_TK_NONE();
2563 retval=par->
parse();
2565 while (retval.
is(TokenRetval::TK_NEWPARA));
2576 Token retval = Token::make_RetVal_OK();
2584 if (tok.
is(TokenRetval::TK_HTMLTAG))
2594 "found <{}> instead!",
parser()->context.token->name);
2599 else if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
2602 " for a html description title");
2619 if (retval.is(TokenRetval::RetVal_DescData))
2622 while (retval.is(TokenRetval::RetVal_DescData))
2629 else if (!retval.is(TokenRetval::RetVal_DescTitle))
2634 }
while (retval.
is(TokenRetval::RetVal_DescTitle));
2636 if (retval.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
2638 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"unexpected end of comment while inside <dl> block");
2643 return retval.
is(TokenRetval::RetVal_EndDesc) ? Token::make_RetVal_OK() : retval;
2651 Token retval = Token::make_TK_NONE();
2662 retval=par->
parse();
2664 while (retval.
is(TokenRetval::TK_NEWPARA));
2674 Token retval = Token::make_TK_NONE();
2685 retval=par->
parse();
2686 if (retval.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
break;
2690 if (retval.
is(TokenRetval::RetVal_ListItem))
2695 while (!retval.
is(TokenRetval::RetVal_CloseXml));
2708 Token retval = Token::make_RetVal_OK();
2717 if (tok.
is(TokenRetval::TK_HTMLTAG))
2726 ) &&
parser()->context.token->endTag
2732 retval = Token::make_RetVal_EndList();
2740 "found <{}{}> instead!",
parser()->context.token->endTag?
"/":
"",
parser()->context.token->name);
2745 else if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
2750 " for a html list item");
2767 }
while (retval.
is(TokenRetval::RetVal_ListItem));
2769 if (retval.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
2771 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"unexpected end of comment while inside <{:c}l> block",
2777 return retval.
is(TokenRetval::RetVal_EndList) ? Token::make_RetVal_OK() : retval;
2783 Token retval = Token::make_RetVal_OK();
2792 if (tok.
is(TokenRetval::TK_HTMLTAG))
2803 "found <{}> instead!",
parser()->context.token->name);
2808 else if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
2811 " for a html list item");
2825 retval=li->parseXml();
2826 if (retval.is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
break;
2828 }
while (retval.
is(TokenRetval::RetVal_ListItem));
2830 if (retval.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
2832 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"unexpected end of comment while inside <list type=\"{}\"> block",
2838 return (retval.
is_any_of(TokenRetval::RetVal_EndList,TokenRetval::RetVal_CloseXml) ||
parser()->context.token->name==
"list") ?
2839 Token::make_RetVal_OK() : retval;
2847 Token retval = Token::make_TK_NONE();
2858 retval=par->
parse();
2860 while (retval.
is(TokenRetval::TK_NEWPARA));
2863 if (retval.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
2865 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"unexpected end of comment while inside <blockquote> block");
2869 return retval.
is(TokenRetval::RetVal_EndBlockQuote) ? Token::make_RetVal_OK() : retval;
2877 Token retval = Token::make_TK_NONE();
2888 retval=par->
parse();
2890 while (retval.
is(TokenRetval::TK_NEWPARA));
2894 return retval.
is(TokenRetval::RetVal_EndBlockQuote) ? Token::make_RetVal_OK() : retval;
2921 Token rv = Token::make_TK_NONE();
2927 }
while (rv.
is(TokenRetval::RetVal_ListItem));
2928 return (!rv.
is(TokenRetval::TK_NEWPARA)) ? rv : Token::make_RetVal_OK();
2941 Token retval = Token::make_RetVal_OK();
2951 if (isFirst) { par->markFirst(); isFirst=
FALSE; }
2952 retval=par->parse();
2953 if (!par->isEmpty())
2964 }
while (retval.
is(TokenRetval::TK_NEWPARA) &&
parser()->context.token->indent>
m_indent);
2983 Token retval = Token::make_RetVal_OK();
2990 switch (
parser()->context.token->id)
3012 while (retval.
is(TokenRetval::TK_LISTITEM) &&
3016 (
parser()->context.token->id==-1 ||
parser()->context.token->id>=num)
3032 while (!tok.
is_any_of(TokenRetval::TK_NONE, TokenRetval::TK_EOF))
3064 return m_title && std::get<DocTitle>(*m_title).hasTitle();
3076 std::get_if<DocTitle>(
m_title.get())->parse();
3080 if (!
children().empty() && std::holds_alternative<DocPara>(
children().back()))
3098 Token retval = par->parse();
3118 return Token::make_RetVal_OK();
3126 Token retval = Token::make_RetVal_OK();
3130 if (!
children().empty() && std::holds_alternative<DocPara>(
children().back()))
3132 std::get<DocPara>(
children().back()).markLast(
false);
3144 retval = par->parse();
3145 if (retval.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
break;
3146 if (retval.
is(TokenRetval::RetVal_CloseXml))
3148 retval = Token::make_RetVal_OK();
3160 if (
children().empty() || (p=std::get_if<DocPara>(&
children().back()))==
nullptr)
3182 case See:
return "see";
3183 case Return:
return "return";
3185 case Authors:
return "author";
3186 case Version:
return "version";
3187 case Since:
return "since";
3188 case Date:
return "date";
3189 case Note:
return "note";
3190 case Warning:
return "warning";
3191 case Pre:
return "pre";
3192 case Post:
return "post";
3194 case Invar:
return "invariant";
3195 case Remark:
return "remark";
3198 case User:
return "user";
3199 case Rcs:
return "rcs";
3209 Token retval = Token::make_RetVal_OK();
3215 if (!tok.
is(TokenRetval::TK_WHITESPACE))
3219 retval = Token::make_RetVal_EndParBlock();
3224 while (tok.
is(TokenRetval::TK_WORD))
3229 if (typeSeparator!=-1)
3235 if (
parent() && std::holds_alternative<DocParamSect>(*
parent()))
3237 std::get<DocParamSect>(*
parent()).m_hasTypeSpecifier=
true;
3256 if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
3258 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"unexpected end of comment block while parsing the "
3259 "argument of command {}",saveCmdName);
3260 retval = Token::make_RetVal_EndParBlock();
3263 if (!tok.
is(TokenRetval::TK_WHITESPACE))
3265 if (!tok.
is(TokenRetval::TK_NEWPARA))
3267 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"unexpected token {} in comment block while parsing the "
3268 "argument of command {}",tok.
to_string(),saveCmdName);
3270 retval = Token::make_RetVal_EndParBlock();
3276 retval = par->
parse();
3288 Token retval = Token::make_RetVal_OK();
3309 retval = par->parse();
3331 if (retval.is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
break;
3333 }
while (retval.
is(TokenRetval::RetVal_CloseXml) &&
3338 if (retval.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
3344 retval = Token::make_RetVal_OK();
3356 Token retval = Token::make_RetVal_OK();
3364 if (!
children().empty() && std::holds_alternative<DocParamList>(
children().back()))
3379 retval = pl->parseXml(cmdName);
3383 retval = pl->parse(cmdName);
3385 if (retval.
is(TokenRetval::RetVal_EndParBlock))
3387 retval = Token::make_RetVal_OK();
3406 bool needsSeparator =
FALSE;
3408 (ss=
children().get_last<DocSimpleSect>()) &&
3413 needsSeparator =
TRUE;
3420 Token rv = Token::make_RetVal_OK();
3429 return (!rv.
is(TokenRetval::TK_NEWPARA)) ? rv : Token::make_RetVal_OK();
3434 bool xmlContext=
FALSE,
3440 (ps=
children().get_last<DocParamSect>()) &&
3452 return (!rv.
is(TokenRetval::TK_NEWPARA)) ? rv : Token::make_RetVal_OK();
3463 if (tok.
is(TokenRetval::TK_WORD) &&
parser()->context.token->name==
"{")
3468 for (
auto const &opt : optList)
3470 if (opt ==
"number")
3474 warn(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Multiple options specified with \\{}, discarding '{}'", saveCmdName, opt);
3481 else if (opt ==
"year")
3485 warn(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Multiple options specified with \\{}, discarding '{}'", saveCmdName, opt);
3492 else if (opt ==
"shortauthor")
3496 warn(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Multiple options specified with \\{}, discarding '{}'", saveCmdName, opt);
3503 else if (opt ==
"nopar")
3507 else if (opt ==
"nocite")
3513 warn(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Unknown option specified with \\{}, discarding '{}'", saveCmdName, opt);
3521 if (!tok.
is(TokenRetval::TK_WHITESPACE))
3528 else if (!tok.
is(TokenRetval::TK_WHITESPACE))
3531 cmdChar,saveCmdName);
3541 if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
3543 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"THE ONE unexpected end of comment block while parsing the "
3544 "argument of command '{:c}{}'",cmdChar,saveCmdName);
3547 else if (!tok.
is_any_of(TokenRetval::TK_WORD,TokenRetval::TK_LNKWORD))
3565 if (!tok.
is(TokenRetval::TK_WHITESPACE))
3573 if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
3575 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"no emoji name given or unexpected end of comment block while parsing the "
3576 "argument of command '{:c}{}'",cmdChar,cmdName);
3580 else if (!tok.
is(TokenRetval::TK_WORD))
3595 if (!tok.
is(TokenRetval::TK_WHITESPACE))
3603 if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
3605 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"unexpected end of comment block while parsing the "
3606 "argument of command '{:c}{}'",cmdChar,cmdName);
3609 else if (!tok.
is_any_of(TokenRetval::TK_WORD,TokenRetval::TK_LNKWORD))
3619 switch (opt->
kind())
3639 std::string lstFormat =
theTranslator->trWriteList(
static_cast<int>(lst->size())).str();
3640 static const reg::Ex marker(R
"(@(\d+))");
3645 for ( ; it!=
end ; ++it)
3647 const auto &match = *it;
3648 size_t newIndex = match.position();
3649 size_t matchLen = match.length();
3650 optionValue += lstFormat.substr(index,newIndex-index);
3651 unsigned long entryIndex = std::stoul(match[1].str());
3652 if (entryIndex<(
unsigned long)lst->size())
3654 optionValue += lst->at(entryIndex);
3656 index=newIndex+matchLen;
3658 optionValue+=lstFormat.substr(index);
3663 warn(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Obsolete setting for '{:c}{}': '{}'",
3664 cmdChar,cmdName,
parser()->context.token->name);
3668 "Disabled setting (i.e. not supported in this doxygen executable) for '{:c}{}': '{}'",
3669 cmdChar,cmdName,
parser()->context.token->name);
3682 warn(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Unknown option for '{:c}{}': '{}'",
3683 cmdChar,cmdName,
parser()->context.token->name);
3693 ASSERT(retval.
is(TokenRetval::TK_WHITESPACE));
3696 if (retval.
is(TokenRetval::RetVal_OK))
3716 if (!tok.
is(TokenRetval::TK_WHITESPACE))
3724 if (!tok.
is(TokenRetval::TK_WORD))
3738 bool specDateOnlyWS = !specDateRaw.
isEmpty() && specDate.
isEmpty();
3739 if (!specDate.
isEmpty() && !tok.
is_any_of(TokenRetval::TK_WORD,TokenRetval::TK_NONE,TokenRetval::TK_EOF))
3741 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"invalid <date_time> argument for command '{:c}{}'",
3752 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"invalid <date_time> argument for command '{:c}{}': {}",
3753 cmdChar,cmdName,
err);
3765 if ((usedFormat&bitMask) && !(specFormat&bitMask))
3767 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.",
3785 if (!tok.
is(TokenRetval::TK_WORD))
3798 if (!tok.
is(TokenRetval::TK_WHITESPACE))
3807 if (!tok.
is(TokenRetval::TK_WORD))
3823 if (!tok.
is(TokenRetval::TK_WHITESPACE))
3832 if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
3834 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"unexpected end of comment block while parsing the "
3835 "argument of command {}", saveCmdName);
3838 else if (!tok.
is(TokenRetval::TK_WORD))
3862 (!n1_docIncOp && !n1_docWs) ||
3863 (n1_docWs && n2 && !n2_docIncOp);
3868 n1_docIncOp->markLast(
false);
3870 else if (n1_docWs && n2_docIncOp)
3883 if (!tok.
is(TokenRetval::TK_WHITESPACE))
3892 if (!tok.
is(TokenRetval::TK_WORD))
3919 AUTO_TRACE(
"cmdName={} isJavaLink={}",cmdName,isJavaLink);
3922 if (!tok.
is(TokenRetval::TK_WHITESPACE))
3930 if (!tok.
is(TokenRetval::TK_WORD))
3936 if (saveCmdName ==
"javalink")
3945 if (saveCmdName ==
"javalink")
3951 QCString leftOver = lnk->parse(isJavaLink);
3963 if (!tok.
is(TokenRetval::TK_WHITESPACE))
3966 cmdChar,
qPrint(saveCmdName));
3971 if (!tok.
is(TokenRetval::TK_WORD))
3990 bool isBlock =
false;
3991 bool trimLeft =
false;
3992 bool localScope =
false;
3994 if (tok.
is(TokenRetval::TK_WORD) &&
parser()->context.token->name==
"{")
4000 auto contains = [&optList](
const char *kw)
4002 return std::find(optList.begin(),optList.end(),kw)!=optList.end();
4004 localScope = contains(
"local");
4005 if (contains(
"nostrip"))
4007 stripCodeComments =
false;
4009 else if (contains(
"strip"))
4011 stripCodeComments =
true;
4018 if (contains(
"lineno"))
4025 if (!tok.
is(TokenRetval::TK_WHITESPACE))
4032 else if (tok.
is(TokenRetval::TK_WORD) &&
parser()->context.token->name==
"[")
4040 else if (!tok.
is(TokenRetval::TK_WHITESPACE))
4049 if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
4051 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"unexpected end of comment block while parsing the "
4052 "argument of command {}",saveCmdName);
4055 else if (!tok.
is(TokenRetval::TK_WORD))
4069 if (!tok.
is(TokenRetval::TK_WORD))
4071 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"expected block identifier, but found token {} instead while parsing the {} command",
4086 blockId,isBlock,trimLeft);
4096 if (!tok.
is(TokenRetval::TK_WHITESPACE))
4099 cmdChar,saveCmdName);
4103 if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
4105 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"unexpected end of comment block while parsing the "
4106 "argument of command '{:c}{}'", cmdChar,saveCmdName);
4109 else if (!tok.
is_any_of(TokenRetval::TK_WORD,TokenRetval::TK_LNKWORD))
4126 return retval.is(TokenRetval::RetVal_OK) ? Token::make_TK_NEWPARA() : retval;
4148 if (
parser()->context.xmlComment)
4154 while (i<l && (
parser()->context.token->verb.at(i)==
' ' ||
parser()->context.token->verb.at(i)==
'\n'))
4156 if (
parser()->context.token->verb.at(i)==
'\n') li=i+1;
4166 if (retval.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
4177 if (
parser()->context.memberDef)
4215 Token retval = Token::make_RetVal_OK();
4221 std::string str{cmdChar};
4225 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Found unexpanded alias '{:c}{}'. Check if number of arguments passed is correct.",cmdChar,cmdName);
4374 retval = Token::make_RetVal_Section();
4380 retval = Token::make_RetVal_Subsection();
4386 retval = Token::make_RetVal_Subsubsection();
4392 retval = Token::make_RetVal_Paragraph();
4398 retval = Token::make_RetVal_SubParagraph();
4404 retval = Token::make_RetVal_SubSubParagraph();
4424 if (retval.is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
4436 if (retval.is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
4448 if (retval.is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
4460 if (retval.is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
4472 if (retval.is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
4484 if (retval.is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
4498 int idx = fullMatch.
find(
'{');
4499 int idxEnd = fullMatch.
find(
"}",idx+1);
4505 for (
const auto &opt : optList)
4507 if (opt.empty())
continue;
4510 if (locOpt ==
"code")
4516 warn(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Unknown option '{}' for '\\iliteral'",opt);
4524 if (retval.is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
4532 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"javadoc literal section ended without end marker");
4551 if (retval.is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
4572 dv->setText(
parser()->context.token->verb);
4573 dv->setWidth(width);
4574 dv->setHeight(height);
4575 dv->setLocation(
parser()->context.fileName,
parser()->tokenizer.getLineNr());
4578 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"ignoring \\dot command because HAVE_DOT is not set");
4581 if (retval.is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
4602 dv->setText(
parser()->context.token->verb);
4603 dv->setWidth(width);
4604 dv->setHeight(height);
4605 dv->setLocation(
parser()->context.fileName,
parser()->tokenizer.getLineNr());
4606 if (retval.is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
4620 int idx = fullMatch.
find(
'{');
4621 int idxEnd = fullMatch.
find(
"}",idx+1);
4628 for (
const auto &opt : optList)
4630 if (opt.empty())
continue;
4638 warn(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Multiple definition of engine for '\\startuml'");
4651 warn(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Multiple use of filename for '\\startuml'");
4660 if (engine.
isEmpty()) engine =
"uml";
4666 assert(retval.is(TokenRetval::RetVal_OK));
4687 if (engine ==
"ditaa")
4689 dv->setUseBitmap(
true);
4691 else if (engine ==
"uml")
4693 int i = trimmedVerb.
find(
'\n');
4694 QCString firstLine = i==-1 ? trimmedVerb : trimmedVerb.
left(i);
4697 dv->setText(trimmedVerb);
4698 dv->setWidth(width);
4699 dv->setHeight(height);
4700 dv->setLocation(
parser()->context.fileName,
parser()->tokenizer.getLineNr());
4703 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"ignoring \\startuml command because PLANTUML_JAR_PATH is not set");
4706 if (retval.is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
4714 retval = Token::make_RetVal_EndParBlock();
4773 retval = Token::make_RetVal_Internal();
4776 retval = Token::make_RetVal_EndInternal();
4845 "ignoring \\dotfile command because HAVE_DOT is not set");
4933 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Unexpected command '{}' in paragraph context",cmdName);
4936 INTERNAL_ASSERT(retval.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF,TokenRetval::RetVal_OK,TokenRetval::RetVal_SimpleSec
4937 TokenRetval::TK_LISTITEM,TokenRetval::TK_ENDLIST,TokenRetval::TK_NEWPARA
4938 TokenRetval::RetVal_Section,TokenRetval::RetVal_EndList
4939 TokenRetval::RetVal_Internal,TokenRetval::RetVal_SwitchLang
4940 TokenRetval::RetVal_EndInternal)
4947 const char *attrName,
4951 for (
const auto &opt : tagHtmlAttribs)
4953 if (opt.name==attrName)
4955 *result = opt.value;
4964 AUTO_TRACE(
"tagName={} #tagHtmlAttrs={}",tagName,tagHtmlAttribs.size());
4965 Token retval = Token::make_RetVal_OK();
4971 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"HTML tag ('<{}/>') may not use the 'empty tag' XHTML syntax.",
4977 if (!
parser()->context.token->emptyTag)
4985 if (!
parser()->context.token->emptyTag)
4993 if (
parser()->context.token->emptyTag)
break;
5000 retval = Token::make_RetVal_ListItem();
5022 if (
parser()->context.token->emptyTag)
break;
5023 if (
parser()->context.xmlComment)
5068 if (
parser()->context.token->emptyTag)
break;
5074 retval = Token::make_TK_NEWPARA();
5077 if (!
parser()->context.token->emptyTag)
5086 retval = Token::make_RetVal_DescTitle();
5096 retval = Token::make_RetVal_DescData();
5104 if (!
parser()->context.token->emptyTag)
5112 retval = Token::make_RetVal_TableRow();
5115 retval = Token::make_RetVal_TableCell();
5118 retval = Token::make_RetVal_TableHCell();
5165 if (!
parser()->context.token->emptyTag)
5172 if (!
parser()->context.token->emptyTag)
5182 if (!
parser()->context.token->emptyTag)
5185 while (n && !std::holds_alternative<DocHtmlDetails>(*n)) n=
::parent(n);
5195 retval = Token::make_TK_NEWPARA();
5209 retval = Token::make_TK_NEWPARA();
5215 retval = Token::make_RetVal_TableCell();
5285 retval = Token::make_RetVal_TableRow();
5289 retval = Token::make_RetVal_ListItem();
5304 retval = Token::make_RetVal_TableCell();
5318 if (
parser()->context.token->emptyTag)
5335 if (!leftOver.isEmpty())
5353 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Missing 'cref' or 'langword' attribute from <see> tag.");
5381 std::get<DocSimpleSect>(*vss).appendLinkWord(cref);
5382 retval = Token::make_RetVal_OK();
5439 Token retval = Token::make_RetVal_OK();
5449 retval = Token::make_RetVal_EndList();
5459 retval = Token::make_RetVal_EndList();
5475 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"found </details> tag without matching <details>");
5479 retval = Token::make_RetVal_EndHtmlDetails();
5485 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"found </blockquote> tag without matching <blockquote>");
5489 retval = Token::make_RetVal_EndBlockQuote();
5549 retval = Token::make_TK_NEWPARA();
5552 retval = Token::make_RetVal_EndDesc();
5561 retval = Token::make_RetVal_EndTable();
5564 retval = Token::make_RetVal_EndTableRow();
5567 retval = Token::make_RetVal_EndTableCell();
5570 retval = Token::make_RetVal_EndTableCell();
5614 retval = Token::make_TK_NEWPARA();
5628 retval = Token::make_RetVal_CloseXml();
5664 if (!std::get_if<DocAutoListItem>(n))
5672 const auto docAutoList = std::get_if<DocAutoList>(n);
5675 indent = docAutoList->indent();
5684 const auto docPara = std::get_if<DocPara>(n);
5690 return std::get<DocStyleChange>(*stack.top());
5700 indentStr.
fill(
' ',indent);
5715 Token retval = Token::make_TK_NONE();
5716 while (!tok.
is_any_of(TokenRetval::TK_NONE, TokenRetval::TK_EOF))
5720 if (tok.
is_any_of(TokenRetval::TK_WORD,TokenRetval::TK_LNKWORD,TokenRetval::TK_SYMBOL,TokenRetval::TK_URL,
5721 TokenRetval::TK_COMMAND_AT,TokenRetval::TK_COMMAND_BS,TokenRetval::TK_HTMLTAG)
5728 case TokenRetval::TK_WORD:
5731 case TokenRetval::TK_LNKWORD:
5734 case TokenRetval::TK_URL:
5737 case TokenRetval::TK_WHITESPACE:
5755 case TokenRetval::TK_LISTITEM:
5759 while (n && !std::holds_alternative<DocAutoList>(*n)) n=
::parent(n);
5760 const DocAutoList *al = std::get_if<DocAutoList>(n);
5767 retval = Token::make_TK_LISTITEM();
5777 al = std::get_if<DocAutoList>(n);
5791 }
while (retval.
is(TokenRetval::TK_LISTITEM) &&
5796 if (retval.
is(TokenRetval::RetVal_SimpleSec))
5802 if (
parser()->context.token->name.startsWith(
"rcs:"))
5806 tok = Token::make_TK_RCSTAG();
5810 tok = Token::make_TK_COMMAND_BS();
5815 else if (retval.
is(TokenRetval::TK_ENDLIST))
5831 case TokenRetval::TK_ENDLIST:
5832 AUTO_TRACE_ADD(
"Found end of list inside of paragraph at line {}",
parser()->tokenizer.getLineNr());
5833 if (std::get_if<DocAutoListItem>(
parent()))
5836 if (al && al->
indent()>=
parser()->context.token->indent)
5839 retval = Token::make_TK_ENDLIST();
5845 "has invalid indent level");
5854 case TokenRetval::TK_COMMAND_AT:
5856 case TokenRetval::TK_COMMAND_BS:
5861 while (n && !std::holds_alternative<DocSimpleSect>(*n) &&
5862 !std::holds_alternative<DocParamSect>(*n))
5873 retval = Token::make_RetVal_SimpleSec();
5879 while (n && !std::holds_alternative<DocSimpleListItem>(*n)) n=
::parent(n);
5884 retval = Token::make_RetVal_ListItem();
5894 if (retval.
is(TokenRetval::RetVal_SimpleSec))
5900 if (
parser()->context.token->name.startsWith(
"rcs:"))
5904 tok = Token::make_TK_RCSTAG();
5908 tok = Token::make_TK_COMMAND_BS();
5913 else if (retval.
value()>TokenRetval::TK_NONE && retval.
value()<TokenRetval::RetVal_OK)
5919 else if (retval.
value()!=TokenRetval::RetVal_OK)
5926 case TokenRetval::TK_HTMLTAG:
5928 if (!
parser()->context.token->endTag)
5940 if (!retval.
is(TokenRetval::RetVal_OK))
5946 case TokenRetval::TK_SYMBOL:
5957 parser()->context.token->name);
5961 case TokenRetval::TK_NEWPARA:
5962 retval = Token::make_TK_NEWPARA();
5964 case TokenRetval::TK_RCSTAG:
5967 while (n && !std::holds_alternative<DocSimpleSect>(*n) &&
5968 !std::holds_alternative<DocParamSect>(*n))
5978 retval = Token::make_RetVal_SimpleSec();
5989 "Found unexpected token (id={})",tok.
to_string());
5994 retval=Token::make_TK_NONE();
5997 DocPara *par = std::get_if<DocPara>(
parser()->context.nodeStack.top());
5998 if (!
parser()->context.token->endTag && par &&
5999 retval.
is(TokenRetval::TK_NEWPARA) &&
parser()->context.token->name.lower() ==
"p")
6003 INTERNAL_ASSERT(retval.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF,TokenRetval::TK_NEWPARA,TokenRetval::TK_LISTITEM,
6004 TokenRetval::TK_ENDLIST,TokenRetval::RetVal_OK)
6016 Token retval = Token::make_RetVal_OK();
6019 if (!
m_id.isEmpty())
6041 if (isFirst) { par->markFirst(); isFirst=
FALSE; }
6042 retval=par->parse();
6043 if (!par->isEmpty())
6052 if (retval.
is(TokenRetval::TK_LISTITEM))
6056 if (retval.
is(TokenRetval::RetVal_Internal))
6060 if (retval.is(TokenRetval::RetVal_EndInternal))
6062 retval = Token::make_RetVal_OK();
6065 }
while (!retval.
is_any_of(TokenRetval::TK_NONE, TokenRetval::TK_EOF, TokenRetval::RetVal_Section, TokenRetval::RetVal_Subsection,
6066 TokenRetval::RetVal_Subsubsection, TokenRetval::RetVal_Paragraph, TokenRetval::RetVal_SubParagraph,
6067 TokenRetval::RetVal_SubSubParagraph, TokenRetval::RetVal_EndInternal)
6074 if (retval.
is(TokenRetval::RetVal_Subsection) &&
m_level<=1)
6077 while (retval.
is(TokenRetval::RetVal_Subsection))
6086 else if (retval.
is(TokenRetval::RetVal_Subsubsection) &&
m_level<=2)
6092 parser()->tokenizer.getLineNr(),
6093 "Unexpected subsubsection command found inside {}!",
6097 while (retval.
is(TokenRetval::RetVal_Subsubsection))
6104 if (!(
m_level < 2 && retval.
is(TokenRetval::RetVal_Subsection)))
break;
6106 else if (retval.
is(TokenRetval::RetVal_Paragraph) &&
m_level<=3)
6112 "Unexpected paragraph command found inside {}!",
6116 while (retval.
is(TokenRetval::RetVal_Paragraph))
6123 if (!(
m_level<3 && (retval.
is_any_of(TokenRetval::RetVal_Subsection,TokenRetval::RetVal_Subsubsection))))
break;
6125 else if (retval.
is(TokenRetval::RetVal_SubParagraph) &&
m_level<=4)
6131 "Unexpected subparagraph command found inside {}!",
6135 while (retval.
is(TokenRetval::RetVal_SubParagraph))
6142 if (!(
m_level<4 && (retval.
is_any_of(TokenRetval::RetVal_Subsection,TokenRetval::RetVal_Subsubsection,TokenRetval::RetVal_Paragraph))))
break;
6144 else if (retval.
is(TokenRetval::RetVal_SubSubParagraph) &&
m_level<=5)
6150 "Unexpected subsubparagraph command found inside {}!",
6154 while (retval.
is(TokenRetval::RetVal_SubSubParagraph))
6161 if (!(
m_level<5 && (retval.
is_any_of( TokenRetval::RetVal_Subsection, TokenRetval::RetVal_Subsubsection,
6162 TokenRetval::RetVal_Paragraph, TokenRetval::RetVal_SubParagraph))))
break;
6171 TokenRetval::RetVal_Section, TokenRetval::RetVal_Subsection,
6172 TokenRetval::RetVal_Subsubsection, TokenRetval::RetVal_Paragraph,
6173 TokenRetval::RetVal_SubParagraph, TokenRetval::RetVal_SubSubParagraph,
6174 TokenRetval::RetVal_Internal, TokenRetval::RetVal_EndInternal)
6190 while (!tok.
is_any_of(TokenRetval::TK_NONE, TokenRetval::TK_EOF))
6194 case TokenRetval::TK_WORD:
6197 case TokenRetval::TK_WHITESPACE:
6200 case TokenRetval::TK_SYMBOL:
6210 parser()->context.token->name);
6214 case TokenRetval::TK_COMMAND_AT:
6216 case TokenRetval::TK_COMMAND_BS:
6278 parser()->context.token->name);
6302 Token retval = Token::make_TK_NONE();
6312 if (isFirst) { par->markFirst(); isFirst=
FALSE; }
6313 retval=par->parse();
6314 if (par->isEmpty() && par->attribs().empty())
6323 auto checkParagraph = [
this,&retval](
Token t,
int level,
const char *sectionType,
const char *parentSectionType) {
6329 parser()->tokenizer.getLineNr(),
6330 "found {} command (id: '{}') outside of {} context!",
6331 sectionType,
parser()->context.token->sectionId,parentSectionType);
6335 if (!
parser()->context.token->sectionId.isEmpty())
6348 sectionType,
parser()->context.token->sectionId,sectionType);
6349 retval = Token::make_TK_NONE();
6354 warn_doc_error(
parser()->context.fileName,
parser()->tokenizer.getLineNr(),
"Missing id for {}; ignoring {}",sectionType,sectionType);
6355 retval = Token::make_TK_NONE();
6360 checkParagraph(Token::make_RetVal_SubSubParagraph(), 6,
"subsubparagraph",
"subparagraph" );
6361 checkParagraph(Token::make_RetVal_SubParagraph(), 5,
"subparagraph",
"paragraph" );
6362 checkParagraph(Token::make_RetVal_Paragraph(), 4,
"paragraph",
"subsubsection" );
6363 checkParagraph(Token::make_RetVal_Subsubsection(), 3,
"subsubsection",
"subsection" );
6364 checkParagraph(Token::make_RetVal_Subsection(), 2,
"subsection",
"section" );
6366 if (retval.
is(TokenRetval::TK_LISTITEM))
6370 if (retval.
is(TokenRetval::RetVal_Internal))
6375 }
while (!retval.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF,TokenRetval::RetVal_Section));
6380 while (retval.
is(TokenRetval::RetVal_Section))
6382 if (!
parser()->context.token->sectionId.isEmpty())
6395 retval = Token::make_TK_NONE();
6401 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
static CiteInfoOption makeYear()
static CiteInfoOption makeNumber()
static 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
void fill(char c, int len=-1)
Fills a string with a predefined character.
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
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.