Converts the comments in a file.
1921{
1925 commentcnvYYlex_init_extra(&extra,&yyscanner);
1926#ifdef FLEX_DEBUG
1928#endif
1929 struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
1930
1931 yyextra->inBufPos = 0;
1932 yyextra->col = 0;
1934 yyextra->skip =
FALSE;
1935 yyextra->fileName = fileName;
1937 yyextra->pythonDocString =
FALSE;
1938 yyextra->lineNr = 1;
1939 yyextra->raiseLevel = 0;
1940 yyextra->raiseLabel = "";
1941 yyextra->raiseIncrement = 0;
1942 yyextra->raisePrefix = "";
1943 yyextra->insertCppCommentMarker=false;
1944 yyextra->expandedAliases.clear();
1945 while (!yyextra->condStack.empty()) yyextra->condStack.pop();
1947 yyextra->vhdl =
FALSE;
1948
1950 yyextra->isFixedForm =
FALSE;
1952 {
1955 }
1956
1958 {
1959 yyextra->nestingCount=0;
1960 BEGIN(CComment);
1961 yyextra->commentStack.push(yyextra->lineNr);
1962 }
1963 else
1964 {
1965 BEGIN(Scan);
1966 }
1968 while (!yyextra->condStack.empty())
1969 {
1973 warn(yyextra->fileName,ctx.
lineNr,
"Conditional section{}does not have "
1974 "a corresponding \\endcond command within this file.",sectionInfo.data());
1975 yyextra->condStack.pop();
1976 }
1978 {
1980 bool first = true;
1981 while (!yyextra->commentStack.empty())
1982 {
1983 int lineNr = yyextra->commentStack.top();
1984 if (!first) lines += ", ";
1986 first = false;
1987 yyextra->commentStack.pop();
1988 }
1989 warn(yyextra->fileName,yyextra->lineNr,
"Reached end of file while still inside a (nested) comment. "
1990 "Nesting level {} (possible line reference(s): {})",yyextra->nestingCount,lines);
1991 }
1992 yyextra->nestingCount = 0;
1994 {
1996 "output=[\n{}]\n-----------\n",fileName,yyextra->outBuf
1997 );
1998 }
1999 commentcnvYYlex_destroy(yyscanner);
2000}
static bool isFlagSet(const DebugMask mask)
static void print(DebugMask mask, int prio, fmt::format_string< Args... > fmt, Args &&... args)
This is an alternative implementation of QCString.
QCString stripWhiteSpace() const
returns a copy of this string with leading and trailing whitespace removed
QCString & setNum(short n)
const char * data() const
Returns a pointer to the contents of the string in the form of a 0-terminated C string.
#define Config_getBool(name)
#define warn(file, line, fmt,...)
const char * qPrint(const char *s)
SrcLangExt getLanguageFromFileName(const QCString &fileName, SrcLangExt defLang)
bool recognizeFixedForm(const QCString &contents, FortranFormat format)
FortranFormat convertFileNameFortranParserCode(QCString fn)