]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
runtime(vim): Update base-syntax, highlight literal string quote escape
authorDoug Kearns <dougkearns@gmail.com>
Fri, 10 Jan 2025 19:02:17 +0000 (20:02 +0100)
committerChristian Brabandt <cb@256bit.org>
Fri, 10 Jan 2025 19:02:17 +0000 (20:02 +0100)
Match the '' escape sequence in literal strings.  These were previously
ending the current string and starting another concatenated literal
string.

closes: #16415

Signed-off-by: Christian Brabandt <cb@256bit.org>
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
runtime/syntax/generator/vim.vim.base
runtime/syntax/testdir/dumps/vim_expr_00.dump
runtime/syntax/testdir/dumps/vim_expr_01.dump
runtime/syntax/testdir/dumps/vim_expr_02.dump
runtime/syntax/testdir/dumps/vim_expr_03.dump
runtime/syntax/testdir/dumps/vim_expr_04.dump
runtime/syntax/testdir/dumps/vim_expr_05.dump [new file with mode: 0644]
runtime/syntax/testdir/input/vim_expr.vim
runtime/syntax/vim.vim

index 28342680dbce5de10c712a08c7d2c6056a8b435d..b3bc5ca6f72c32577d566e9e35129a00a5d9711c 100644 (file)
@@ -558,19 +558,21 @@ syn region        vimPatSepZone   oneline   contained   matchgroup=vimPatSepZ start="\\%\
 syn region     vimPatRegion    contained transparent matchgroup=vimPatSepR start="\\[z%]\=(" end="\\)" contains=@vimSubstList oneline
 syn match      vimNotPatSep    contained       "\\\\"
 syn cluster    vimStringGroup  contains=vimEscape,vimEscapeBrace,vimPatSep,vimNotPatSep,vimPatSepErr,vimPatSepZone,@Spell
-syn region     vimString       oneline keepend start=+[^a-zA-Z>\\@]"+lc=1 skip=+\\\\\|\\"+ matchgroup=vimStringEnd end=+"+     contains=@vimStringGroup extend
-syn region     vimString       oneline keepend start=+[^a-zA-Z>\\@]'+lc=1 end=+'+ extend
+syn region     vimString       oneline keepend matchgroup=vimString start=+[^a-zA-Z>\\@]"+lc=1 skip=+\\\\\|\\"+ matchgroup=vimStringEnd end=+"+        contains=@vimStringGroup extend
+syn region     vimString       oneline matchgroup=vimString start=+[^a-zA-Z>\\@]'+lc=1 end=+'+ contains=vimQuoteEscape extend
 "syn region    vimString       oneline start="\s/\s*\A"lc=1 skip="\\\\\|\\+" end="/"   contains=@vimStringGroup  " see tst45.vim
 syn match      vimString       contained       +"[^"]*\\$+     skipnl nextgroup=vimStringCont
 syn match      vimStringCont   contained       +\(\\\\\|.\)\{-}[^\\]"+
+
 syn match      vimEscape       contained       "\\."
 " syn match    vimEscape       contained       +\\[befnrt\"]+
 syn match      vimEscape       contained       "\\\o\{1,3}\|\\[xX]\x\{1,2}\|\\u\x\{1,4}\|\\U\x\{1,8}"
 syn match      vimEscape       contained       "\\<" contains=vimNotation
 syn match      vimEscape       contained       "\\<\*[^>]*>\=>"
+syn match      vimQuoteEscape  contained       "''"
 
-syn region     vimString       oneline start=+$'+ skip=+''+ end=+'+ contains=@vimStringInterpolation extend
-syn region     vimString       oneline start=+$"+ end=+"+ contains=@vimStringGroup,@vimStringInterpolation extend
+syn region     vimString       oneline matchgroup=vimString start=+$'+ skip=+''+ end=+'+ contains=vimQuoteEscape,@vimStringInterpolation  extend
+syn region     vimString       oneline matchgroup=vimString start=+$"+           end=+"+ contains=@vimStringGroup,@vimStringInterpolation extend
 syn region     vimStringInterpolationExpr  oneline contained matchgroup=vimSep start=+{+ end=+}+ contains=@vimExprList
 syn match      vimStringInterpolationBrace contained "{{"
 syn match      vimStringInterpolationBrace contained "}}"
