Procházet zdrojové kódy

Merge branch 'master' of https://github.com/strin/python-syntax

Tianlin Shi před 8 roky
rodič
revize
20789980b1
4 změnil soubory, kde provedl 21 přidání a 4 odebrání
  1. 6
    0
      CHANGES.txt
  2. 2
    0
      README.rst
  3. 8
    4
      syntax/python.vim
  4. 5
    0
      test.py

+ 6
- 0
CHANGES.txt Zobrazit soubor

@@ -1,3 +1,9 @@
1
+Revision 3.6.0 (2015-11-XX):
2
+
3
+    - Fix 'async def' highlighting. Patch by Joongi Kim
4
+    - Add dummy 'pythonInclude' group to avoid crashing standard pyrex.vim.
5
+      Patch by Antony Lee
6
+
1 7
 Revision 3.5.0 (2015-06-10):
2 8
 
3 9
     - Add support for 'async ...' and 'await' keywords introduced in

+ 2
- 0
README.rst Zobrazit soubor

@@ -132,12 +132,14 @@ List of the contributors in alphabetical order:
132 132
 
133 133
 - `Andrea Riciputi <https://github.com/mrrech>`_
134 134
 - Anton Butanaev
135
+- `Antony Lee <https://github.com/anntzer>`_
135 136
 - Caleb Adamantine
136 137
 - `David Briscoe <https://github.com/idbrii>`_
137 138
 - `Elizabeth Myers <https://github.com/Elizafox>`_
138 139
 - `Ihor Gorobets <https://github.com/iho>`_
139 140
 - `Jeroen Ruigrok van der Werven <https://github.com/ashemedai>`_
140 141
 - `John Eikenberry <https://github.com/eikenb>`_
142
+- `Joongi Kim <https://github.com/achimnol>`_
141 143
 - `Marc Weber <https://github.com/MarcWeber>`_
142 144
 - `Pedro Algarvio <https://github.com/s0undt3ch>`_
143 145
 - `Victor Salgado <https://github.com/mcsalgado>`_

+ 8
- 4
syntax/python.vim Zobrazit soubor

@@ -3,9 +3,9 @@
3 3
 " Current Maintainer:   Dmitry Vasiliev <dima at hlabs dot org>
4 4
 " Previous Maintainer:  Neil Schemenauer <nas at python dot ca>
5 5
 " URL:                  https://github.com/hdima/python-syntax
6
-" Last Change:          2015-06-10
6
+" Last Change:          2015-11-01
7 7
 " Filenames:            *.py
8
-" Version:              3.5.0
8
+" Version:              3.6.0
9 9
 "
10 10
 " Based on python.vim (from Vim 6.1 distribution)
11 11
 " by Neil Schemenauer <nas at python dot ca>
@@ -25,12 +25,14 @@
25 25
 "
26 26
 "   Andrea Riciputi
27 27
 "   Anton Butanaev
28
+"   Antony Lee
28 29
 "   Caleb Adamantine
29 30
 "   David Briscoe
30 31
 "   Elizabeth Myers
31 32
 "   Ihor Gorobets
32 33
 "   Jeroen Ruigrok van der Werven
33 34
 "   John Eikenberry
35
+"   Joongi Kim
34 36
 "   Marc Weber
35 37
 "   Pedro Algarvio
36 38
 "   Victor Salgado
@@ -157,6 +159,9 @@ syn keyword pythonStatement     with
157 159
 syn keyword pythonStatement     def class nextgroup=pythonFunction skipwhite
158 160
 syn keyword pythonRepeat        for while
159 161
 syn keyword pythonConditional   if elif else
162
+" The standard pyrex.vim unconditionally removes the pythonInclude group, so
163
+" we provide a dummy group here to avoid crashing pyrex.vim.
164
+syn keyword pythonInclude       import
160 165
 syn keyword pythonImport        import
161 166
 syn keyword pythonException     try except finally
162 167
 syn keyword pythonOperator      and in is not or
@@ -176,10 +181,9 @@ else
176 181
   syn keyword pythonBoolean     True False
177 182
   syn match   pythonFunction    "\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\)\%([^[:cntrl:][:punct:][:space:]]\|_\)*" display contained
178 183
   syn keyword pythonStatement   await
179
-  syn match   pythonStatement   "\<async\s\+def\>" display
184
+  syn match   pythonStatement   "\<async\s\+def\>" nextgroup=pythonFunction skipwhite
180 185
   syn match   pythonStatement   "\<async\s\+with\>" display
181 186
   syn match   pythonStatement   "\<async\s\+for\>" display
182
-  syn match   pythonStatement   "\<async\s\+with\>" display
183 187
 endif
184 188
 
185 189
 "

+ 5
- 0
test.py Zobrazit soubor

@@ -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