Browse Source

Merge branch 'async_def_fix'

Dmitry Vasiliev 3 years ago
parent
commit
299d33b745
4 changed files with 12 additions and 2 deletions
  1. 4
    0
      CHANGES.txt
  2. 1
    0
      README.rst
  3. 2
    2
      syntax/python.vim
  4. 5
    0
      test.py

+ 4
- 0
CHANGES.txt View File

@@ -1,3 +1,7 @@
1
+Revision 3.6.0 (2015-11-XX):
2
+
3
+    - Fix 'async def' highlighting. Patch by Joongi Kim
4
+
1 5
 Revision 3.5.0 (2015-06-10):
2 6
 
3 7
     - Add support for 'async ...' and 'await' keywords introduced in

+ 1
- 0
README.rst View File

@@ -138,6 +138,7 @@ List of the contributors in alphabetical order:
138 138
 - `Ihor Gorobets <https://github.com/iho>`_
139 139
 - `Jeroen Ruigrok van der Werven <https://github.com/ashemedai>`_
140 140
 - `John Eikenberry <https://github.com/eikenb>`_
141
+- `Joongi Kim <https://github.com/achimnol>`_
141 142
 - `Marc Weber <https://github.com/MarcWeber>`_
142 143
 - `Pedro Algarvio <https://github.com/s0undt3ch>`_
143 144
 - `Victor Salgado <https://github.com/mcsalgado>`_

+ 2
- 2
syntax/python.vim View File

@@ -31,6 +31,7 @@
31 31
 "   Ihor Gorobets
32 32
 "   Jeroen Ruigrok van der Werven
33 33
 "   John Eikenberry
34
+"   Joongi Kim
34 35
 "   Marc Weber
35 36
 "   Pedro Algarvio
36 37
 "   Victor Salgado
@@ -176,10 +177,9 @@ else
176 177
   syn keyword pythonBoolean     True False
177 178
   syn match   pythonFunction    "\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\)\%([^[:cntrl:][:punct:][:space:]]\|_\)*" display contained
178 179
   syn keyword pythonStatement   await
179
-  syn match   pythonStatement   "\<async\s\+def\>" display
180
+  syn match   pythonStatement   "\<async\s\+def\>" nextgroup=pythonFunction skipwhite
180 181
   syn match   pythonStatement   "\<async\s\+with\>" display
181 182
   syn match   pythonStatement   "\<async\s\+for\>" display
182
-  syn match   pythonStatement   "\<async\s\+with\>" display
183 183
 endif
184 184
 
185 185
 "

+ 5
- 0
test.py View File

@@ -18,6 +18,11 @@ class Classname
18 18
 def функция
19 19
 class Класс
20 20
 
21
+await
22
+async def Test
23
+async with
24
+async for
25
+
21 26
 # Builtin objects.
22 27
 
23 28
 True False Ellipsis None NotImplemented