Skip to content

Commit ceb73af

Browse files
committed
issue #9947: Attributes resulting of an unpacked tuple are not documented (Python)
1 parent 9110958 commit ceb73af

File tree

1 file changed

+40
-1
lines changed

1 file changed

+40
-1
lines changed

src/pyscanner.l

+40-1
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,7 @@ STARTDOCSYMS "##"
212212
213213
%x Search
214214
%x SearchMemVars
215+
%x SearchSkipValue
215216
216217
/* Mid-comment states */
217218
@@ -551,8 +552,46 @@ STARTDOCSYMS "##"
551552
BEGIN( DoubleQuoteString );
552553
}
553554
\n { incLineNr(yyscanner); }
555+
"=" {
556+
yyextra->current->doc.resize(0);
557+
yyextra->current->brief.resize(0);
558+
BEGIN( SearchSkipValue );
559+
}
560+
{IDENTIFIER} // identifiers
561+
[^'"\.#a-z_A-Z=\n]+ // other uninteresting stuff
562+
. // anything else
563+
}
564+
565+
<SearchSkipValue>{
566+
{TRIDOUBLEQUOTE} { // start of a comment block
567+
initTriDoubleQuoteBlock(yyscanner);
568+
BEGIN(TripleComment);
569+
}
570+
571+
{TRISINGLEQUOTE} { // start of a comment block
572+
initTriSingleQuoteBlock(yyscanner);
573+
BEGIN(TripleComment);
574+
}
575+
{STARTDOCSYMS}/[^#] { // start of a special comment
576+
initSpecialBlock(yyscanner);
577+
BEGIN(SpecialComment);
578+
}
579+
{POUNDCOMMENT} { // #
580+
}
581+
"'" { // start of a single quoted string
582+
yyextra->stringContext=YY_START;
583+
yyextra->copyString=0;
584+
BEGIN( SingleQuoteString );
585+
}
586+
"\"" { // start of a double quoted string
587+
yyextra->stringContext=YY_START;
588+
yyextra->copyString=0;
589+
BEGIN( DoubleQuoteString );
590+
}
591+
\n { incLineNr(yyscanner);
592+
BEGIN(SearchMemVars);
593+
}
554594
{IDENTIFIER} // identifiers
555-
[^'"\.#a-z_A-Z\n]+ // other uninteresting stuff
556595
. // anything else
557596
}
558597

0 commit comments

Comments
 (0)