Fixed vim highlighting for \' (and other) escapes in char literals

This commit is contained in:
Jacob Parker 2012-03-25 16:26:48 -04:00
parent 8462c6c831
commit f5c91d10dd
1 changed files with 3 additions and 2 deletions

View File

@ -46,9 +46,10 @@ syn match rustFloat display contained "\.\d\+\(e[-+]\=\d\+\)\=[fl]\=\>"
"floating point number, without dot, with exponent
syn match rustFloat display contained "\d\+e[-+]\=\d\+[fl]\=\>"
syn match rustCharacter "'[^']*'"
syn case match
syn match rustCharacter "'\([^'\\]\|\\\(['nrt\\\"]\|x\x\{2}\|u\x\{4}\|U\x\{8}\)\)'"
syn region rustComment start="/\*" end="\*/" contains=rustComment
syn region rustComment start="//" skip="\\$" end="$" keepend