@@ -1392,6 +1394,7 @@ if !exists("skip_vim_syntax_inits")
  hi def link vimPattern        Type
  hi def link vimPlainMark      vimMark
  hi def link vimPlainRegister  vimRegister
+ hi def link vimQuoteEscape    vimEscape
  hi def link vimRegister       SpecialChar
  hi def link vimScriptDelim    Comment
  hi def link vimSearchDelim    Statement
index 899b73cd91a6cc6648f56ed9c66b8aa62b5dda3f..b8ea410bc4a8fb40654a31ef53366366e000a603 100644 (file)
@@ -1,6 +1,6 @@
 >"+0#0000e05#ffffff0| |S|t|r|i|n|g| +0#0000000&@66
 @75
-|e+0#af5f00255&|c|h|o| +0#0000000&|'+0#e000002&|I|t|'@1|s| |a| |s|t|r|i|n|g|'| +0#0000000&@53
+|e+0#af5f00255&|c|h|o| +0#0000000&|'+0#e000002&|I|t|'+0#e000e06&@1|s+0#e000002&| |a| |s|t|r|i|n|g|'| +0#0000000&@53
 |e+0#af5f00255&|c|h|o| +0#0000000&|'+0#e000002&|t|a|b|:| |\|t|,| |n|e|w| |l|i|n|e|:| |\|n|,| |b|a|c|k|s|l|a|s|h|:| |\@1|'| +0#0000000&@31
 |e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|t|a|b|:| |\+0#e000e06&|t|,+0#e000002&| |n|e|w| |l|i|n|e|:| |\+0#e000e06&|n|,+0#e000002&| |b|a|c|k|s|l|a|s|h|:| |\+0#e000e06&@1|"+0#e000002&| +0#0000000&@31
 @75
index 81a4e21566c05ec07ad44e34f1306c56aa0ef3f2..7dfc6d4ecb10f50c6290b35d958c5a201170f81d 100644 (file)
@@ -12,9 +12,9 @@
 |e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|\+0#e000e06&|<|C|-|>@1|>+0#e000002&|"| +0#0000000&@60
 |e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|\+0#e000e06&|<|*|C|-|>@1|>+0#e000002&|"| +0#0000000&@59
 @75
-|"+0#0000e05&| |S|t|r|i|n|g| |i|n|t|e|r|p|o|l|a|t|i|o|n| +0#0000000&@52
+|e+0#af5f00255&|c|h|o| +0#0000000&|'+0#e000002&|'+0#e000e06&@1|'+0#e000002&| +0#0000000&@65
+|e+0#af5f00255&|c|h|o| +0#0000000&|'+0#e000002&|'+0#e000e06&@1|f+0#e000002&|o@1|'| +0#0000000&@62
+|e+0#af5f00255&|c|h|o| +0#0000000&|'+0#e000002&|f|o@1|'+0#e000e06&@1|'+0#e000002&| +0#0000000&@62
+|e+0#af5f00255&|c|h|o| +0#0000000&|'+0#e000002&|f|o@1|'+0#e000e06&@1|b+0#e000002&|a|r|'| +0#0000000&@59
 @75
