Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Bug 761139 - python unicode docstrings are ignored
Added support for raw and unicode docstrings in python scanner (was already available in python code scanner)
  • Loading branch information
albert-github committed Jan 27, 2016
1 parent 3785228 commit 936f242
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/pyscanner.l
Expand Up @@ -368,7 +368,7 @@ static void initTriDoubleQuoteBlock()
docBlockContext = YY_START;
docBlockInBody = FALSE;
docBlockJavaStyle = TRUE;
docBlockSpecial = yytext[3]=='!';
docBlockSpecial = yytext[strlen(yytext) - 1]=='!';
docBlock.resize(0);
g_doubleQuote = TRUE;
startCommentBlock(FALSE);
Expand All @@ -379,7 +379,7 @@ static void initTriSingleQuoteBlock()
docBlockContext = YY_START;
docBlockInBody = FALSE;
docBlockJavaStyle = TRUE;
docBlockSpecial = yytext[3]=='!';
docBlockSpecial = yytext[strlen(yytext) - 1]=='!';
docBlock.resize(0);
g_doubleQuote = FALSE;
startCommentBlock(FALSE);
Expand Down Expand Up @@ -470,8 +470,8 @@ IDENTIFIER ({LETTER}|"_")({LETTER}|{DIGIT}|"_")*
SCOPE {IDENTIFIER}("."{IDENTIFIER})*
BORDER ([^A-Za-z0-9])

TRISINGLEQUOTE "'''"(!)?
TRIDOUBLEQUOTE "\"\"\""(!)?
TRISINGLEQUOTE {STRINGPREFIX}?"'''"(!)?
TRIDOUBLEQUOTE {STRINGPREFIX}?"\"\"\""(!)?
LONGSTRINGCHAR [^\\"']
ESCAPESEQ ("\\")(.)
LONGSTRINGITEM ({LONGSTRINGCHAR}|{ESCAPESEQ})
Expand Down

0 comments on commit 936f242

Please sign in to comment.