summaryrefslogtreecommitdiffstats
path: root/src/pyscanner.l
diff options
context:
space:
mode:
authorDimitri van Heesch <doxygen@gmail.com>2019-05-19 08:53:34 (GMT)
committerGitHub <noreply@github.com>2019-05-19 08:53:34 (GMT)
commit08c26ab79d7a262c7c2b9a40a91dc5df445f658b (patch)
treec07982c05cf0cd6a7666815926fe5a61adc15d4c /src/pyscanner.l
parent8fd805292b0dd1079d819fccbb74777514537780 (diff)
parent315733970daf1abe2ec088a61332880e24b415cc (diff)
downloadDoxygen-08c26ab79d7a262c7c2b9a40a91dc5df445f658b.zip
Doxygen-08c26ab79d7a262c7c2b9a40a91dc5df445f658b.tar.gz
Doxygen-08c26ab79d7a262c7c2b9a40a91dc5df445f658b.tar.bz2
Merge pull request #6916 from albert-github/feature/bug_py_class
Class definition with collections
Diffstat (limited to 'src/pyscanner.l')
-rw-r--r--src/pyscanner.l26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/pyscanner.l b/src/pyscanner.l
index 41422bd..fe94e64 100644
--- a/src/pyscanner.l
+++ b/src/pyscanner.l
@@ -537,6 +537,8 @@ STARTDOCSYMS "##"
%x SingleQuoteString
%x DoubleQuoteString
%x TripleString
+%x SingleQuoteStringIgnore
+%x DoubleQuoteStringIgnore
/* import */
%x FromMod
@@ -1282,8 +1284,28 @@ STARTDOCSYMS "##"
);
//Has base class-do stuff
}
+ "'" { // start of a single quoted string
+ g_stringContext=YY_START;
+ BEGIN( SingleQuoteStringIgnore );
+ }
+ "\"" { // start of a double quoted string
+ g_stringContext=YY_START;
+ BEGIN( DoubleQuoteStringIgnore );
+ }
}
+<SingleQuoteStringIgnore>{
+ "'" { // end of a single quoted string
+ BEGIN(g_stringContext);
+ }
+ . { }
+}
+<DoubleQuoteStringIgnore>{
+ "\"" { // end of a double quoted string
+ BEGIN(g_stringContext);
+ }
+ . { }
+}
<ClassCaptureIndent>{
"\n"|({BB}"\n") {
@@ -1702,6 +1724,10 @@ STARTDOCSYMS "##"
lineCount();
}
+<*>"'" {
+ fprintf(stderr,"Quote: %d\n",YY_START);
+ }
+
<*>. {
//printf("[pyscanner] '%s' [ state %d ] [line %d] no match\n",
// yytext, YY_START, yyLineNr);