-|e+0#af5f00255&|c|h|o| +0#0000000&|'+0#e000002&|D|o|n|'@1|t| |h|i|g|h|l|i|g|h|t| |i|n|t|e|r|p|o|l|a|t|i|o|n|:| |{@1| |{|1| |+| |2|}| |}@1|'| +0#0000000&@22
-|e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|D|o|n|'|t| |h|i|g|h|l|i|g|h|t| |i|n|t|e|r|p|o|l|a|t|i|o|n|:| |{@1| |{|1| |+| |2|}| |}@1|"| +0#0000000&@23
-|e+0#af5f00255&|c|h|o| +0#0000000&|$+0#e000002&|'|H|i|g|h|l|i|g|h|t| |i|n|t|e|r|p|o|l|a|t|i|o|n|:|\|t|{+0#e000e06&@1| +0#e000002&|{+0#e000e06&| +0#0000000&|s+0#00e0e07&|t|r|i|n|g|(+0#e000e06&|{|'+0#e000002&|f|o@1|'|:+0#0000000&| |'+0#e000002&|b|a|r|'|}+0#e000e06&|)| +0#0000000&|}+0#e000e06&| +0#e000002&|}+0#e000e06&@1|'+0#e000002&| +0#0000000&@8
-@57|1|5|,|1| @9|1|8|%| 
+@57|1|5|,|1| @9|1|4|%| 
index d1d443ec4cda3085aebe7e447cc14c174df3938b..37e5b041198f238bc6bf372815982e0c7e1f0dd4 100644 (file)
@@ -1,20 +1,20 @@
-|e+0#af5f00255#ffffff0|c|h|o| +0#0000000&|$+0#e000002&|'|H|i|g|h|l|i|g|h|t| |i|n|t|e|r|p|o|l|a|t|i|o|n|:|\|t|{+0#e000e06&@1| +0#e000002&|{+0#e000e06&| +0#0000000&|s+0#00e0e07&|t|r|i|n|g|(+0#e000e06&|{|'+0#e000002&|f|o@1|'|:+0#0000000&| |'+0#e000002&|b|a|r|'|}+0#e000e06&|)| +0#0000000&|}+0#e000e06&| +0#e000002&|}+0#e000e06&@1|'+0#e000002&| +0#0000000&@8
+| +0&#ffffff0@74
+|"+0#0000e05&| |U|n|r|e|p|o|r|t|e|d| |i|s@1|u|e| |(|i|n|c|o|r@1|e|c|t|l|y| |m|a|t|c|h|e|s| |a|s| |v|i|m|S|t|r|i|n|g| |v|i|m|M|a|r|k| |v|i|m|O|p|e|r| |N|O|N|E|)| +0#0000000&
+|"+0#0000e05&| |h|t@1|p|s|:|/@1|g|i|t|h|u|b|.|c|o|m|/|t|p|o|p|e|/|v|i|m|-|u|n|i|m|p|a|i|r|e|d|/|b|l|o|b|/|6|d|4@1|a|6|d|c|2|e|c|3|4|6|0|7|c|4|1|e|c|7|8|a|c|f|8|1
+|6|5|7|2|4|8|5|8|0|b|f|1|/|p|l|u|g|i|n|/|u|n|i|m|p|a|i|r|e|d|.|v|i|m|#|L|2|3|2| +0#0000000&@35
+|l+0#af5f00255&|e|t| +0#0000000&|c+0#00e0e07&|m|d| +0#0000000&|=+0#af5f00255&| +0#0000000&|'+0#e000002&|p|u|t|!|=|r|e|p|e|a|t|(|n|r|2|c|h|a|r|(|1|0|)|,| |v|:|c|o|u|n|t|1|)|||s|i|l|e|n|t| |'+0#e000e06&@1|]+0#e000002&|+|'| +0#0000000&@16
+> @74
+|"+0#0000e05&| |S|t|r|i|n|g| |i|n|t|e|r|p|o|l|a|t|i|o|n| +0#0000000&@52
+@75
+|e+0#af5f00255&|c|h|o| +0#0000000&|'+0#e000002&|D|o|n|'+0#e000e06&@1|t+0#e000002&| |h|i|g|h|l|i|g|h|t| |i|n|t|e|r|p|o|l|a|t|i|o|n|:| |{@1| |{|1| |+| |2|}| |}@1|'| +0#0000000&@22
+|e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|D|o|n|'|t| |h|i|g|h|l|i|g|h|t| |i|n|t|e|r|p|o|l|a|t|i|o|n|:| |{@1| |{|1| |+| |2|}| |}@1|"| +0#0000000&@23
+|e+0#af5f00255&|c|h|o| +0#0000000&|$+0#e000002&|'|H|i|g|h|l|i|g|h|t| |i|n|t|e|r|p|o|l|a|t|i|o|n|:|\|t|{+0#e000e06&@1| +0#e000002&|{+0#e000e06&| +0#0000000&|s+0#00e0e07&|t|r|i|n|g|(+0#e000e06&|{|'+0#e000002&|f|o@1|'|:+0#0000000&| |'+0#e000002&|b|a|r|'|}+0#e000e06&|)| +0#0000000&|}+0#e000e06&| +0#e000002&|}+0#e000e06&@1|'+0#e000002&| +0#0000000&@8
 |e+0#af5f00255&|c|h|o| +0#0000000&|$+0#e000002&|'|H|i|g|h|l|i|g|h|t| |i|n|t|e|r|p|o|l|a|t|i|o|n|:|\|t|{+0#e000e06&@1| +0#e000002&|{+0#e000e06&| +0#0000000&|$+0#e000002&|'|n|e|s|t|e|d|:| |{+0#e000e06&@1| +0#e000002&|{+0#e000e06&|1+0#e000002&| +0#0000000&|++0#af5f00255&| +0#0000000&|2+0#e000002&|}+0#e000e06&| +0#e000002&|}+0#e000e06&@1|'+0#e000002&| +0#0000000&|}+0#e000e06&| +0#e000002&|}+0#e000e06&@1|'+0#e000002&| +0#0000000&@6
 |e+0#af5f00255&|c|h|o| +0#0000000&|$+0#e000002&|"|H|i|g|h|l|i|g|h|t| |i|n|t|e|r|p|o|l|a|t|i|o|n|:|\+0#e000e06&|t|{@1| +0#e000002&|{+0#e000e06&| +0#0000000&|s+0#00e0e07&|t|r|i|n|g|(+0#e000e06&|{|"+0#e000002&|f|o@1|"|:+0#0000000&| |"+0#e000002&|b|a|r|"|}+0#e000e06&|)| +0#0000000&|}+0#e000e06&| +0#e000002&|}+0#e000e06&@1|"+0#e000002&| +0#0000000&@8
 |e+0#af5f00255&|c|h|o| +0#0000000&|$+0#e000002&|"|H|i|g|h|l|i|g|h|t| |i|n|t|e|r|p|o|l|a|t|i|o|n|:|\+0#e000e06&|t|{@1| +0#e000002&|{+0#e000e06&| +0#0000000&|$+0#e000002&|"|n|e|s|t|e|d|:| |{+0#e000e06&@1| +0#e000002&|{+0#e000e06&|1+0#e000002&| +0#0000000&|++0#af5f00255&| +0#0000000&|2+0#e000002&|}+0#e000e06&| +0#e000002&|}+0#e000e06&@1|"+0#e000002&| +0#0000000&|}+0#e000e06&| +0#e000002&|}+0#e000e06&@1|"+0#e000002&| +0#0000000&@6
 @75
