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
       "execfile", "file", "help", "intern", "long", "raw_input", "reduce",
8
       "execfile", "file", "help", "intern", "long", "raw_input", "reduce",
9
       "reload", "unichr", "unicode", "xrange";
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
 Revision 2.6.2 (2008-09-22):
16
 Revision 2.6.2 (2008-09-22):
12
 
17
 
13
     - Added "VMSError" exception;
18
     - Added "VMSError" exception;

+ 7
- 7
python.vim View File

211
 endif
211
 endif
212
 
212
 
213
 " Numbers (ints, longs, floats, complex)
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
 syn match   pythonFloat		"\.\d\+\([eE][+-]\=\d\+\)\=[jJ]\=\>" display
222
 syn match   pythonFloat		"\.\d\+\([eE][+-]\=\d\+\)\=[jJ]\=\>" display
223
 syn match   pythonFloat		"\<\d\+[eE][+-]\=\d\+[jJ]\=\>" display
223
 syn match   pythonFloat		"\<\d\+[eE][+-]\=\d\+[jJ]\=\>" display
224
 syn match   pythonFloat		"\<\d\+\.\d*\([eE][+-]\=\d\+\)\=[jJ]\=" display
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
 if exists("python_highlight_builtins") && python_highlight_builtins != 0
229
 if exists("python_highlight_builtins") && python_highlight_builtins != 0
230
   " Builtin functions, types and objects
230
   " Builtin functions, types and objects

+ 7
- 7
python3.0.vim View File

204
 endif
204
 endif
205
 
205
 
206
 " Numbers (ints, longs, floats, complex)
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
 syn match   pythonFloat		"\.\d\+\([eE][+-]\=\d\+\)\=[jJ]\=\>" display
215
 syn match   pythonFloat		"\.\d\+\([eE][+-]\=\d\+\)\=[jJ]\=\>" display
216
 syn match   pythonFloat		"\<\d\+[eE][+-]\=\d\+[jJ]\=\>" display
216
 syn match   pythonFloat		"\<\d\+[eE][+-]\=\d\+[jJ]\=\>" display
217
 syn match   pythonFloat		"\<\d\+\.\d*\([eE][+-]\=\d\+\)\=[jJ]\=" display
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
 if exists("python_highlight_builtins") && python_highlight_builtins != 0
222
 if exists("python_highlight_builtins") && python_highlight_builtins != 0
223
   " Builtin functions, types and objects
223
   " Builtin functions, types and objects

+ 1
- 1
test.py View File

48
 
48
 
49
 # Numbers
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
 # Erroneous numbers
53
 # Erroneous numbers
54
 
54