Sfoglia il codice sorgente

Python 3.5 new syntax sugar

https://www.python.org/dev/peps/pep-0492/
Ihor Gorobets 9 anni fa
parent
commit
4d925a99dd
1 ha cambiato i file con 5 aggiunte e 0 eliminazioni
  1. 5
    0
      syntax/python.vim

+ 5
- 0
syntax/python.vim Vedi File

@@ -174,6 +174,11 @@ else
174 174
   syn match   pythonStatement   "\<yield\s\+from\>" display
175 175
   syn keyword pythonBoolean     True False
176 176
   syn match   pythonFunction    "\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\)\%([^[:cntrl:][:punct:][:space:]]\|_\)*" display contained
177
+  syn keyword pythonStatement   await
178
+  syn match   pythonStatement   "\<async\s\+def\>" display
179
+  syn match   pythonStatement   "\<async\s\+with\>" display
180
+  syn match   pythonStatement   "\<async\s\+for\>" display
181
+  syn match   pythonStatement   "\<async\s\+with\>" display
177 182
 endif
178 183
 
179 184
 "