Permalink
Browse files

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 936f242956350825d870f7396ae5d6106fe3081d
Showing with 4 additions and 4 deletions.
  1. +4 −4 src/pyscanner.l
@@ -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);
@@ -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);
@@ -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})

0 comments on commit 936f242

Please sign in to comment.