summaryrefslogtreecommitdiffstats
path: root/src/pyscanner.l
diff options
context:
space:
mode:
Diffstat (limited to 'src/pyscanner.l')
-rw-r--r--src/pyscanner.l13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/pyscanner.l b/src/pyscanner.l
index e6bacc5..913f88e 100644
--- a/src/pyscanner.l
+++ b/src/pyscanner.l
@@ -829,6 +829,11 @@ STARTDOCSYMS ^{B}"##"/[^#]
current->name = current->name.stripWhiteSpace();
newFunction();
}
+ {B}":" { // function without arguments
+ g_specialBlock = TRUE; // expecting a docstring
+ bodyEntry = current;
+ BEGIN( FunctionBody );
+ }
{B}"(" {
BEGIN( FunctionParams );
@@ -1110,7 +1115,7 @@ STARTDOCSYMS ^{B}"##"/[^#]
g_stringContext=VariableEnd;
BEGIN(TripleString);
}
- "(" { // typle
+ "(" { // tuple
current->type = "tuple";
current->initializer+=*yytext;
g_atomStart='(';
@@ -1168,6 +1173,12 @@ STARTDOCSYMS ^{B}"##"/[^#]
BEGIN(VariableEnd);
}
}
+ "\"" {
+ g_stringContext=YY_START;
+ current->initializer+="\"";
+ g_copyString=&current->initializer;
+ BEGIN( DoubleQuoteString );
+ }
{IDENTIFIER} {
current->initializer+=yytext;
}