Skip to content

Commit 9e630ec

Browse files
authored
Merge pull request #24 from dkearns/allow-switched-interpolated-verbatim-string-open-delimiter
Allow @$" to open interpolated verbatim strings
2 parents 58c6919 + 4651e89 commit 9e630ec

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

syntax/cs.vim

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -151,9 +151,8 @@ syn match csInterpolationFormatDel +:+ contained display
151151

152152
syn region csVerbatimString matchgroup=csQuote start=+@"+ end=+"+ skip=+""+ extend contains=csVerbatimQuote,@Spell
153153
syn match csVerbatimQuote +""+ contained
154-
syn match csQuoteError +@$"+he=s+2,me=s+2
155154

156-
syn region csInterVerbString matchgroup=csQuote start=+\$@"+ end=+"+ skip=+""+ extend contains=csInterpolation,csEscapedInterpolation,csSpecialChar,csSpecialError,csUnicodeNumber,csVerbatimQuote,@Spell
155+
syn region csInterVerbString matchgroup=csQuote start=+$@"+ start=+@$"+ end=+"+ skip=+""+ extend contains=csInterpolation,csEscapedInterpolation,csSpecialChar,csSpecialError,csUnicodeNumber,csVerbatimQuote,@Spell
157156

158157
syn region csBracketed matchgroup=csParens start=+(+ end=+)+ extend contained transparent contains=@csAll,csBraced,csBracketed
159158
syn region csBraced matchgroup=csParens start=+{+ end=+}+ extend contained transparent contains=@csAll,csBraced,csBracketed
@@ -195,7 +194,6 @@ hi def link csSpecialError Error
195194
hi def link csSpecialCharError Error
196195
hi def link csString String
197196
hi def link csQuote String
198-
hi def link csQuoteError Error
199197
hi def link csInterpolatedString String
200198
hi def link csVerbatimString String
201199
hi def link csInterVerbString String

test/strings.vader

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -341,11 +341,11 @@ Execute:
341341
AssertEqual 'csVerbatimQuote', SyntaxAt(2, 5)
342342
AssertEqual 'csQuote', SyntaxAt(2, 6)
343343

344-
Given cs (an incorrect prefix (@$ instead of $@)):
345-
@$""
344+
Given cs (a verbatim, interpolated string with alternate open delimiter (@$ instead of $@)):
345+
@$"..."
346346

347347
Execute:
348-
AssertEqual 'csQuoteError', SyntaxAt(1)
349-
AssertEqual 'csQuoteError', SyntaxAt(2)
348+
AssertEqual 'csQuote', SyntaxAt(1)
349+
AssertEqual 'csQuote', SyntaxAt(2)
350350
AssertEqual 'csQuote', SyntaxAt(3)
351-
AssertEqual 'csQuote', SyntaxAt(4)
351+
AssertEqual 'csInterVerbString', SyntaxAt(4)

0 commit comments

Comments
 (0)