File tree 1 file changed +3
-2
lines changed
1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -172,9 +172,10 @@ syn match rustOctNumber display "\<0o[0-7_]\+\%([iu]\%(8\|16\|32\|64\)\=\)
172
172
syn match rustBinNumber display " \< 0b[01_]\+\% ([iu]\% (8\| 16\| 32\| 64\)\=\)\= "
173
173
174
174
" Special case for numbers of the form "1." which are float literals, unless followed by
175
- " an identifier, which makes them integer literals with a method call or field access.
175
+ " an identifier, which makes them integer literals with a method call or field access,
176
+ " or by another ".", which makes them integer literals followed by the ".." token.
176
177
" (This must go first so the others take precedence.)
177
- syn match rustFloat display " \< [0-9][0-9_]*\.\% ([^[:cntrl:][:space:][:punct:][:digit:]]\| _\)\@ !"
178
+ syn match rustFloat display " \< [0-9][0-9_]*\.\% ([^[:cntrl:][:space:][:punct:][:digit:]]\| _\|\.\ )\@ !"
178
179
" To mark a number as a normal float, it must have at least one of the three things integral values don't have:
179
180
" a decimal point and more numbers; an exponent; and a type suffix.
180
181
syn match rustFloat display " \< [0-9][0-9_]*\% (\. [0-9][0-9_]*\)\% ([eE][+-]\= [0-9_]\+\)\=\( f32\| f64\)\= "
You can’t perform that action at this time.
0 commit comments