->"+0#0000e05&| |N|u|m|b|e|r| +0#0000000&@66
-@75
-|"+0#0000e05&| |H|e|x|a|d|e|c|i|m|a|l| +0#0000000&@61
-|e+0#af5f00255&|c|h|o| +0#0000000&@1|0+0#e000002&|x|F@1| +0#0000000&@64
-|e+0#af5f00255&|c|h|o| +0#0000000&@1|0+0#e000002&|X|F@1| +0#0000000&@64
-|e+0#af5f00255&|c|h|o| +0#0000000&|-+0#af5f00255&|0+0#e000002&|x|F@1| +0#0000000&@64
-|e+0#af5f00255&|c|h|o| +0#0000000&|-+0#af5f00255&|0+0#e000002&|X|F@1| +0#0000000&@64
-@75
-|"+0#0000e05&| |D|e|c|i|m|a|l| +0#0000000&@65
-|e+0#af5f00255&|c|h|o| +0#0000000&@1|2+0#e000002&|5@1| +0#0000000&@65
-|e+0#af5f00255&|c|h|o| +0#0000000&|-+0#af5f00255&|2+0#e000002&|5@1| +0#0000000&@65
-@75
-|"+0#0000e05&| |O|c|t|a|l| +0#0000000&@67
-|e+0#af5f00255&|c|h|o| +0#0000000&@1|0+0#e000002&|3|7@1| +0#0000000&@64
-@57|3@1|,|1| @9|4|6|%| 
+|e+0#af5f00255&|c|h|o| +0#0000000&|$+0#e000002&|'|'+0#e000e06&@1|'+0#e000002&| +0#0000000&@64
+|e+0#af5f00255&|c|h|o| +0#0000000&|$+0#e000002&|'|'+0#e000e06&@1|f+0#e000002&|o@1|'| +0#0000000&@61
+|e+0#af5f00255&|c|h|o| +0#0000000&|$+0#e000002&|'|f|o@1|'+0#e000e06&@1|'+0#e000002&| +0#0000000&@61
+|e+0#af5f00255&|c|h|o| +0#0000000&|$+0#e000002&|'|f|o@1|'+0#e000e06&@1|b+0#e000002&|a|r|'| +0#0000000&@58
+@57|3|2|,|0|-|1| @7|3|6|%| 
index 90cd8c8655c137640090d7e6f1cbac19bdd671e1..178468d4778112fa9f6f30ce49645dcb035a68f5 100644 (file)
@@ -1,20 +1,20 @@
-|e+0#af5f00255#ffffff0|c|h|o| +0#0000000&@1|0+0#e000002&|3|7@1| +0#0000000&@64
+|e+0#af5f00255#ffffff0|c|h|o| +0#0000000&|$+0#e000002&|'|f|o@1|'+0#e000e06&@1|b+0#e000002&|a|r|'| +0#0000000&@58
+@75
+|"+0#0000e05&| |N|u|m|b|e|r| +0#0000000&@66
+@75
+|"+0#0000e05&| |H|e|x|a|d|e|c|i|m|a|l| +0#0000000&@61
+>e+0#af5f00255&|c|h|o| +0#0000000&@1|0+0#e000002&|x|F@1| +0#0000000&@64
+|e+0#af5f00255&|c|h|o| +0#0000000&@1|0+0#e000002&|X|F@1| +0#0000000&@64
+|e+0#af5f00255&|c|h|o| +0#0000000&|-+0#af5f00255&|0+0#e000002&|x|F@1| +0#0000000&@64
+|e+0#af5f00255&|c|h|o| +0#0000000&|-+0#af5f00255&|0+0#e000002&|X|F@1| +0#0000000&@64
+@75
+|"+0#0000e05&| |D|e|c|i|m|a|l| +0#0000000&@65
+|e+0#af5f00255&|c|h|o| +0#0000000&@1|2+0#e000002&|5@1| +0#0000000&@65
+|e+0#af5f00255&|c|h|o| +0#0000000&|-+0#af5f00255&|2+0#e000002&|5@1| +0#0000000&@65
+@75
+|"+0#0000e05&| |O|c|t|a|l| +0#0000000&@67
+|e+0#af5f00255&|c|h|o| +0#0000000&@1|0+0#e000002&|3|7@1| +0#0000000&@64
 |e+0#af5f00255&|c|h|o| +0#0000000&@1|0+0#e000002&|o|3|7@1| +0#0000000&@63
 |e+0#af5f00255&|c|h|o| +0#0000000&@1|0+0#e000002&|O|3|7@1| +0#0000000&@63
 |e+0#af5f00255&|c|h|o| +0#0000000&|-+0#af5f00255&|0+0#e000002&|3|7@1| +0#0000000&@64
