diff options
author | Dimitri van Heesch <dimitri@stack.nl> | 2015-12-28 18:59:34 (GMT) |
---|---|---|
committer | Dimitri van Heesch <dimitri@stack.nl> | 2015-12-28 18:59:34 (GMT) |
commit | bacc2b2fd7b8173f52b2087b4004c5b936819877 (patch) | |
tree | 3f3b75b5c33d22731e08999b80c470d3259f8922 /src | |
parent | a112c70c7a5d590286e0fad1382b9bb3fd86118b (diff) | |
parent | e4a46ae16468526327d019c80d19991a9d884267 (diff) | |
download | Doxygen-bacc2b2fd7b8173f52b2087b4004c5b936819877.zip Doxygen-bacc2b2fd7b8173f52b2087b4004c5b936819877.tar.gz Doxygen-bacc2b2fd7b8173f52b2087b4004c5b936819877.tar.bz2 |
Merge branch 'master' of github.com:doxygen/doxygen
Diffstat (limited to 'src')
-rw-r--r-- | src/pyscanner.l | 29 |
1 files changed, 19 insertions, 10 deletions
diff --git a/src/pyscanner.l b/src/pyscanner.l index c73e7dc..9ec69be 100644 --- a/src/pyscanner.l +++ b/src/pyscanner.l @@ -401,7 +401,6 @@ static void searchFoundDef() current->startLine = yyLineNr; current->bodyLine = yyLineNr; current->section = Entry::FUNCTION_SEC; - current->protection = protection = Public; current->lang = SrcLangExt_Python; current->virt = Normal; current->stat = gstat; @@ -487,6 +486,7 @@ STRINGPREFIX ("r"|"u"|"ur"|"R"|"U"|"UR"|"Ur"|"uR") KEYWORD ("lambda"|"import"|"class"|"assert"|"as"|"from"|"global"|"def"|"True"|"False") FLOWKW ("or"|"and"|"is"|"not"|"print"|"for"|"in"|"if"|"try"|"except"|"yield"|"raise"|"break"|"continue"|"pass"|"if"|"return"|"while"|"elif"|"else"|"finally") POUNDCOMMENT "#"[^#\n][^\n]* +SCRIPTCOMMENT "#!".* STARTDOCSYMS "##" @@ -594,6 +594,20 @@ STARTDOCSYMS "##" g_packageCommentAllowed = FALSE; BEGIN(VariableDec); } + {B}{IDENTIFIER}/({B},{B}{IDENTIFIER})*{B}")"*{B}"="[^=] { // list of variables, we cannot place the default value + // so we will skip it later on in a general rule + // Also note ")" this is to catch also (a,b). the "(" + // is caught in the rule: [(], the ")" will be handled in [)] + if (g_search_count > 1) REJECT; + g_indent=computeIndent(yytext); + current->section = Entry::VARIABLE_SEC; + current->name = QCString(yytext).stripWhiteSpace(); + current->fileName = yyFileName; + current->startLine = yyLineNr; + current->bodyLine = yyLineNr; + g_packageCommentAllowed = FALSE; + newVariable(); + } "'" { // start of a single quoted string g_stringContext=YY_START; g_copyString=0; @@ -609,6 +623,9 @@ STARTDOCSYMS "##" "@staticmethod" { gstat=TRUE; } + {SCRIPTCOMMENT} { // Unix type script comment + if (yyLineNr != 1) REJECT; + } {POUNDCOMMENT} { // normal comment g_packageCommentAllowed = FALSE; } @@ -756,10 +773,6 @@ STARTDOCSYMS "##" { current->protection=Private; } - else - { - current->protection=Public; - } newEntry(); } "cls."{IDENTIFIER}/{B}"=" { @@ -774,10 +787,6 @@ STARTDOCSYMS "##" { current->protection=Private; } - else - { - current->protection=Public; - } newEntry(); } {TRIDOUBLEQUOTE} { // start of a comment block @@ -998,7 +1007,7 @@ STARTDOCSYMS "##" } else // continue { - g_braceCount--; + if (*yytext == ')')g_braceCount--; g_defVal+=*yytext; } } |