" [1] ECMA TC39: C# Language Specification (WD13Oct01.doc)
if exists("b:current_syntax")
finish
endif
let s:cs_cpo_save = &cpo
set cpo&vim
" type
syn keyword csType bool byte char decimal double float int long object sbyte short string uint ulong ushort void
" storage
syn keyword csStorage class delegate enum interface namespace struct
" repeat / condition / label
syn keyword csRepeat break continue do for foreach goto return while
syn keyword csConditional else if switch
syn keyword csLabel case default
" there's no :: operator in C#
syn match csOperatorError display +::+
" user labels (see [1] 8.6 Statements)
syn match csLabel display +^\s*\I\i*\s*:\([^:]\)\@=+
" modifier
syn keyword csModifier abstract const extern internal override private protected public readonly sealed static virtual volatile
" constant
syn keyword csConstant false null true
" exception
syn keyword csException try catch finally throw
" TODO:
syn keyword csUnspecifiedStatement as base checked event fixed in is lock new operator out params ref sizeof stackalloc this typeof unchecked unsafe using
" TODO:
syn keyword csUnsupportedStatement add remove value
" TODO:
syn keyword csUnspecifiedKeyword explicit implicit
" Contextual Keywords
syn match csContextualStatement /\<yield[[:space:]\n]\+\(return\|break\)/me=s+5
syn match csContextualStatement /\<partial[[:space:]\n]\+\(class\|struct\|interface\)/me=s+7
syn match csContextualStatement /\<\(get\|set\)[[:space:]\n]*{/me=s+3
syn match csContextualStatement /\<where\>[^:]\+:/me=s+5
" Comments
"
" PROVIDES: @csCommentHook
"
" TODO: include strings ?
"
syn keyword csTodo contained TODO FIXME XXX NOTE
syn region csComment start="/\*" end="\*/" contains=@csCommentHook,csTodo,@Spell
syn match csComment "//.*$" contains=@csCommentHook,csTodo,@Spell
" xml markup inside '///' comments
syn cluster xmlRegionHook add=csXmlCommentLeader
syn cluster xmlCdataHook add=csXmlCommentLeader
syn cluster xmlStartTagHook add=csXmlCommentLeader
syn keyword csXmlTag contained Libraries Packages Types Excluded ExcludedTypeName ExcludedLibraryName
syn keyword csXmlTag contained ExcludedBucketName TypeExcluded Type TypeKind TypeSignature AssemblyInfo
syn keyword csXmlTag contained AssemblyName AssemblyPublicKey AssemblyVersion AssemblyCulture Base
syn keyword csXmlTag contained BaseTypeName Interfaces Interface InterfaceName Attributes Attribute
syn keyword csXmlTag contained AttributeName Members Member MemberSignature MemberType MemberValue
syn keyword csXmlTag contained ReturnValue ReturnType Parameters Parameter MemberOfPackage
syn keyword csXmlTag contained ThreadingSafetyStatement Docs devdoc example overload remarks returns summary
syn keyword csXmlTag contained threadsafe value internalonly nodoc exception param permission platnote
syn keyword csXmlTag contained seealso b c i pre sub sup block code note paramref see subscript superscript
syn keyword csXmlTag contained list listheader item term description altcompliant altmember
syn cluster xmlTagHook add=csXmlTag
syn match csXmlCommentLeader +\/\/\/+ contained
syn match csXmlComment +\/\/\/.*$+ contains=csXmlCommentLeader,@csXml,@Spell