From c1aed4fc301add03f2051da8ea8729007026c62e Mon Sep 17 00:00:00 2001 From: albert-github Date: Sun, 25 Apr 2021 14:40:51 +0200 Subject: issue #8518 tag was inserted before parsing python file to xml Doxygen expects that decorators don't have a return in them, but the complicated decorator: ``` @basetest.unittest.skipIf( api_implementation.Type() != 'cpp' or api_implementation.Version() != 2, 'Errors are only available from the most recent C++ implementation.') ``` has some in them. This leads to the mentioned problem as well as that the line counting is incorrect (we see that the last mentioned lie number in the xml file is 2964 though the file has 2966 lines). By fixing this (and also the line counting in the python scanner) the problem looks to be handled. --- src/pycode.l | 2 +- src/pyscanner.l | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/pycode.l b/src/pycode.l index fa65e22..1691b5d 100644 --- a/src/pycode.l +++ b/src/pycode.l @@ -172,7 +172,7 @@ NONEMPTYEXP [^ \t\n:] PARAMNONEMPTY [^ \t\n():] IDENTIFIER ({LETTER}|"_")({LETTER}|{DIGIT}|"_")* SCOPE {IDENTIFIER}("."{IDENTIFIER})* -CALLANY "("[^)]*")" +CALLANY "("[^)\n]*")" BORDER ([^A-Za-z0-9]) POUNDCOMMENT "##" diff --git a/src/pyscanner.l b/src/pyscanner.l index b0ebd41..47e00a3 100644 --- a/src/pyscanner.l +++ b/src/pyscanner.l @@ -331,6 +331,7 @@ STARTDOCSYMS "##" yyextra->stat=TRUE; } "@"{SCOPE}{CALL}? { // decorator + lineCount(yyscanner); } {SCRIPTCOMMENT} { // Unix type script comment if (yyextra->yyLineNr != 1) REJECT; -- cgit v0.12