Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Vim syntax file to include s' on us' and `is' literal #20922

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/etc/vim/syntax/rust.vim
Original file line number Diff line number Diff line change
Expand Up @@ -139,10 +139,10 @@ syn region rustAttribute start="#!\?\[" end="\]" contains=rustString,rustDe
syn region rustDerive start="derive(" end=")" contained contains=rustTrait

" Number literals
syn match rustDecNumber display "\<[0-9][0-9_]*\%([iu]\%(8\|16\|32\|64\)\=\)\="
syn match rustHexNumber display "\<0x[a-fA-F0-9_]\+\%([iu]\%(8\|16\|32\|64\)\=\)\="
syn match rustOctNumber display "\<0o[0-7_]\+\%([iu]\%(8\|16\|32\|64\)\=\)\="
syn match rustBinNumber display "\<0b[01_]\+\%([iu]\%(8\|16\|32\|64\)\=\)\="
syn match rustDecNumber display "\<[0-9][0-9_]*\%([iu]s?\%(8\|16\|32\|64\)\=\)\="
syn match rustHexNumber display "\<0x[a-fA-F0-9_]\+\%([iu]s?\%(8\|16\|32\|64\)\=\)\="
syn match rustOctNumber display "\<0o[0-7_]\+\%([iu]s?\%(8\|16\|32\|64\)\=\)\="
syn match rustBinNumber display "\<0b[01_]\+\%([iu]s?\%(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,
Expand Down