Browse Source

Merge 3fb9dc2d1775f4e13030fbf4a2789f2a18a2885a into 716ded1d56713492fb49ddb11958102c78ef6c4f

Guerki 9 years ago
parent
commit
324924a050
2 changed files with 11 additions and 11 deletions
  1. 4
    4
      syntax/python.vim
  2. 7
    7
      test.py

+ 4
- 4
syntax/python.vim View File

@@ -154,7 +154,7 @@ syn keyword pythonStatement     lambda
154 154
 syn keyword pythonStatement     with
155 155
 syn keyword pythonStatement     def class nextgroup=pythonFunction skipwhite
156 156
 syn keyword pythonRepeat        for while
157
-syn keyword pythonConditional   if elif else
157
+syn keyword pythonConditional   if elif else else:
158 158
 syn keyword pythonImport        import
159 159
 syn keyword pythonException     try except finally
160 160
 syn keyword pythonOperator      and in is not or
@@ -370,9 +370,9 @@ else
370 370
 
371 371
   syn match   pythonNumberError	"\<\d\+\D\>" display
372 372
   syn match   pythonNumberError	"\<0\d\+\>" display
373
-  syn match   pythonNumber	"\<\d\>" display
374
-  syn match   pythonNumber	"\<[1-9]\d\+\>" display
375
-  syn match   pythonNumber	"\<\d\+[jJ]\>" display
373
+  syn match   pythonNumber	"\<\d\:\=\>" display
374
+  syn match   pythonNumber	"\<[1-9]\d\+\:\=\>" display
375
+  syn match   pythonNumber	"\<\d\+[jJ]\:\=\>" display
376 376
 
377 377
   syn match   pythonOctError	"\<0[oO]\=\o*[8-9]\d*\>" display
378 378
   syn match   pythonBinError	"\<0[bB][01]*[2-9]\d*\>" display

+ 7
- 7
test.py View File

@@ -57,7 +57,7 @@ RuntimeWarning FutureWarning ImportWarning UnicodeWarning
57 57
 # Numbers
58 58
 
59 59
 0 1 2 9 10 0x1f .3 12.34 0j 0j 34.2E-3 0b10 0o77 1023434 0x0
60
-
60
+0:
61 61
 # Erroneous numbers
62 62
 
63 63
 077 100L 0xfffffffL 0L 08 0xk 0x  0b102 0o78 0o123LaB
@@ -130,9 +130,9 @@ $ ? 6xav
130 130
 
131 131
 # Trailing space errors.
132 132
 
133
-    	
134
-    break	    
135
-"""  	
136
-   	 
137
-    test    	
138
-"""  	
133
+
134
+    break
135
+"""
136
+
137
+    test
138
+"""