Skip to content

Commit 9bd0e40

Browse files
committed
Number may not start with underscore
1 parent 12d0d60 commit 9bd0e40

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

syntax/python.vim

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -254,10 +254,10 @@ endif
254254
syn match pythonHexNumber "\<0[xX][0-9a-fA-F_]*[0-9a-fA-F][0-9a-fA-F_]*[lL]\=\>" display
255255
syn match pythonOctNumber "\<0[oO][0-7_]*[0-7][0-7_]*[lL]\=\>" display
256256
syn match pythonBinNumber "\<0[bB][01_]*[01][01_]*[lL]\=\>" display
257-
syn match pythonNumber "\<[0-9_]*[0-9][0-9_]*[lLjJ]\=\>" display
257+
syn match pythonNumber "\<[0-9][0-9_]*[lLjJ]\=\>" display
258258
syn match pythonFloat "\.[0-9_]*[0-9][0-9_]*\([eE][+-]\=[0-9_]*[0-9][0-9_]*\)\=[jJ]\=\>" display
259-
syn match pythonFloat "\<[0-9_]*[0-9][0-9_]*[eE][+-]\=[0-9_]\+[jJ]\=\>" display
260-
syn match pythonFloat "\<[0-9_]*[0-9][0-9_]*\.[0-9_]*\([eE][+-]\=[0-9_]*[0-9][0-9_]*\)\=[jJ]\=" display
259+
syn match pythonFloat "\<[0-9][0-9_]*[eE][+-]\=[0-9_]\+[jJ]\=\>" display
260+
syn match pythonFloat "\<[0-9][0-9_]*\.[0-9_]*\([eE][+-]\=[0-9_]*[0-9][0-9_]*\)\=[jJ]\=" display
261261
syn match pythonOctError "\<0[oO]\=[0-7_]*[8-9][0-9_]*[lL]\=\>" display
262262
syn match pythonBinError "\<0[bB][01_]*[2-9][0-9_]*[lL]\=\>" display
263263

0 commit comments

Comments
 (0)