Permalink
Browse files

Bug 761139 - python unicode docstrings are ignored

End of the doctrings can be only triple double or single quotes not with optional u or r or even ! at the end.
  • Loading branch information...
albert-github committed Jan 29, 2016
1 parent 936f242 commit be100f882604a23d94025fee6d059bdb5ec28d3e
Showing with 6 additions and 4 deletions.
  1. +6 −4 src/pyscanner.l
@@ -472,6 +472,8 @@ BORDER ([^A-Za-z0-9])
TRISINGLEQUOTE {STRINGPREFIX}?"'''"(!)?
TRIDOUBLEQUOTE {STRINGPREFIX}?"\"\"\""(!)?
ENDTRISINGLEQUOTE "'''"
ENDTRIDOUBLEQUOTE "\"\"\""
LONGSTRINGCHAR [^\\"']
ESCAPESEQ ("\\")(.)
LONGSTRINGITEM ({LONGSTRINGCHAR}|{ESCAPESEQ})
@@ -1369,8 +1371,8 @@ STARTDOCSYMS "##"
}
<TripleComment>{
{TRIDOUBLEQUOTE} |
{TRISINGLEQUOTE} {
{ENDTRIDOUBLEQUOTE} |
{ENDTRISINGLEQUOTE} {
// printf("Expected module block %d special=%d\n",g_expectModuleDocs,g_specialBlock);
if (g_doubleQuote==(yytext[0]=='"'))
{
@@ -1515,8 +1517,8 @@ STARTDOCSYMS "##"
}
<TripleString>{
{TRIDOUBLEQUOTE} |
{TRISINGLEQUOTE} {
{ENDTRIDOUBLEQUOTE} |
{ENDTRISINGLEQUOTE} {
*g_copyString += yytext;
if (g_doubleQuote==(yytext[0]=='"'))
{

0 comments on commit be100f8

Please sign in to comment.