Browse Source

Trailing 'L' removal was in wrong file

Dmitry Vasiliev 15 years ago
parent
commit
b521645066
4 changed files with 20 additions and 15 deletions
  1. 5
    0
      CHANGES.txt
  2. 7
    7
      python.vim
  3. 7
    7
      python3.0.vim
  4. 1
    1
      test.py

+ 5
- 0
CHANGES.txt View File

@@ -8,6 +8,11 @@ Revision 3.0.0 (2008-09-?):
8 8
       "execfile", "file", "help", "intern", "long", "raw_input", "reduce",
9 9
       "reload", "unichr", "unicode", "xrange";
10 10
 
11
+Revision 2.6.3 (2008-09-29):
12
+
13
+    - Return back trailing 'L' support for numbers. Actually it was changed for
14
+      future Python 3.0 syntax but in wrong file;
15
+
11 16
 Revision 2.6.2 (2008-09-22):
12 17
 
13 18
     - Added "VMSError" exception;

+ 7
- 7
python.vim View File

@@ -211,20 +211,20 @@ if exists("python_highlight_doctests") && python_highlight_doctests != 0
211 211
 endif
212 212
 
213 213
 " Numbers (ints, longs, floats, complex)
214
-syn match   pythonHexError	"\<0[xX]\x*[g-zG-Z]\x*\>" display
214
+syn match   pythonHexError	"\<0[xX]\x*[g-zG-Z]\x*[lL]\=\>" display
215 215
 
216
-syn match   pythonHexNumber	"\<0[xX]\x\+\>" display
217
-syn match   pythonOctNumber "\<0[oO]\o\+\>" display
218
-syn match   pythonBinNumber "\<0[bB][01]\+\>" display
216
+syn match   pythonHexNumber	"\<0[xX]\x\+[lL]\=\>" display
217
+syn match   pythonOctNumber "\<0[oO]\o\+[lL]\=\>" display
218
+syn match   pythonBinNumber "\<0[bB][01]\+[lL]\=\>" display
219 219
 
220
-syn match   pythonNumber	"\<\d\+[jJ]\=\>" display
220
+syn match   pythonNumber	"\<\d\+[lLjJ]\=\>" display
221 221
 
222 222
 syn match   pythonFloat		"\.\d\+\([eE][+-]\=\d\+\)\=[jJ]\=\>" display
223 223
 syn match   pythonFloat		"\<\d\+[eE][+-]\=\d\+[jJ]\=\>" display
224 224
 syn match   pythonFloat		"\<\d\+\.\d*\([eE][+-]\=\d\+\)\=[jJ]\=" display
225 225
 
226
-syn match   pythonOctError	"\<0[oO]\=\o*[8-9]\d*\>" display
227
-syn match   pythonBinError	"\<0[bB][01]*[2-9]\d*\>" display
226
+syn match   pythonOctError	"\<0[oO]\=\o*[8-9]\d*[lL]\=\>" display
227
+syn match   pythonBinError	"\<0[bB][01]*[2-9]\d*[lL]\=\>" display
228 228
 
229 229
 if exists("python_highlight_builtins") && python_highlight_builtins != 0
230 230
   " Builtin functions, types and objects

+ 7
- 7
python3.0.vim View File

@@ -204,20 +204,20 @@ if exists("python_highlight_doctests") && python_highlight_doctests != 0
204 204
 endif
205 205
 
206 206
 " Numbers (ints, longs, floats, complex)
207
-syn match   pythonHexError	"\<0[xX]\x*[g-zG-Z]\x*[lL]\=\>" display
207
+syn match   pythonHexError	"\<0[xX]\x*[g-zG-Z]\x*\>" display
208 208
 
209
-syn match   pythonHexNumber	"\<0[xX]\x\+[lL]\=\>" display
210
-syn match   pythonOctNumber "\<0[oO]\o\+[lL]\=\>" display
211
-syn match   pythonBinNumber "\<0[bB][01]\+[lL]\=\>" display
209
+syn match   pythonHexNumber	"\<0[xX]\x\+\>" display
210
+syn match   pythonOctNumber "\<0[oO]\o\+\>" display
211
+syn match   pythonBinNumber "\<0[bB][01]\+\>" display
212 212
 
213
-syn match   pythonNumber	"\<\d\+[lLjJ]\=\>" display
213
+syn match   pythonNumber	"\<\d\+[jJ]\=\>" display
214 214
 
215 215
 syn match   pythonFloat		"\.\d\+\([eE][+-]\=\d\+\)\=[jJ]\=\>" display
216 216
 syn match   pythonFloat		"\<\d\+[eE][+-]\=\d\+[jJ]\=\>" display
217 217
 syn match   pythonFloat		"\<\d\+\.\d*\([eE][+-]\=\d\+\)\=[jJ]\=" display
218 218
 
219
-syn match   pythonOctError	"\<0[oO]\=\o*[8-9]\d*[lL]\=\>" display
220
-syn match   pythonBinError	"\<0[bB][01]*[2-9]\d*[lL]\=\>" display
219
+syn match   pythonOctError	"\<0[oO]\=\o*[8-9]\d*\>" display
220
+syn match   pythonBinError	"\<0[bB][01]*[2-9]\d*\>" display
221 221
 
222 222
 if exists("python_highlight_builtins") && python_highlight_builtins != 0
223 223
   " Builtin functions, types and objects

+ 1
- 1
test.py View File

@@ -48,7 +48,7 @@ RuntimeWarning FutureWarning OverflowWarning ImportWarning UnicodeWarning
48 48
 
49 49
 # Numbers
50 50
 
51
-0 0x1f 077 .3 12.34 100L 0j 0j 34.2E-3 0b10 0o77 0xfffffffL
51
+0 0x1f 077 .3 12.34 100L 0j 0j 34.2E-3 0b10 0o77 0xfffffffL 0L
52 52
 
53 53
 # Erroneous numbers
54 54