diff options
author | albert-github <albert.tests@gmail.com> | 2015-12-26 17:53:03 (GMT) |
---|---|---|
committer | albert-github <albert.tests@gmail.com> | 2015-12-26 17:53:03 (GMT) |
commit | 015955e0badb6082a1e553392acaeb6890734c31 (patch) | |
tree | e31cbc0420e694e56abc6c4c0f2b2c95a5865d7a /src/pyscanner.l | |
parent | 165498dc9ea33bc9991c5ab5234b5e51d74569d0 (diff) | |
download | Doxygen-015955e0badb6082a1e553392acaeb6890734c31.zip Doxygen-015955e0badb6082a1e553392acaeb6890734c31.tar.gz Doxygen-015955e0badb6082a1e553392acaeb6890734c31.tar.bz2 |
Bug 361814 - python: tuple assignment not recognized as variable initialization
added possibility for the separate variables from a tuple assignment:
a,b,c =
and
(a,b,c) =
Diffstat (limited to 'src/pyscanner.l')
-rw-r--r-- | src/pyscanner.l | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/pyscanner.l b/src/pyscanner.l index 1ccb943..6f260b6 100644 --- a/src/pyscanner.l +++ b/src/pyscanner.l @@ -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; |