-|e+0#af5f00255&|c|h|o| +0#0000000&|-+0#af5f00255&|0+0#e000002&|o|3|7@1| +0#0000000&@63
->e+0#af5f00255&|c|h|o| +0#0000000&|-+0#af5f00255&|0+0#e000002&|O|3|7@1| +0#0000000&@63
-@75
-|"+0#0000e05&| |B|i|n|a|r|y| +0#0000000&@66
-|e+0#af5f00255&|c|h|o| +0#0000000&@1|0+0#e000002&|b|1@7| +0#0000000&@58
-|e+0#af5f00255&|c|h|o| +0#0000000&@1|0+0#e000002&|B|1@7| +0#0000000&@58
-|e+0#af5f00255&|c|h|o| +0#0000000&|-+0#af5f00255&|0+0#e000002&|b|1@7| +0#0000000&@58
-|e+0#af5f00255&|c|h|o| +0#0000000&|-+0#af5f00255&|0+0#e000002&|B|1@7| +0#0000000&@58
-@75
-|"+0#0000e05&| |F|l|o|a|t| +0#0000000&@67
-|e+0#af5f00255&|c|h|o| +0#0000000&|1+0#e000002&|2|3|.|4|5|6| +0#0000000&@62
-|e+0#af5f00255&|c|h|o| +0#0000000&|++0#af5f00255&|0+0#e000002&|.|0@2|1| +0#0000000&@62
-|e+0#af5f00255&|c|h|o| +0#0000000&|5+0#e000002&@1|.|0| +0#0000000&@65
-|e+0#af5f00255&|c|h|o| +0#0000000&|-+0#af5f00255&|0+0#e000002&|.|1|2|3| +0#0000000&@63
-|e+0#af5f00255&|c|h|o| +0#0000000&|1+0#e000002&|.|2|3|4|e|0|3| +0#0000000&@61
-@57|5|1|,|1| @9|7@1|%| 
+@57|5|0|,|1| @9|6|1|%| 
index b7737c642072153c4faf4a9397f4f71bdb5ac41d..1a054e6cda0f4e35dda1a71f9c7fb40d6bf44271 100644 (file)
@@ -1,20 +1,20 @@
-|e+0#af5f00255#ffffff0|c|h|o| +0#0000000&|1+0#e000002&|.|2|3|4|e|0|3| +0#0000000&@61
-|e+0#af5f00255&|c|h|o| +0#0000000&|1+0#e000002&|.|0|E|-|6| +0#0000000&@63
-|e+0#af5f00255&|c|h|o| +0#0000000&|-+0#af5f00255&|3+0#e000002&|.|1|4|1|6|e|+|8@1| +0#0000000&@58
-@75
-|"+0#0000e05&| |B|l|o|b| +0#0000000&@68
->e+0#af5f00255&|c|h|o| +0#0000000&|0+0#e000002&|z| +0#0000000&@67
-|e+0#af5f00255&|c|h|o| +0#0000000&|0+0#e000002&|z|F@1|0@1|E|D|0|1|5|D|A|F| +0#0000000&@55
-|e+0#af5f00255&|c|h|o| +0#0000000&|0+0#e000002&|z|F@1|0@1|.|E|D|0|1|.|5|D|A|F| +0#0000000&@53
-|e+0#af5f00255&|c|h|o| +0#0000000&|0+0#e000002&|z|F@1|.|0@1|.|E|D|.|0|1|.|5|D|.|A|F| +0#0000000&@50
+|e+0#af5f00255#ffffff0|c|h|o| +0#0000000&|-+0#af5f00255&|0+0#e000002&|3|7@1| +0#0000000&@64
+|e+0#af5f00255&|c|h|o| +0#0000000&|-+0#af5f00255&|0+0#e000002&|o|3|7@1| +0#0000000&@63
+|e+0#af5f00255&|c|h|o| +0#0000000&|-+0#af5f00255&|0+0#e000002&|O|3|7@1| +0#0000000&@63
 @75
