43#if !ENABLE_DOCPARSER_TRACING
47#define AUTO_TRACE(...) (void)0
48#define AUTO_TRACE_ADD(...) (void)0
49#define AUTO_TRACE_EXIT(...) (void)0
57 return std::make_unique<DocParser>();
105 "image file name '{}' is ambiguous.\n"
115 if (i!=-1 || (i=result.
findRev(
'\\'))!=-1)
117 result = result.
right(
static_cast<int>(result.
length())-i-1);
144 QCString outputFile = outputDir+
"/"+result;
150 "destination of image {} is a symlink, replacing with image",
153 if (outputFile!=inputFile)
164 "could not open image {}",fileName);
174 epstopdfArgs.
sprintf(
"\"%s/%s.eps\" --outfile=\"%s/%s.pdf\"",
179 err(
"Problems running epstopdf. Check your TeX installation!\n");
194 "image file {} is not found in IMAGE_PATH: "
195 "assuming external image.",fileName
211 if (
context.memberDef==
nullptr)
return;
212 std::string name =
context.token->name.str();
214 context.memberDef->argumentList() :
215 context.memberDef->declArgumentList();
218 if (al.
empty())
return;
220 static const reg::Ex re(R
"(\$?\w+\.*)");
223 for (; it!=
end ; ++it)
225 const auto &match = *it;
227 if (lang==SrcLangExt::Fortran) aName=aName.
lower();
233 if (lang==SrcLangExt::Fortran) argName=argName.
lower();
248 if (!scope.
isEmpty()) scope+=
"::";
else scope=
"";
251 int docLine =
context.memberDef->docLine();
255 inheritedFrom.
sprintf(
" inherited from member %s at line "
258 docFile =
context.memberDef->getDefFileName();
259 docLine =
context.memberDef->getDefLine();
263 "argument '{}' of command @param "
264 "is not found in the argument list of {}{}{}{}",
265 aName, scope,
context.memberDef->name(),
266 alStr, inheritedFrom);
278 if (
context.retvalsFound.count(name.
str())==1)
281 context.memberDef->getDefLine(),
282 "return value '{}' of {} has multiple documentation sections",
283 name,
context.memberDef->qualifiedName());
299 context.memberDef->argumentList() :
300 context.memberDef->declArgumentList();
308 if (lang==SrcLangExt::Fortran) argName = argName.
lower();
312 if (lang==SrcLangExt::Python && (argName==
"self" || argName==
"cls"))
316 else if (lang==SrcLangExt::Cpp && (a.type==
"this" || a.type.startsWith(
"this ")))
322 size_t count =
context.paramsFound.count(argName.
str());
323 if (count==0 && a.docs.isEmpty())
331 "argument {} from the argument list of {} has multiple @param documentation sections",
332 aName,
context.memberDef->qualifiedName());
339 QCString errMsg =
"The following parameter";
340 if (undocParams.
size()>1) errMsg+=
"s";
344 (undocParams.
size()>1 ?
" are" :
" is") +
" not documented:\n";
345 for (
const Argument &a : undocParams)
348 if (lang==SrcLangExt::Fortran) argName = argName.
lower();
350 if (!first) errMsg+=
"\n";
352 errMsg+=
" parameter '"+argName+
"'";
363 "{} has @param documentation sections but no arguments",
364 context.memberDef->qualifiedName());
439 size_t rightBracePos = cmdArg.
find(
"}",
static_cast<int>(
qstrlen(
"anonymous_namespace{")));
443 cmdArg = leftPart + rightPart;
450 int l=
static_cast<int>(cmdArg.
length());
452 int funcStart=cmdArg.
find(
'(');
461 int secondParen = cmdArg.
find(
'(', funcStart+1);
462 int leftParen = cmdArg.
find(
')', funcStart+1);
463 if (leftParen!=-1 && secondParen!=-1)
465 if (leftParen<secondParen)
467 funcStart=secondParen;
491 int scopeOffset=
static_cast<int>(
context.context.length());
526 scopeOffset =
context.context.findRev(
"::",scopeOffset-1);
527 if (scopeOffset==-1) scopeOffset=0;
529 }
while (scopeOffset>=0);
541 case TokenRetval::TK_COMMAND_AT:
543 case TokenRetval::TK_COMMAND_BS:
551 case TokenRetval::TK_SYMBOL:
555 case TokenRetval::TK_HTMLTAG:
574 if (!tok.
is(TokenRetval::TK_WHITESPACE))
581 while (!tok.
is_any_of(TokenRetval::TK_NONE, TokenRetval::TK_EOF, TokenRetval::TK_WHITESPACE,
582 TokenRetval::TK_NEWPARA, TokenRetval::TK_LISTITEM, TokenRetval::TK_ENDLIST)
585 static const reg::Ex specialChar(R
"([.,|()\[\]:;?])");
586 if (tok.
is(TokenRetval::TK_WORD) &&
context.token->name.length()==1 &&
596 case TokenRetval::TK_HTMLTAG:
616 return (tok.
is_any_of(TokenRetval::TK_NEWPARA,TokenRetval::TK_LISTITEM,TokenRetval::TK_ENDLIST)) ? tok : Token::make_RetVal_OK();
642 return std::get<DocStyleChange>(*stack.top());
645 if (
context.styleStack.empty() ||
646 topStyleChange(
context.styleStack).style()!=s ||
647 topStyleChange(
context.styleStack).tagName()!=tagNameLower ||
648 topStyleChange(
context.styleStack).position()!=
context.nodeStack.size()
651 if (
context.styleStack.empty())
655 else if (topStyleChange(
context.styleStack).tagName()!=tagNameLower ||
656 topStyleChange(
context.styleStack).style()!=s)
659 tagName,topStyleChange(
context.styleStack).tagName());
664 tagName,
context.nodeStack.size(),topStyleChange(
context.styleStack).position());
683 if (!
context.styleStack.empty())
692 sc = !
context.styleStack.empty() ? &std::get<DocStyleChange>(*
context.styleStack.top()) :
nullptr;
700 while (!
context.initialStyleStack.empty())
704 context.initialStyleStack.pop();
713 Token retval = Token::make_RetVal_OK();
714 for (
const auto &opt : tagHtmlAttribs)
716 if (opt.name==
"name" || opt.name==
"id")
718 if (!opt.value.isEmpty())
728 else if (opt.name==
"href")
733 attrList.erase(attrList.begin()+index);
735 if (opt.value.at(0) !=
'#') relPath =
context.relPath;
756 if (!
context.initialStyleStack.empty())
758 QCString tagName = std::get<DocStyleChange>(*
context.initialStyleStack.top()).tagName();
759 QCString fileName = std::get<DocStyleChange>(*
context.initialStyleStack.top()).fileName();
760 int lineNr = std::get<DocStyleChange>(*
context.initialStyleStack.top()).lineNr();
761 context.initialStyleStack.pop();
766 "end of comment block while expecting "
767 "command </{}> (Probable start '{}' at line {})",tagName, fileName, lineNr);
772 "end of comment block while expecting command </{}>",tagName);
780 auto ignoreWord = [](
const QCString &w) ->
bool {
782 return std::find_if(list.begin(), list.end(),
783 [&w](
const auto &ignore) { return w.startsWith(ignore); }
788 if ((!
context.autolinkSupport && !ignoreAutoLinkFlag) || ignoreWord(
context.token->name))
798 size_t len =
context.token->name.length();
806 || (!
context.context.isEmpty() &&
847 (
toFileDef(compound))->generateSourceFile()
860 AUTO_TRACE_ADD(
"resolved reference as unlinkable compound={} (linkable={}) member={} (linkable={})",
861 compound ? compound->
name() :
"<none>", compound ? (
int)compound->
isLinkable() : -1,
862 member ? member->
name() :
"<none>", member ? (
int)member->
isLinkable() : -1);
866 else if (!
context.insideHtmlLink && len>1 &&
context.token->name.at(len-1)==
':')
888 if (
context.token->name.startsWith(
"#"))
902 while ((i=paramTypes.
find(
'|',p))!=-1)
904 name1 = paramTypes.
mid(p,i-p);
906 context.token->name=ii!=-1 ? name1.
mid(0,ii) : name1;
912 name1 = paramTypes.
mid(p);
914 context.token->name=ii!=-1 ? name1.
mid(0,ii) : name1;
925 if (!tok.
is(TokenRetval::TK_WHITESPACE))
932 if (!tok.
is_any_of(TokenRetval::TK_WORD,TokenRetval::TK_LNKWORD))
946 if (!tok.
is(TokenRetval::TK_WHITESPACE))
954 if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
957 "argument of command {}",
context.token->name);
960 else if (!tok.
is_any_of(TokenRetval::TK_WORD,TokenRetval::TK_LNKWORD))
974 if (!tok.
is(TokenRetval::TK_WHITESPACE))
981 if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
984 "argument of command {}",
context.token->name);
987 else if (!tok.
is(TokenRetval::TK_WORD))
1014 while (!tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
1016 if (tok.
is(TokenRetval::TK_WORD) && (
context.token->name==
"width=" ||
context.token->name==
"height="))
1021 else if (tok.
is(TokenRetval::TK_HTMLTAG))
1033 if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
1037 while (tok.
is_any_of(TokenRetval::TK_WHITESPACE,TokenRetval::TK_WORD,TokenRetval::TK_HTMLTAG))
1039 if (tok.
is(TokenRetval::TK_WORD))
1041 if (
context.token->name==
"width=" ||
context.token->name==
"height=")
1047 if (
context.token->name==
"width")
1051 else if (
context.token->name==
"height")
1053 height =
context.token->chars;
1067 if (tok.
is_any_of(TokenRetval::TK_COMMAND_AT,TokenRetval::TK_COMMAND_BS))
1070 tokenizer.unputString(tok.
is(TokenRetval::TK_COMMAND_AT) ?
"@" :
"\\");
1073 else if (tok.
is(TokenRetval::TK_SYMBOL))
1078 else if (tok.
is(TokenRetval::TK_HTMLTAG))
1093 bool inlineImage =
false;
1097 if (!tok.
is(TokenRetval::TK_WHITESPACE))
1099 if (tok.
is(TokenRetval::TK_WORD))
1101 if (
context.token->name ==
"{")
1107 for (
const auto &opt : optList)
1109 if (opt.empty())
continue;
1113 locOptLow = locOpt.
lower();
1114 if (locOptLow ==
"inline")
1123 "multiple use of option 'anchor' for 'image' command, ignoring: '{}'",
1128 anchorStr = locOpt.
mid(7);
1134 "unknown option '{}' for 'image' command specified",
1139 if (!tok.
is(TokenRetval::TK_WHITESPACE))
1153 if (!tok.
is_any_of(TokenRetval::TK_WORD,TokenRetval::TK_LNKWORD))
1160 if (!tok.
is(TokenRetval::TK_WHITESPACE))
1175 "\\image command is not valid", imgType);
1181 if (!tok.
is(TokenRetval::TK_WORD))
1211 if (tok.
is_any_of(TokenRetval::TK_WORD,TokenRetval::TK_LNKWORD,TokenRetval::TK_SYMBOL,TokenRetval::TK_URL,
1212 TokenRetval::TK_COMMAND_AT,TokenRetval::TK_COMMAND_BS,TokenRetval::TK_HTMLTAG)
1219 switch (tok.
value())
1221 case TokenRetval::TK_COMMAND_AT:
1223 case TokenRetval::TK_COMMAND_BS:
1289 if (tok.
is(TokenRetval::TK_NEWPARA))
goto handlepara;
1290 else if (tok.
is_any_of(TokenRetval::TK_WORD,TokenRetval::TK_HTMLTAG))
1303 if (tok.
is(TokenRetval::TK_NEWPARA))
goto handlepara;
1304 else if (tok.
is_any_of(TokenRetval::TK_WORD,TokenRetval::TK_HTMLTAG))
1317 if (tok.
is(TokenRetval::TK_NEWPARA))
goto handlepara;
1318 else if (tok.
is_any_of(TokenRetval::TK_WORD,TokenRetval::TK_HTMLTAG))
1330 if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
1342 if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
1354 if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
1366 if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
1378 if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
1390 if (tok.
is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
1447 case TokenRetval::TK_HTMLTAG:
1528 case TokenRetval::TK_SYMBOL:
1541 case TokenRetval::TK_WHITESPACE:
1542 case TokenRetval::TK_NEWPARA:
1549 case TokenRetval::TK_LNKWORD:
1557 case TokenRetval::TK_WORD:
1565 case TokenRetval::TK_URL:
1588 for (
const auto &opt : tagHtmlAttribs)
1591 if (opt.name==
"src" && !opt.value.isEmpty())
1596 attrList.erase(attrList.begin()+index);
1618 Token retval = Token::make_RetVal_OK();
1620 if (doc.
isEmpty())
return retval;
1626 DocPara *lastPar=!children.
empty() ? std::get_if<DocPara>(&children.
back()):
nullptr;
1635 if (isFirst) { par->markFirst(); isFirst=
FALSE; }
1636 retval=par->parse();
1637 if (!par->isEmpty())
1646 }
while (retval.
is(TokenRetval::TK_NEWPARA));
1672 "Check your EXAMPLE_PATH",file);
1682 bool insideDQuote=
FALSE;
1683 bool insideSQuote=
FALSE;
1685 while (j<len && !found)
1687 if (!insideSQuote && !insideDQuote)
1691 case '(': round++;
break;
1692 case ')': round--;
break;
1693 case '"': insideDQuote=
TRUE;
break;
1694 case '\'': insideSQuote=
TRUE;
break;
1702 found=(round==0) && (j<8 || !
literal_at(data+j-8,
"operator"));
1706 else if (insideSQuote)
1708 if (data[j]==
'\'' && (j==0 || data[j]!=
'\\'))
1713 else if (insideDQuote)
1715 if (data[j]==
'"' && (j==0 || data[j]!=
'\\'))
1735 while (k<len && data[k]==
' ') k++;
1736 if (k<len-1 && data[k]==
'&' && data[k+1]==
'&') j=k+2;
1737 else if (k<len && data[k]==
'&' ) j=k+1;
1741 if (j>0 && data[j-1]==
'.') { e--; }
1751#define CHECK_FOR_COMMAND(str,action) \
1752 do if ((i+sizeof(str)<len) && literal_at(data+i+1,str)) \
1753 { j=i+sizeof(str); action; } while(0)
1758 if (i==0 || (data[i-1]!=
'@' && data[i-1]!=
'\\'))
1769 if (i==0 || (data[i-1]!=
'@' && data[i-1]!=
'\\'))
1794 if ((data[i]==
'@' || data[i]==
'\\') &&
1795 (i==0 || (data[i-1]!=
'@' && data[i-1]!=
'\\')))
1799 return i+endMarker.
length()+1;
1805 return i<len ? i+1 : len;
1818 if (c==
'@' || c==
'\\')
1825 while (j<len && (data[j]==
' ' || data[j]==
'\t')) j++;
1835 "@copy{} or @copydoc target '{}' found but is from a tag file, skipped",
1836 isBrief?
"brief":
"details",
id);
1841 auto it = std::find(
context.copyStack.begin(),
context.copyStack.end(),def);
1842 if (it==
context.copyStack.end())
1845 context.copyStack.push_back(def);
1848 buf.
addStr(
" \\ifile \""+file_+
"\" ");
1850 size_t len_ = doc_.length();
1876 "Found recursive @copy{} or @copydoc relation for argument '{}'.",
1877 isBrief?
"brief":
"details",
id);
1883 "@copy{} or @copydoc target '{}' not found", isBrief?
"brief":
"details",
id);
1896 buf.
addStr(data+orgPos,i-orgPos);
1910 lineNr += (c==
'\n') ? 1 : 0;
1923 const QCString &fileName,
int startLine,
1925 const QCString &input,
bool indexWords,
1926 bool isExample,
const QCString &exampleName,
1927 bool singleLine,
bool linkFromIndex,
1928 bool markdownSupport,
1929 bool autolinkSupport)
1932 assert(parser!=
nullptr);
1933 if (parser==
nullptr)
return nullptr;
2018 size_t ioLen = input.
length();
2029 auto ast = std::make_unique<DocNodeAST>(
DocRoot(parser,md!=
nullptr,singleLine));
2030 std::get<DocRoot>(ast->root).parse();
2056 assert(parser!=
nullptr);
2057 if (parser==
nullptr)
return nullptr;
2088 auto ast = std::make_unique<DocNodeAST>(
DocTitle(parser,
nullptr));
2093 std::get<DocTitle>(ast->root).parseFromString(
nullptr,input);
2108 assert(parser!=
nullptr);
2109 if (parser==
nullptr)
return nullptr;
2142 auto ast = std::make_unique<DocNodeAST>(
DocText(parser));
2151 std::get<DocText>(ast->root).parse();
2166 assert(parser!=
nullptr);
2167 if (parser==
nullptr)
return nullptr;
2173 return std::make_unique<DocNodeAST>(
DocRef(parser,
nullptr,target,context));
This class represents an function or template argument list.
void push_back(const Argument &a)
A abstract class representing of a compound symbol.
static bool isFlagSet(const DebugMask mask)
The common base class of all entity definitions found in the sources.
virtual QCString docFile() const =0
virtual SrcLangExt getLanguage() const =0
Returns the programming language this definition was written in.
virtual int docLine() const =0
virtual bool isLinkable() const =0
virtual DefType definitionType() const =0
virtual QCString anchor() const =0
virtual QCString briefDescriptionAsTooltip() const =0
virtual int briefLine() 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 qualifiedName() const =0
virtual QCString briefFile() const =0
virtual QCString getOutputFileBase() const =0
virtual bool isReference() const =0
virtual const QCString & name() const =0
Class representing a directory in the file system.
bool remove(const std::string &path, bool acceptsAbsPath=true) const
Node representing an anchor.
Node representing a Hypertext reference.
Node representing an image.
Node representing an internal reference to some item.
Node representing a word that can be linked to something.
Node representing a paragraph in the documentation tree.
void markLast(bool v=TRUE)
bool defaultHandleToken(DocNodeVariant *parent, Token tok, DocNodeList &children, bool handleWord=TRUE)
std::stack< DocParserContext > contextStack
void handleLinkedWord(DocNodeVariant *parent, DocNodeList &children, bool ignoreAutoLinkFlag=FALSE)
void handleInternalRef(DocNodeVariant *parent, DocNodeList &children)
void handleParameterType(DocNodeVariant *parent, DocNodeList &children, const QCString ¶mTypes)
QCString findAndCopyImage(const QCString &fileName, DocImage::Type type, bool doWarn=true)
QCString processCopyDoc(const char *data, size_t &len)
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 checkUnOrMultipleDocumentedParams()
bool findDocsForMemberOrCompound(const QCString &commandName, QCString *pDoc, QCString *pBrief, const Definition **pDef)
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)
Node representing a reference to some item.
Root node of documentation tree.
Node representing a separator.
Node representing a style change.
const HtmlAttribList & attribs() const
Node representing a special symbol.
static HtmlEntityMapper::SymType decodeSymbol(const QCString &symName)
Root node of a text fragment.
Node representing a simple section title.
void init(const char *input, const QCString &fileName, bool markdownSupport, bool insideHtmlLink)
void setLineNr(int lineno)
void findSections(const QCString &input, const Definition *d, const QCString &fileName)
Node representing a URL (or email address)
Node representing a verbatim, unparsed text fragment.
Node representing some amount of white space.
Node representing a word.
static NamespaceLinkedMap * namespaceLinkedMap
static FileNameLinkedMap * inputNameLinkedMap
static ClassLinkedMap * classLinkedMap
static NamespaceDefMutable * globalScope
static FileNameLinkedMap * imageNameLinkedMap
static IndexList * indexList
static PageLinkedMap * pageLinkedMap
static FileNameLinkedMap * exampleNameLinkedMap
static SearchIndexIntf searchIndex
static GroupLinkedMap * groupLinkedMap
A model of a file symbol.
virtual QCString absFilePath() const =0
Minimal replacement for QFileInfo.
A model of a group of symbols.
virtual QCString groupTitle() const =0
Class representing a string buffer optimized for growing.
void addStr(const QCString &s)
T & back()
access the last element
void pop_back()
removes the last element
bool empty() const
checks whether the container is empty
Class representing a list of HTML attributes.
A model of a class/file/namespace member symbol.
virtual bool isObjCMethod() const =0
virtual const ClassDef * getClassDef() const =0
virtual const ArgumentList & argumentList() const =0
virtual bool isFunction() const =0
virtual QCString objCMethodName(bool localLink, bool showStatic) const =0
virtual const MemberDef * templateMaster() const =0
virtual void detectUndocumentedParams(bool hasParamCommand, bool hasReturnCommand) const =0
An abstract interface of a namespace symbol.
A model of a page symbol.
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
const std::string & str() const
QCString right(size_t len) const
size_t size() const
Returns the length of the string, not counting the 0-terminator.
QCString & sprintf(const char *format,...)
int findRev(char c, int index=-1, bool cs=TRUE) const
const char * data() const
Returns a pointer to the contents of the string in the form of a 0-terminated C string.
QCString left(size_t len) const
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
ClassDef * getClass(const QCString &n)
Class representing a regular expression.
Class to iterate through matches.
#define Config_getList(name)
#define Config_getBool(name)
#define Config_getString(name)
std::vector< std::string > StringVector
DirIterator end(const DirIterator &) noexcept
#define AUTO_TRACE_ADD(...)
#define AUTO_TRACE_EXIT(...)
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 DocNodeVariant * parent(DocNodeVariant *n)
returns the parent node of a given node n or nullptr if the node has no parent.
void docFindSections(const QCString &input, const Definition *d, const QCString &fileName)
static QCString extractCopyDocId(const char *data, size_t &j, size_t len)
static size_t skipToEndMarker(const char *data, size_t i, size_t len, const QCString &endMarker)
IDocNodeASTPtr validatingParseText(IDocParser &parserIntf, const QCString &input)
IDocNodeASTPtr validatingParseDoc(IDocParser &parserIntf, const QCString &fileName, int startLine, const Definition *ctx, const MemberDef *md, const QCString &input, bool indexWords, bool isExample, const QCString &exampleName, bool singleLine, bool linkFromIndex, bool markdownSupport, bool autolinkSupport)
IDocParserPtr createDocParser()
factory function to create a parser
IDocNodeASTPtr createRef(IDocParser &parserIntf, const QCString &target, const QCString &context, const QCString &srcFile, int srcLine)
static size_t isVerbatimSection(const char *data, size_t i, size_t len, QCString &endMarker)
IDocNodeASTPtr validatingParseTitle(IDocParser &parserIntf, const QCString &fileName, int lineNr, const QCString &input)
static size_t isCopyBriefOrDetailsCmd(const char *data, size_t i, size_t len, bool &brief)
#define CHECK_FOR_COMMAND(str, action)
std::unique_ptr< IDocNodeAST > IDocNodeASTPtr
std::unique_ptr< IDocParser > IDocParserPtr
pointer to parser interface
Private header shared between docparser.cpp and docnode.cpp.
IterableStack< const DocNodeVariant * > DocStyleChangeStack
bool insidePRE(const DocNodeVariant *n)
bool insideLI(const DocNodeVariant *n)
FileDef * toFileDef(Definition *d)
GroupDef * toGroupDef(Definition *d)
MemberDef * toMemberDef(Definition *d)
#define warn_incomplete_doc(file, line, fmt,...)
#define warn_doc_error(file, line, fmt,...)
const Mapper< HtmlTagType > * htmlTagMapper
const Mapper< CommandType > * cmdMapper
int system(const QCString &command, const QCString &args, bool commandHasConsole=true)
QCString trunc(const QCString &s, size_t numChars=15)
bool match(std::string_view str, Match &match, const Ex &re)
Matches a given string str for a match against regular expression re.
PageDef * toPageDef(Definition *d)
Portable versions of functions that are platform dependent.
QCString substitute(const QCString &s, const QCString &src, const QCString &dst)
substitute all occurrences of src in s by dst
int qstrncmp(const char *str1, const char *str2, size_t len)
const char * qPrint(const char *s)
uint32_t qstrlen(const char *str)
Returns the length of string str, or 0 if a null pointer is passed.
Some helper functions for std::string.
bool literal_at(const char *data, const char(&str)[N])
returns TRUE iff data points to a substring that matches string literal str
This class contains the information about the argument of a function or template.
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
DocStyleChangeStack styleStack
StringMultiSet paramsFound
DocStyleChangeStack initialStyleStack
const MemberDef * memberDef
QCString removeRedundantWhiteSpace(const QCString &s)
QCString findFilePath(const QCString &file, bool &ambig)
QCString linkToText(SrcLangExt lang, const QCString &link, bool isFileName)
SrcLangExt getLanguageFromFileName(const QCString &fileName, SrcLangExt defLang)
bool resolveRef(const QCString &scName, const QCString &name, bool inSeeBlock, const Definition **resContext, const MemberDef **resMember, SrcLangExt lang, bool lookForSpecialization, const FileDef *currentFile, bool checkScope)
QCString relativePathToRoot(const QCString &name)
QCString showFileDefMatches(const FileNameLinkedMap *fnMap, const QCString &n)
QCString fileToString(const QCString &name, bool filter, bool isSourceCode)
QCString convertNameToFile(const QCString &name, bool allowDots, bool allowUnderscore)
QCString argListToString(const ArgumentList &al, bool useCanonicalType, bool showDefVals)
QCString getLanguageSpecificSeparator(SrcLangExt lang, bool classScope)
Returns the scope separator to use given the programming language lang.
GetDefResult getDefs(const GetDefInput &input)
StringVector split(const std::string &s, const std::string &delimiter)
split input string s by string delimiter delimiter.
bool copyFile(const QCString &src, const QCString &dest)
Copies the contents of file with name src to the newly created file with name dest.
QCString inlineArgListToDoc(const ArgumentList &al)
FileDef * findFileDef(const FileNameLinkedMap *fnMap, const QCString &n, bool &ambig)
A bunch of utility functions.