diff options
author | Dimitri van Heesch <doxygen@gmail.com> | 2019-05-27 19:42:57 (GMT) |
---|---|---|
committer | Dimitri van Heesch <doxygen@gmail.com> | 2019-05-27 19:42:57 (GMT) |
commit | 94a8f6cd0ae9b1faa8bab29f6611b2223230f39f (patch) | |
tree | 4d64e337eaf5ffea71b9b3ae41823d1d23a78ca9 /src | |
parent | 8625ec5da0a505caf2dcfd16a5a8c1e668633ca8 (diff) | |
parent | e2cdb52fc2a906cffdd6223736892dcfb0b5da6f (diff) | |
download | Doxygen-94a8f6cd0ae9b1faa8bab29f6611b2223230f39f.zip Doxygen-94a8f6cd0ae9b1faa8bab29f6611b2223230f39f.tar.gz Doxygen-94a8f6cd0ae9b1faa8bab29f6611b2223230f39f.tar.bz2 |
Merge branch 'master' of github.com:doxygen/doxygen
Diffstat (limited to 'src')
-rw-r--r-- | src/code.l | 18 | ||||
-rw-r--r-- | src/config.xml | 11 | ||||
-rw-r--r-- | src/scanner.l | 37 | ||||
-rw-r--r-- | src/sqlcode.l | 3 | ||||
-rw-r--r-- | src/xmlcode.l | 3 |
5 files changed, 72 insertions, 0 deletions
@@ -3553,6 +3553,24 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\" BEGIN(SkipComment); } } +<*>^{B}*"/**"[*]+/[^/] { // special C "banner" comment block at a new line + if (Config_getBool(JAVADOC_BANNER) && Config_getBool(STRIP_CODE_COMMENTS)) + { + g_lastSpecialCContext = YY_START; + BEGIN(RemoveSpecialCComment); + } + else + { + // check is to prevent getting stuck in skipping C++ comments + if (YY_START != SkipCxxComment) + { + g_lastCContext = YY_START ; + } + startFontClass("comment"); + g_code->codify(yytext); + BEGIN(SkipComment); + } + } <*>^{B}*"/*"[!*]/[^/*] { // special C comment block at a new line if (Config_getBool(STRIP_CODE_COMMENTS)) { diff --git a/src/config.xml b/src/config.xml index 0b26571..0bf34a8 100644 --- a/src/config.xml +++ b/src/config.xml @@ -478,6 +478,17 @@ Go to the <a href="commands.html">next</a> section or return to the ]]> </docs> </option> + <option type='bool' id='JAVADOC_BANNER' defval='0'> + <docs> +<![CDATA[ + If the \c JAVADOC_BANNER tag is set to \c YES then doxygen + will interpret a line such as "/***************" as being the + beginning of a Javadoc-style comment "banner". If set to \c NO, the + Javadoc-style will behave just like regular comments and it will + not be interpreted by doxygen. +]]> + </docs> + </option> <option type='bool' id='QT_AUTOBRIEF' defval='0'> <docs> <![CDATA[ diff --git a/src/scanner.l b/src/scanner.l index 5395e49..f94e4f8 100644 --- a/src/scanner.l +++ b/src/scanner.l @@ -6254,6 +6254,43 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}) startCommentBlock(FALSE); BEGIN( DocBlock ); } +<FindMembers,FindFields,MemberSpec,FuncQual,SkipCurly,Operator,ClassVar,SkipInits,Bases,OldStyleArgs>"/**"[*]+{BL} { + + static bool javadocBanner = Config_getBool(JAVADOC_BANNER); + + if( javadocBanner ) { + lastDocContext = YY_START; + + //printf("Found comment banner at %s:%d\n",yyFileName,yyLineNr); + if (current_root->section & Entry::SCOPE_MASK) + { + current->inside = current_root->name+"::"; + } + current->docLine = yyLineNr; + current->docFile = yyFileName; + docBlockContext = YY_START; + docBlockInBody = YY_START==SkipCurly; + static bool javadocAutoBrief = Config_getBool(JAVADOC_AUTOBRIEF); + docBlockAutoBrief = javadocAutoBrief; + + QCString indent; + indent.fill(' ',computeIndent(yytext,g_column)); + docBlock=indent; + + if (docBlockAutoBrief) + { + current->briefLine = yyLineNr; + current->briefFile = yyFileName; + } + startCommentBlock(FALSE); + BEGIN( DocBlock ); + } else { + current->program += yytext ; + lastContext = YY_START ; + BEGIN( Comment ) ; + } + + } <FindMembers,FindFields,MemberSpec,FuncQual,SkipCurly,Operator,ClassVar,SkipInits,Bases,OldStyleArgs>("//"{B}*)?"/**"/[^/*] { removeSlashes=(yytext[1]=='/'); lastDocContext = YY_START; diff --git a/src/sqlcode.l b/src/sqlcode.l index c3dd679..d14bcfb 100644 --- a/src/sqlcode.l +++ b/src/sqlcode.l @@ -35,6 +35,7 @@ #include "config.h" #include "filedef.h" #include "tooltip.h" +#include "message.h" #define YY_NEVER_INTERACTIVE 1 #define YY_NO_INPUT 1 @@ -379,6 +380,7 @@ void parseSqlCode( sqlcodeYYlex_init_extra(&sqlcode_extra, &yyscanner); struct yyguts_t *yyg = (struct yyguts_t*)yyscanner; + printlex(yy_flex_debug, TRUE, __FILE__, fd ? fd->fileName().data(): NULL); yyextra->code = &od; yyextra->inputString = s; @@ -436,6 +438,7 @@ void parseSqlCode( sqlcodeYYlex_destroy(yyscanner); + printlex(yy_flex_debug, FALSE, __FILE__, fd ? fd->fileName().data(): NULL); return; } diff --git a/src/xmlcode.l b/src/xmlcode.l index e792ea9..42218b1 100644 --- a/src/xmlcode.l +++ b/src/xmlcode.l @@ -35,6 +35,7 @@ #include "config.h" #include "filedef.h" #include "tooltip.h" +#include "message.h" #define YY_NEVER_INTERACTIVE 1 #define YY_NO_INPUT 1 @@ -338,6 +339,7 @@ void parseXmlCode( ) { if (s.isEmpty()) return; + printlex(yy_flex_debug, TRUE, __FILE__, fd ? fd->fileName().data(): NULL); g_code = &od; g_inputString = s; @@ -393,6 +395,7 @@ void parseXmlCode( g_sourceFileDef=0; } + printlex(yy_flex_debug, FALSE, __FILE__, fd ? fd->fileName().data(): NULL); return; } |