summaryrefslogtreecommitdiffstats
path: root/src/pyscanner.l
diff options
context:
space:
mode:
Diffstat (limited to 'src/pyscanner.l')
-rw-r--r--src/pyscanner.l10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/pyscanner.l b/src/pyscanner.l
index 4a9552e..96d62ca 100644
--- a/src/pyscanner.l
+++ b/src/pyscanner.l
@@ -261,10 +261,20 @@ STARTDOCSYMS "##"
searchFoundDef(yyscanner);
BEGIN( FunctionDec );
}
+ ^{B}"async"{BB}"def"{BB} { // start of an async function/method definition with indent
+ DBG_CTX((stderr,"Found async def at %d\n",yyextra->yyLineNr));
+ yyextra->indent=computeIndent(yytext);
+ searchFoundDef(yyscanner);
+ BEGIN( FunctionDec );
+ }
"def"{BB} { // start of a function/method definition
searchFoundDef(yyscanner);
BEGIN( FunctionDec );
}
+ "async"{BB}"def"{BB} { // start of a function/method definition
+ searchFoundDef(yyscanner);
+ BEGIN( FunctionDec );
+ }
^{B}"class"{BB} { // start of a class definition with indent
DBG_CTX((stderr,"Found class at %d\n",yyextra->yyLineNr));