comparison runtime/syntax/c.vim @ 4073:e362db8b2d7b

Update runtime files.
author Bram Moolenaar <bram@vim.org>
date Wed, 30 Jan 2013 14:18:00 +0100
parents 1b584a6f446c
children 7ffc704cb7c1
comparison
equal deleted inserted replaced
4072:37438facb5eb 4073:e362db8b2d7b
1 " Vim syntax file 1 " Vim syntax file
2 " Language: C 2 " Language: C
3 " Maintainer: Bram Moolenaar <Bram@vim.org> 3 " Maintainer: Bram Moolenaar <Bram@vim.org>
4 " Last Change: 2012 May 03 4 " Last Change: 2012 Dec 14
5 5
6 " Quit when a (custom) syntax file was already loaded 6 " Quit when a (custom) syntax file was already loaded
7 if exists("b:current_syntax") 7 if exists("b:current_syntax")
8 finish 8 finish
9 endif 9 endif
91 endif 91 endif
92 endif 92 endif
93 93
94 " This should be before cErrInParen to avoid problems with #define ({ xxx }) 94 " This should be before cErrInParen to avoid problems with #define ({ xxx })
95 if exists("c_curly_error") 95 if exists("c_curly_error")
96 syntax match cCurlyError "}" 96 syn match cCurlyError "}"
97 syntax region cBlock start="{" end="}" contains=ALLBUT,cBadBlock,cCurlyError,@cParenGroup,cErrInParen,cCppParen,cErrInBracket,cCppBracket,cCppString,@Spell fold 97 syn region cBlock start="{" end="}" contains=ALLBUT,cBadBlock,cCurlyError,@cParenGroup,cErrInParen,cCppParen,cErrInBracket,cCppBracket,cCppString,@Spell fold
98 else 98 else
99 syntax region cBlock start="{" end="}" transparent fold 99 syn region cBlock start="{" end="}" transparent fold
100 endif 100 endif
101 101
102 "catch errors caused by wrong parenthesis and brackets 102 "catch errors caused by wrong parenthesis and brackets
103 " also accept <% for {, %> for }, <: for [ and :> for ] (C99) 103 " also accept <% for {, %> for }, <: for [ and :> for ] (C99)
104 " But avoid matching <::. 104 " But avoid matching <::.
105 syn cluster cParenGroup contains=cParenError,cIncluded,cSpecial,cCommentSkip,cCommentString,cComment2String,@cCommentGroup,cCommentStartError,cUserCont,cUserLabel,cBitField,cOctalZero,@cCppOutInGroup,cFormat,cNumber,cFloat,cOctal,cOctalError,cNumbersCom 105 syn cluster cParenGroup contains=cParenError,cIncluded,cSpecial,cCommentSkip,cCommentString,cComment2String,@cCommentGroup,cCommentStartError,cUserLabel,cBitField,cOctalZero,@cCppOutInGroup,cFormat,cNumber,cFloat,cOctal,cOctalError,cNumbersCom
106 if exists("c_no_curly_error") 106 if exists("c_no_curly_error")
107 syn region cParen transparent start='(' end=')' end='}'me=s-1 contains=ALLBUT,cBlock,@cParenGroup,cCppParen,cCppString,@Spell 107 syn region cParen transparent start='(' end=')' end='}'me=s-1 contains=ALLBUT,cBlock,@cParenGroup,cCppParen,cCppString,@Spell
108 " cCppParen: same as cParen but ends at end-of-line; used in cDefine 108 " cCppParen: same as cParen but ends at end-of-line; used in cDefine
109 syn region cCppParen transparent start='(' skip='\\$' excludenl end=')' end='$' contained contains=ALLBUT,@cParenGroup,cParen,cString,@Spell 109 syn region cCppParen transparent start='(' skip='\\$' excludenl end=')' end='$' contained contains=ALLBUT,@cParenGroup,cParen,cString,@Spell
110 syn match cParenError display ")" 110 syn match cParenError display ")"