Skip to content

Commit 60630ef

Browse files
rhysdchris-morgan
authored andcommitted
Highlight label after break/continue (#351)
Fixes #159.
1 parent 7f37877 commit 60630ef

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

syntax/rust.vim

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,7 @@ syn region rustGenericLifetimeCandidate display start=/\%(<\|,\s*\)\@<='/ end=/[
205205
"rustLifetime must appear before rustCharacter, or chars will get the lifetime highlighting
206206
syn match rustLifetime display "\'\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\)\%([^[:cntrl:][:punct:][:space:]]\|_\)*"
207207
syn match rustLabel display "\'\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\)\%([^[:cntrl:][:punct:][:space:]]\|_\)*:"
208+
syn match rustLabel display "\%(\<\%(break\|continue\)\s*\)\@<=\'\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\)\%([^[:cntrl:][:punct:][:space:]]\|_\)*"
208209
syn match rustCharacterInvalid display contained /b\?'\zs[\n\r\t']\ze'/
209210
" The groups negated here add up to 0-255 but nothing else (they do not seem to go beyond ASCII).
210211
syn match rustCharacterInvalidUnicode display contained /b'\zs[^[:cntrl:][:graph:][:alnum:][:space:]]\ze'/

0 commit comments

Comments
 (0)