Skip to content

Commit

Permalink
Highlight new operator with csKeywordOperator group
Browse files Browse the repository at this point in the history
  • Loading branch information
dkearns committed Jan 2, 2022
1 parent 387125a commit 4bd0a61
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion syntax/cs.vim
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ hi def link csException Exception
hi def link csUnspecifiedStatement Statement
hi def link csUnsupportedStatement Statement
hi def link csUnspecifiedKeyword Keyword
hi def link csNew Statement
hi def link csNew csKeywordOperator
hi def link csLinq Statement
hi def link csIsAs csKeywordOperator
hi def link csAsyncModifier csModifier
Expand Down
6 changes: 6 additions & 0 deletions test/operators.vader
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,12 @@ Given cs (unchecked operator):
Execute:
AssertEqual 'csKeywordOperator', SyntaxOf('unchecked')

Given cs (new operator):
var foo = new Bar();

Execute:
AssertEqual 'csNew', SyntaxOf('new')

Given cs (stackalloc operator):
Span<byte> foobar = stackalloc byte[42];

Expand Down

0 comments on commit 4bd0a61

Please sign in to comment.