+|"+0#0000e05&| |B|i|n|a|r|y| +0#0000000&@66
+>e+0#af5f00255&|c|h|o| +0#0000000&@1|0+0#e000002&|b|1@7| +0#0000000&@58
+|e+0#af5f00255&|c|h|o| +0#0000000&@1|0+0#e000002&|B|1@7| +0#0000000&@58
+|e+0#af5f00255&|c|h|o| +0#0000000&|-+0#af5f00255&|0+0#e000002&|b|1@7| +0#0000000&@58
+|e+0#af5f00255&|c|h|o| +0#0000000&|-+0#af5f00255&|0+0#e000002&|B|1@7| +0#0000000&@58
 @75
-|"+0#0000e05&| |I|s@1|u|e| |#|1|6|2@1|1| |(|v|i|m|S|t|r|i|n|g| |b|e|c|o|m|e|s| |v|i|m|V|a|r| |w|h|e|n| |p|r|e|c|e|d|e|d| |b|y| |!|)| +0#0000000&@14
-|l+0#af5f00255&|e|t| +0#0000000&|b+0#00e0e07&|a|r| +0#0000000&|=+0#af5f00255&| +0#0000000&|!+0#af5f00255&|'+0#e000002&|g|:|b|a|r|'|-+0#af5f00255&|>|e+0#00e0e07&|x|i|s|t|s|(+0#e000e06&|)| +0#0000000&@46
+|"+0#0000e05&| |F|l|o|a|t| +0#0000000&@67
+|e+0#af5f00255&|c|h|o| +0#0000000&|1+0#e000002&|2|3|.|4|5|6| +0#0000000&@62
+|e+0#af5f00255&|c|h|o| +0#0000000&|++0#af5f00255&|0+0#e000002&|.|0@2|1| +0#0000000&@62
+|e+0#af5f00255&|c|h|o| +0#0000000&|5+0#e000002&@1|.|0| +0#0000000&@65
+|e+0#af5f00255&|c|h|o| +0#0000000&|-+0#af5f00255&|0+0#e000002&|.|1|2|3| +0#0000000&@63
+|e+0#af5f00255&|c|h|o| +0#0000000&|1+0#e000002&|.|2|3|4|e|0|3| +0#0000000&@61
+|e+0#af5f00255&|c|h|o| +0#0000000&|1+0#e000002&|.|0|E|-|6| +0#0000000&@63
+|e+0#af5f00255&|c|h|o| +0#0000000&|-+0#af5f00255&|3+0#e000002&|.|1|4|1|6|e|+|8@1| +0#0000000&@58
 @75
