Highlight 1..2 according to the current grammar.
This commit is contained in:
parent
81da141b7d
commit
a118bd77ad
@ -172,9 +172,10 @@ syn match rustOctNumber display "\<0o[0-7_]\+\%([iu]\%(8\|16\|32\|64\)\=\)
|
||||
syn match rustBinNumber display "\<0b[01_]\+\%([iu]\%(8\|16\|32\|64\)\=\)\="
|
||||
|
||||
" Special case for numbers of the form "1." which are float literals, unless followed by
|
||||
" an identifier, which makes them integer literals with a method call or field access.
|
||||
" an identifier, which makes them integer literals with a method call or field access,
|
||||
" or by another ".", which makes them integer literals followed by the ".." token.
|
||||
" (This must go first so the others take precedence.)
|
||||
syn match rustFloat display "\<[0-9][0-9_]*\.\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\)\@!"
|
||||
syn match rustFloat display "\<[0-9][0-9_]*\.\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\|\.\)\@!"
|
||||
" To mark a number as a normal float, it must have at least one of the three things integral values don't have:
|
||||
" a decimal point and more numbers; an exponent; and a type suffix.
|
||||
syn match rustFloat display "\<[0-9][0-9_]*\%(\.[0-9][0-9_]*\)\%([eE][+-]\=[0-9_]\+\)\=\(f32\|f64\)\="
|
||||
|
Loading…
x
Reference in New Issue
Block a user