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

+ 7
- 7
test.py View File

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