-|~+0#4040ff13&| @73
-|~| @73
-|~| @73
-|~| @73
-|~| @73
-| +0#0000000&@56|6|9|,|1| @9|B|o|t| 
+@57|6|8|,|1| @9|8|6|%| 
diff --git a/runtime/syntax/testdir/dumps/vim_expr_05.dump b/runtime/syntax/testdir/dumps/vim_expr_05.dump
new file mode 100644 (file)
index 0000000..2c0a189
--- /dev/null
@@ -0,0 +1,20 @@
+| +0&#ffffff0@74
+|"+0#0000e05&| |B|l|o|b| +0#0000000&@68
+|e+0#af5f00255&|c|h|o| +0#0000000&|0+0#e000002&|z| +0#0000000&@67
+|e+0#af5f00255&|c|h|o| +0#0000000&|0+0#e000002&|z|F@1|0@1|E|D|0|1|5|D|A|F| +0#0000000&@55
+|e+0#af5f00255&|c|h|o| +0#0000000&|0+0#e000002&|z|F@1|0@1|.|E|D|0|1|.|5|D|A|F| +0#0000000&@53
+>e+0#af5f00255&|c|h|o| +0#0000000&|0+0#e000002&|z|F@1|.|0@1|.|E|D|.|0|1|.|5|D|.|A|F| +0#0000000&@50
+@75
+@75
+|"+0#0000e05&| |I|s@1|u|e| |#|1|6|2@1|1| |(|v|i|m|S|t|r|i|n|g| |b|e|c|o|m|e|s| |v|i|m|V|a|r| |w|h|e|n| |p|r|e|c|e|d|e|d| |b|y| |!|)| +0#0000000&@14
+|l+0#af5f00255&|e|t| +0#0000000&|b+0#00e0e07&|a|r| +0#0000000&|=+0#af5f00255&| +0#0000000&|!+0#af5f00255&|'+0#e000002&|g|:|b|a|r|'|-+0#af5f00255&|>|e+0#00e0e07&|x|i|s|t|s|(+0#e000e06&|)| +0#0000000&@46
+@75
+|~+0#4040ff13&| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+| +0#0000000&@56|8|6|,|1| @9|B|o|t| 
index 8d30656ec17dac6bc65e9056203edbde4e77981d..316f462caeba8cc1b9697b17c689402021e830d8 100644 (file)
@@ -21,6 +21,15 @@ echo "\<*C->>"
 echo "\<C->>>"
 echo "\<*C->>>"
 
+echo ''''
+echo '''foo'
+echo 'foo'''
+echo 'foo''bar'
+
+" Unreported issue (incorrectly matches as vimString vimMark vimOper NONE)
+" https://github.com/tpope/vim-unimpaired/blob/6d44a6dc2ec34607c41ec78acf81657248580bf1/plugin/unimpaired.vim#L232
+let cmd = 'put!=repeat(nr2char(10), v:count1)|silent '']+'
+
 " String interpolation
 
 echo 'Don''t highlight interpolation: {{ {1 + 2} }}'
