Browse Source

Fixed hex error display

Dmitry Vasiliev 15 years ago
parent
commit
5cfa952032
2 changed files with 3 additions and 2 deletions
  1. 2
    1
      python.vim
  2. 1
    1
      test.py

+ 2
- 1
python.vim View File

209
 endif
209
 endif
210
 
210
 
211
 " Numbers (ints, longs, floats, complex)
211
 " Numbers (ints, longs, floats, complex)
212
+syn match   pythonHexError	"\<0[xX]\x*[g-zG-Z]\x*[lL]\=\>" display
213
+
212
 syn match   pythonHexNumber	"\<0[xX]\x\+[lL]\=\>" display
214
 syn match   pythonHexNumber	"\<0[xX]\x\+[lL]\=\>" display
213
 syn match   pythonOctNumber "\<0[oO]\o\+[lL]\=\>" display
215
 syn match   pythonOctNumber "\<0[oO]\o\+[lL]\=\>" display
214
 syn match   pythonBinNumber "\<0[bB][01]\+[lL]\=\>" display
216
 syn match   pythonBinNumber "\<0[bB][01]\+[lL]\=\>" display
220
 syn match   pythonFloat		"\<\d\+\.\d*\([eE][+-]\=\d\+\)\=[jJ]\=" display
222
 syn match   pythonFloat		"\<\d\+\.\d*\([eE][+-]\=\d\+\)\=[jJ]\=" display
221
 
223
 
222
 syn match   pythonOctError	"\<0[oO]\=\o*[8-9]\d*[lL]\=\>" display
224
 syn match   pythonOctError	"\<0[oO]\=\o*[8-9]\d*[lL]\=\>" display
223
-syn match   pythonHexError	"\<0[xX]\x*[g-zG-Z]\x*[lL]\=\>" display
224
 syn match   pythonBinError	"\<0[bB][01]*[2-9]\d*[lL]\=\>" display
225
 syn match   pythonBinError	"\<0[bB][01]*[2-9]\d*[lL]\=\>" display
225
 
226
 
226
 if exists("python_highlight_builtins") && python_highlight_builtins != 0
227
 if exists("python_highlight_builtins") && python_highlight_builtins != 0

+ 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
51
+0 0x1f 077 .3 12.34 100L 0j 0j 34.2E-3 0b10 0o77 0xfffffffL
52
 
52
 
53
 # Erroneous numbers
53
 # Erroneous numbers
54
 
54