summaryrefslogtreecommitdiffstats
path: root/src/pycode.l
diff options
context:
space:
mode:
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");