summaryrefslogtreecommitdiffstats
path: root/src/pycode.l
diff options
context:
space:
mode:
authorMob <a-yoshiyama@nec.com>2021-01-15 10:19:49 (GMT)
committerMob <a-yoshiyama@nec.com>2021-01-18 06:30:45 (GMT)
commitabffb84e0420deb5175cf1fb3f50949abf0c3b05 (patch)
tree43a1d5922768c97943f1804deeaf53d1a3636e2b /src/pycode.l
parent31709395a2ab12ba137e87cf4d8b70f2cada8396 (diff)
downloadDoxygen-abffb84e0420deb5175cf1fb3f50949abf0c3b05.zip
Doxygen-abffb84e0420deb5175cf1fb3f50949abf0c3b05.tar.gz
Doxygen-abffb84e0420deb5175cf1fb3f50949abf0c3b05.tar.bz2
issue #8336 Python class only with async methods support
Diffstat (limited to 'src/pycode.l')
-rw-r--r--src/pycode.l8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/pycode.l b/src/pycode.l
index 65788cc..0362de4 100644
--- a/src/pycode.l
+++ b/src/pycode.l
@@ -190,7 +190,7 @@ SHORTSTRINGITEM ({SHORTSTRINGCHAR}|{ESCAPESEQ})
SHORTSTRINGCHAR [^\\\n"]
STRINGLITERAL {STRINGPREFIX}?( {SHORTSTRING} | {LONGSTRING})
STRINGPREFIX ("r"|"u"|"ur"|"R"|"U"|"UR"|"Ur"|"uR")
-KEYWORD ("lambda"|"import"|"class"|"assert"|"with"|"as"|"from"|"global"|"def"|"True"|"False")
+KEYWORD ("lambda"|"import"|"class"|"assert"|"with"|"as"|"from"|"global"|"async"|"def"|"True"|"False")
FLOWKW ("or"|"and"|"is"|"not"|"print"|"for"|"in"|"if"|"try"|"except"|"yield"|"raise"|"break"|"continue"|"pass"|"if"|"return"|"while"|"elif"|"else"|"finally")
QUOTES ("\""[^"]*"\"")
SINGLEQUOTES ("'"[^']*"'")
@@ -302,6 +302,12 @@ TARGET ({IDENTIFIER}|"("{TARGET_LIST}")"|"["{TARGET_LIST}"]"|{ATTRIBU
endFontClass(yyscanner);
BEGIN( FunctionDec );
}
+ "async"{BB}"def"{BB} {
+ startFontClass(yyscanner,"keyword");
+ codify(yyscanner,yytext);
+ endFontClass(yyscanner);
+ BEGIN( FunctionDec );
+ }
"class"{BB} {
startFontClass(yyscanner,"keyword");