Skip to content

Commit

Permalink
auto merge of #5807 : klutzy/rust/vim-inner-doc, r=brson
Browse files Browse the repository at this point in the history
Follow-up of #5760:
Add syntax highlight for `/*! doc */` or `//! doc`.
  • Loading branch information
bors committed Apr 10, 2013
2 parents 92e265c + 7a1394d commit ec3cfae
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/etc/vim/syntax/rust.vim
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,11 @@ syn match rustFloat display "\<[0-9][0-9_]*\.[0-9_]\+\%([eE][+-]\=[0-9
syn match rustLifetime display "\'\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\)\%([^[:cntrl:][:punct:][:space:]]\|_\)*"
syn match rustCharacter "'\([^'\\]\|\\\(['nrt\\\"]\|x\x\{2}\|u\x\{4}\|U\x\{8}\)\)'"

syn region rustCommentDoc start="/\*\*" end="\*/"
syn region rustCommentDoc start="///" skip="\\$" end="$" keepend
syn region rustCommentDoc start="/\*[\*!]" end="\*/"
syn region rustCommentDoc start="//[/!]" skip="\\$" end="$" keepend
syn match rustComment "/\*\*/"
syn region rustComment start="/\*\([^\*]\|$\)" end="\*/" contains=rustTodo
syn region rustComment start="//\([^/]\|$\)" skip="\\$" end="$" contains=rustTodo keepend
syn region rustComment start="/\*\([^\*!]\|$\)" end="\*/" contains=rustTodo
syn region rustComment start="//\([^/!]\|$\)" skip="\\$" end="$" contains=rustTodo keepend

syn keyword rustTodo contained TODO FIXME XXX NB

Expand Down

0 comments on commit ec3cfae

Please sign in to comment.