diff options
author | Adam Stankiewicz <sheerun@sher.pl> | 2020-12-29 19:44:40 +0100 |
---|---|---|
committer | Adam Stankiewicz <sheerun@sher.pl> | 2020-12-29 19:44:40 +0100 |
commit | 95d82fdb668b746ac100a8b7d2aca38038150707 (patch) | |
tree | 19f2e80acbab5efe1d35630faafb5e24d7230fd8 /syntax/cs.vim | |
parent | 73c518717741fb3ebb6822645d38f37ffae7c19b (diff) | |
download | vim-polyglot-95d82fdb668b746ac100a8b7d2aca38038150707.tar.gz vim-polyglot-95d82fdb668b746ac100a8b7d2aca38038150707.zip |
Update
Diffstat (limited to 'syntax/cs.vim')
-rw-r--r-- | syntax/cs.vim | 39 |
1 files changed, 21 insertions, 18 deletions
diff --git a/syntax/cs.vim b/syntax/cs.vim index 362c80f4..7d758eb3 100644 --- a/syntax/cs.vim +++ b/syntax/cs.vim @@ -7,7 +7,7 @@ endif " Maintainer: Nick Jensen <nickspoon@gmail.com> " Former Maintainers: Anduin Withers <awithers@anduin.com> " Johannes Zellner <johannes@zellner.org> -" Last Change: 2020-01-27 +" Last Change: 2020-11-23 " Filenames: *.cs " License: Vim (see :h license) " Repository: https://github.com/nickspoons/vim-cs @@ -22,7 +22,6 @@ endif let s:save_cpo = &cpoptions set cpoptions&vim - syn keyword csType bool byte char decimal double float int long object sbyte short string T uint ulong ushort var void dynamic syn keyword csStorage delegate enum interface namespace struct syn keyword csRepeat break continue do for foreach goto return while @@ -31,7 +30,7 @@ syn keyword csLabel case default syn match csOperatorError display +::+ syn match csGlobal display +global::+ " user labels (see [1] 8.6 Statements) -syn match csLabel display +^\s*\I\i*\s*:\([^:]\)\@=+ +syn match csLabel display +^\s*\I\i*\s*:\%([^:]\)\@=+ syn keyword csModifier abstract const extern internal override private protected public readonly sealed static virtual volatile syn keyword csConstant false null true syn keyword csException try catch finally throw when @@ -43,9 +42,10 @@ syn keyword csUnsupportedStatement add remove value 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 /\<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 /\<\%(get\|set\)\s*=>/me=s+3 syn match csContextualStatement /\<where\>[^:]\+:/me=s+5 " Operators @@ -105,7 +105,7 @@ hi def link xmlRegion Comment syn spell default " [1] 9.5 Pre-processing directives -syn region csPreCondit start="^\s*#\s*\(define\|undef\|if\|elif\|else\|endif\|line\|error\|warning\)" skip="\\$" end="$" contains=csComment keepend +syn region csPreCondit start="^\s*#\s*\%(define\|undef\|if\|elif\|else\|endif\|line\|error\|warning\|pragma\)\>" skip="\\$" end="$" contains=csComment keepend syn region csRegion matchgroup=csPreCondit start="^\s*#\s*region.*$" end="^\s*#\s*endregion" transparent fold contains=TOP syn region csSummary start="^\s*/// <summary" end="^\%\(\s*///\)\@!" transparent fold keepend @@ -124,25 +124,27 @@ syn match csSpecialError "\\." contained syn match csSpecialCharError "[^']" contained " [1] 9.4.4.4 Character literals syn match csSpecialChar +\\["\\'0abfnrtvx]+ contained display +syn match csUnicodeNumber +\\x\x\{2,4}+ contained contains=csUnicodeSpecifier display syn match csUnicodeNumber +\\u\x\{4}+ contained contains=csUnicodeSpecifier display syn match csUnicodeNumber +\\U\x\{8}+ contained contains=csUnicodeSpecifier display syn match csUnicodeSpecifier +\\[uU]+ contained display syn region csString matchgroup=csQuote start=+"+ end=+"+ end=+$+ extend contains=csSpecialChar,csSpecialError,csUnicodeNumber,@Spell -syn match csCharacter "'[^']*'" contains=csSpecialChar,csSpecialCharError display +syn match csCharacter "'[^']*'" contains=csSpecialChar,csSpecialCharError,csUnicodeNumber display syn match csCharacter "'\\''" contains=csSpecialChar display syn match csCharacter "'[^\\]'" display syn match csNumber "\<0[0-7]*[lL]\=\>" display -syn match csNumber "\<0[xX]\x\+[lL]\=\>" display -syn match csNumber "\<\d\+[lL]\=\>" display -syn match csNumber "\<\d\+\.\d*\%\([eE][-+]\=\d\+\)\=[fFdD]\=" display -syn match csNumber "\.\d\+\%\([eE][-+]\=\d\+\)\=[fFdD]\=" display -syn match csNumber "\<\d\+[eE][-+]\=\d\+[fFdD]\=\>" display -syn match csNumber "\<\d\+\%\([eE][-+]\=\d\+\)\=[fFdD]\>" display +syn match csNumber "\<0[xX][[:xdigit:]_]\+[lL]\=\>" display +syn match csNumber "\<0[bB][01_]\+[lL]\=\>" display +syn match csNumber "\<[[:digit:]_]\+[lL]\=\>" display +syn match csNumber "\<[[:digit:]_]\+\.[[:digit:]_]*\%\([eE][-+]\=[[:digit:]_]\+\)\=[fFdDmM]\=" display +syn match csNumber "\.[[:digit:]_]\+\%\([eE][-+]\=[[:digit:]_]\+\)\=[fFdDmM]\=" display +syn match csNumber "\<[[:digit:]_]\+[eE][-+]\=[[:digit:]_]\+[fFdDmM]\=\>" display +syn match csNumber "\<[[:digit:]_]\+\%\([eE][-+]\=[[:digit:]_]\+\)\=[fFdDmM]\>" display -syn region csInterpolatedString matchgroup=csQuote start=+\$"+ end=+"+ end=+$+ extend contains=csInterpolation,csEscapedInterpolation,csSpecialChar,csSpecialError,csUnicodeNumber,@Spell +syn region csInterpolatedString matchgroup=csQuote start=+\$"+ end=+"+ extend contains=csInterpolation,csEscapedInterpolation,csSpecialChar,csSpecialError,csUnicodeNumber,@Spell -syn region csInterpolation matchgroup=csInterpolationDelimiter start=+{+ end=+}+ keepend contained contains=@csAll,csBracketed,csInterpolationAlign,csInterpolationFormat +syn region csInterpolation matchgroup=csInterpolationDelimiter start=+{+ end=+}+ keepend contained contains=@csAll,csBraced,csBracketed,csInterpolationAlign,csInterpolationFormat syn match csEscapedInterpolation "{{" transparent contains=NONE display syn match csEscapedInterpolation "}}" transparent contains=NONE display syn region csInterpolationAlign matchgroup=csInterpolationAlignDel start=+,+ end=+}+ end=+:+me=e-1 contained contains=csNumber,csConstant,csCharacter,csParens,csOpSymbols,csString,csBracketed display @@ -156,9 +158,10 @@ syn match csQuoteError +@$"+he=s+2,me=s+2 syn region csInterVerbString matchgroup=csQuote start=+\$@"+ end=+"+ skip=+""+ extend contains=csInterpolation,csEscapedInterpolation,csSpecialChar,csSpecialError,csUnicodeNumber,csVerbatimQuote,@Spell -syn region csBracketed matchgroup=csParens start=+(+ end=+)+ contained transparent contains=@csAll,csBracketed +syn region csBracketed matchgroup=csParens start=+(+ end=+)+ extend contained transparent contains=@csAll,csBraced,csBracketed +syn region csBraced matchgroup=csParens start=+{+ end=+}+ extend contained transparent contains=@csAll,csBraced,csBracketed -syn cluster csAll contains=csCharacter,csClassType,csComment,csContextualStatement,csEndColon,csInterpolatedString,csIsType,csLabel,csLogicSymbols,csNewType,csConstant,csNumber,csOpSymbols,csOperatorError,csParens,csPreCondit,csRegion,csString,csSummary,csType,csUnicodeNumber,csUnicodeSpecifier,csVerbatimString,csUserType,csUserIdentifier,csUserInterface,csUserMethod +syn cluster csAll contains=csCharacter,csClassType,csComment,csContextualStatement,csEndColon,csIsType,csLabel,csLogicSymbols,csNewType,csConstant,csNumber,csOpSymbols,csOperatorError,csParens,csPreCondit,csRegion,csString,csSummary,csType,csUnicodeNumber,csUnicodeSpecifier,csInterpolatedString,csVerbatimString,csInterVerbString,csUserType,csUserIdentifier,csUserInterface,csUserMethod " The default highlighting. hi def link csType Type |