diff options
author | Dimitri van Heesch <doxygen@gmail.com> | 2020-10-16 18:31:03 (GMT) |
---|---|---|
committer | Dimitri van Heesch <doxygen@gmail.com> | 2020-10-16 18:31:03 (GMT) |
commit | e31d4c8092bcac54b4b820b9d995fce8cd5a78c5 (patch) | |
tree | 4c7b5f0f1759c998eb6a696a80e64cd9f3659125 /src | |
parent | a5ac10888f6c0b0fc00678f67aa49036b33aa4cf (diff) | |
download | Doxygen-e31d4c8092bcac54b4b820b9d995fce8cd5a78c5.zip Doxygen-e31d4c8092bcac54b4b820b9d995fce8cd5a78c5.tar.gz Doxygen-e31d4c8092bcac54b4b820b9d995fce8cd5a78c5.tar.bz2 |
issue #8098: Python Decorator written below @brief tag and above the function leads to documentation error
Diffstat (limited to 'src')
-rw-r--r-- | src/pycode.l | 7 | ||||
-rw-r--r-- | src/pyscanner.l | 4 |
2 files changed, 11 insertions, 0 deletions
diff --git a/src/pycode.l b/src/pycode.l index ea314da..cc00447 100644 --- a/src/pycode.l +++ b/src/pycode.l @@ -168,6 +168,8 @@ EXPCHAR [#(){}\[\],:.%/\\=`*~|&<>!;+-] NONEMPTYEXP [^ \t\n:] PARAMNONEMPTY [^ \t\n():] IDENTIFIER ({LETTER}|"_")({LETTER}|{DIGIT}|"_")* +SCOPE {IDENTIFIER}("."{IDENTIFIER})* +CALLANY "("[^)]*")" BORDER ([^A-Za-z0-9]) POUNDCOMMENT "##" @@ -341,6 +343,11 @@ TARGET ({IDENTIFIER}|"("{TARGET_LIST}")"|"["{TARGET_LIST}"]"|{ATTRIBU codify(yyscanner,"cls."); findMemberLink(yyscanner,*yyextra->code,&yytext[4]); } + "@"{SCOPE}{CALLANY}? { // decorator + startFontClass(yyscanner,"preprocessor"); + codify(yyscanner,yytext); + endFontClass(yyscanner); + } } <ClassDec>{IDENTIFIER} { diff --git a/src/pyscanner.l b/src/pyscanner.l index a136b52..4a9552e 100644 --- a/src/pyscanner.l +++ b/src/pyscanner.l @@ -113,6 +113,7 @@ struct pyscannerYY_state int search_count = 0; QCString argType; bool funcParamsEnd = FALSE; + std::vector<QCString> decorators; }; //----------------------------------------------------------------------------- @@ -175,6 +176,7 @@ NONEMPTYEXP [^ \t\n:] PARAMNONEMPTY [^ \t\n():] IDENTIFIER ({LETTER}|"_")({LETTER}|{DIGIT}|"_")* SCOPE {IDENTIFIER}("."{IDENTIFIER})* +CALL "("[^)]*")" BORDER ([^A-Za-z0-9]) TRISINGLEQUOTE {STRINGPREFIX}?"'''"(!)? @@ -335,6 +337,8 @@ STARTDOCSYMS "##" "@staticmethod" { yyextra->stat=TRUE; } + "@"{SCOPE}{CALL}? { // decorator + } {SCRIPTCOMMENT} { // Unix type script comment if (yyextra->yyLineNr != 1) REJECT; } |