diff options
author | Bram Moolenaar <Bram@vim.org> | 2013-10-06 14:22:40 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2013-10-06 14:22:40 +0200 |
commit | b133208080a6dde56e930b5069061f03ea7320ff (patch) | |
tree | be1324e7563498fc82c0d7f5c58aa96a0c15476d /runtime/syntax/d.vim | |
parent | 4c7cb6b88446fef3660bceaf465419b3c3958f54 (diff) | |
download | vim-b133208080a6dde56e930b5069061f03ea7320ff.zip |
Runtime file updates.
Diffstat (limited to 'runtime/syntax/d.vim')
-rw-r--r-- | runtime/syntax/d.vim | 31 |
1 files changed, 18 insertions, 13 deletions
diff --git a/runtime/syntax/d.vim b/runtime/syntax/d.vim index 65408643d..52c83bf91 100644 --- a/runtime/syntax/d.vim +++ b/runtime/syntax/d.vim @@ -2,8 +2,8 @@ " " Language: D " Maintainer: Jesse Phillips <Jesse.K.Phillips+D@gmail.com> -" Last Change: 2013 May 21 -" Version: 0.25 +" Last Change: 2013 October 5 +" Version: 0.26 " " Contributors: " - Jason Mills: original Maintainer @@ -158,7 +158,7 @@ syn match dStatement "\<__traits\s*([_a-zA-Z][_a-zA-Z0-9]*\>"he=s+8 contains= " Pragma Statement syn match dPragma "\<pragma\>" -syn match dPragma "\<pragma\s*([_a-zA-Z][_a-zA-Z0-9]*\>"he=s+8 contains=dPragmaIdentifier +syn match dPragma "\<pragma\s*([_a-zA-Z][_a-zA-Z0-9]*\>"he=s+6 contains=dPragmaIdentifier " Necessary to highlight C++ in extern modifiers. syn match dExternIdentifier "C\(++\)\?" contained @@ -168,16 +168,18 @@ syn match dExternal "\<extern\>" syn match dExtern "\<extern\s*([_a-zA-Z][_a-zA-Z0-9\+]*\>"he=s+6 contains=dExternIdentifier " Make import a region to prevent highlighting keywords -syn region dImport start="import" end=";" contains=dExternal,@dComment +syn region dImport start="import\_s" end=";" contains=dExternal,@dComment " Make module a region to prevent highlighting keywords -syn region dImport start="module" end=";" contains=dExternal,@dComment +syn region dImport start="module\_s" end=";" contains=dExternal,@dComment " dTokens is used by the token string highlighting syn cluster dTokens contains=dExternal,dConditional,dBranch,dRepeat,dBoolean syn cluster dTokens add=dConstant,dTypedef,dStructure,dOperator,dOpOverload syn cluster dTokens add=dType,dDebug,dExceptions,dScopeDecl,dStatement syn cluster dTokens add=dStorageClass,dPragma,dAssert,dAnnotation,dEnum +syn cluster dTokens add=dParenString,dBrackString,dAngleString,dCurlyString +syn cluster dTokens add=dTokenString,dDelimString,dHereString " Create a match for parameter lists to identify storage class syn region paramlist start="(" end=")" contains=@dTokens @@ -192,6 +194,9 @@ syn cluster dTokens add=dUserLabel,dLabel " Comments " +syn match dCommentError display "\*/" +syn match dNestedCommentError display "+/" + syn keyword dTodo contained TODO FIXME TEMP REFACTOR REVIEW HACK BUG XXX syn match dCommentStar contained "^\s*\*[^/]"me=e-1 syn match dCommentStar contained "^\s*\*$" @@ -201,15 +206,12 @@ if exists("d_comment_strings") syn region dBlockCommentString contained start=+"+ end=+"+ end=+\*/+me=s-1,he=s-1 contains=dCommentStar,dUnicode,dEscSequence,@Spell syn region dNestedCommentString contained start=+"+ end=+"+ end="+"me=s-1,he=s-1 contains=dCommentPlus,dUnicode,dEscSequence,@Spell syn region dLineCommentString contained start=+"+ end=+$\|"+ contains=dUnicode,dEscSequence,@Spell - syn region dBlockComment start="/\*" end="\*/" contains=dBlockCommentString,dTodo,@Spell fold - syn region dNestedComment start="/+" end="+/" contains=dNestedComment,dNestedCommentString,dTodo,@Spell fold - syn match dLineComment "//.*" contains=dLineCommentString,dTodo,@Spell -else - syn region dBlockComment start="/\*" end="\*/" contains=dBlockCommentString,dTodo,@Spell fold - syn region dNestedComment start="/+" end="+/" contains=dNestedComment,dNestedCommentString,dTodo,@Spell fold - syn match dLineComment "//.*" contains=dLineCommentString,dTodo,@Spell endif +syn region dBlockComment start="/\*" end="\*/" contains=dBlockCommentString,dTodo,dCommentStartError,@Spell fold +syn region dNestedComment start="/+" end="+/" contains=dNestedComment,dNestedCommentString,dTodo,@Spell fold +syn match dLineComment "//.*" contains=dLineCommentString,dTodo,@Spell + hi link dLineCommentString dBlockCommentString hi link dBlockCommentString dString hi link dNestedCommentString dString @@ -249,7 +251,7 @@ syn region dRawString start=+`+ end=+`[cwd]\=+ contains=@Spell syn region dRawString start=+r"+ end=+"[cwd]\=+ contains=@Spell syn region dHexString start=+x"+ end=+"[cwd]\=+ contains=@Spell syn region dDelimString start=+q"\z(.\)+ end=+\z1"+ contains=@Spell -syn region dHereString start=+q"\z(\I\i*\)\n+ end=+\n\z1"+ contains=@Spell +syn region dHereString start=+q"\z(\I\i*\)\n+ end=+^\z1"+ contains=@Spell " Nesting delimited string contents " @@ -368,6 +370,9 @@ hi def link dType Type hi def link dLineComment Comment hi def link dBlockComment Comment hi def link dNestedComment Comment +hi def link dCommentError Error +hi def link dNestedCommentError Error +hi def link dCommentStartError Error hi def link dExternal Include hi def link dAnnotation PreProc hi def link dSharpBang PreProc |