@@ -30,6 +39,11 @@ echo $'Highlight interpolation:\t{{ { $'nested: {{ {1 + 2} }}' } }}'
 echo $"Highlight interpolation:\t{{ { string({"foo": "bar"}) } }}"
 echo $"Highlight interpolation:\t{{ { $"nested: {{ {1 + 2} }}" } }}"
 
+echo $''''
+echo $'''foo'
+echo $'foo'''
+echo $'foo''bar'
+
 " Number
 
 " Hexadecimal
index 1a2aa6eb6adf88f5b9ec44f681352c8e9a9ae5a6..04fc8c1fad6ca8ee484c0402b3119cb3f47237de 100644 (file)
@@ -598,19 +598,21 @@ syn region        vimPatSepZone   oneline   contained   matchgroup=vimPatSepZ start="\\%\
 syn region     vimPatRegion    contained transparent matchgroup=vimPatSepR start="\\[z%]\=(" end="\\)" contains=@vimSubstList oneline
 syn match      vimNotPatSep    contained       "\\\\"
 syn cluster    vimStringGroup  contains=vimEscape,vimEscapeBrace,vimPatSep,vimNotPatSep,vimPatSepErr,vimPatSepZone,@Spell
-syn region     vimString       oneline keepend start=+[^a-zA-Z>\\@]"+lc=1 skip=+\\\\\|\\"+ matchgroup=vimStringEnd end=+"+     contains=@vimStringGroup extend
-syn region     vimString       oneline keepend start=+[^a-zA-Z>\\@]'+lc=1 end=+'+ extend
+syn region     vimString       oneline keepend matchgroup=vimString start=+[^a-zA-Z>\\@]"+lc=1 skip=+\\\\\|\\"+ matchgroup=vimStringEnd end=+"+        contains=@vimStringGroup extend
+syn region     vimString       oneline matchgroup=vimString start=+[^a-zA-Z>\\@]'+lc=1 end=+'+ contains=vimQuoteEscape extend
 "syn region    vimString       oneline start="\s/\s*\A"lc=1 skip="\\\\\|\\+" end="/"   contains=@vimStringGroup  " see tst45.vim
 syn match      vimString       contained       +"[^"]*\\$+     skipnl nextgroup=vimStringCont
 syn match      vimStringCont   contained       +\(\\\\\|.\)\{-}[^\\]"+
+
 syn match      vimEscape       contained       "\\."
 " syn match    vimEscape       contained       +\\[befnrt\"]+
 syn match      vimEscape       contained       "\\\o\{1,3}\|\\[xX]\x\{1,2}\|\\u\x\{1,4}\|\\U\x\{1,8}"
 syn match      vimEscape       contained       "\\<" contains=vimNotation
 syn match      vimEscape       contained       "\\<\*[^>]*>\=>"
+syn match      vimQuoteEscape  contained       "''"
 
-syn region     vimString       oneline start=+$'+ skip=+''+ end=+'+ contains=@vimStringInterpolation extend
-syn region     vimString       oneline start=+$"+ end=+"+ contains=@vimStringGroup,@vimStringInterpolation extend
+syn region     vimString       oneline matchgroup=vimString start=+$'+ skip=+''+ end=+'+ contains=vimQuoteEscape,@vimStringInterpolation  extend
+syn region     vimString       oneline matchgroup=vimString start=+$"+           end=+"+ contains=@vimStringGroup,@vimStringInterpolation extend
 syn region     vimStringInterpolationExpr  oneline contained matchgroup=vimSep start=+{+ end=+}+ contains=@vimExprList
 syn match      vimStringInterpolationBrace contained "{{"
 syn match      vimStringInterpolationBrace contained "}}"
@@ -1438,6 +1440,7 @@ if !exists("skip_vim_syntax_inits")
  hi def link vimPattern        Type
  hi def link vimPlainMark      vimMark
  hi def link vimPlainRegister  vimRegister
+ hi def link vimQuoteEscape    vimEscape
  hi def link vimRegister       SpecialChar
  hi def link vimScriptDelim    Comment
  hi def link vimSearchDelim    Statement