]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
runtime(vim): Update base-syntax, match OR operator in :echo and :execute
authorDoug Kearns <dougkearns@gmail.com>
Mon, 23 Jun 2025 19:51:44 +0000 (21:51 +0200)
committerChristian Brabandt <cb@256bit.org>
Mon, 23 Jun 2025 19:51:44 +0000 (21:51 +0200)
Don't match the OR operator in expressions as a trailing bar.

closes: #17533

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
12 files changed:
runtime/syntax/generator/vim.vim.base
runtime/syntax/testdir/dumps/vim_ex_echo_00.dump
runtime/syntax/testdir/dumps/vim_ex_echo_01.dump
runtime/syntax/testdir/dumps/vim_ex_echo_02.dump
runtime/syntax/testdir/dumps/vim_ex_echo_03.dump [new file with mode: 0644]
runtime/syntax/testdir/dumps/vim_ex_execute_00.dump
runtime/syntax/testdir/dumps/vim_ex_execute_01.dump
runtime/syntax/testdir/dumps/vim_ex_execute_02.dump
runtime/syntax/testdir/dumps/vim_ex_execute_03.dump [new file with mode: 0644]
runtime/syntax/testdir/input/vim_ex_echo.vim
runtime/syntax/testdir/input/vim_ex_execute.vim
runtime/syntax/vim.vim

index a2ac5d2c874803b6b2bcdd44f100b69514f13aa5..edf8ab88a3b98f5e981c5397785c70934d3af71c 100644 (file)
@@ -2,7 +2,7 @@
 " Language:       Vim script
 " Maintainer:     Hirohito Higashi <h.east.727 ATMARK gmail.com>
 "         Doug Kearns <dougkearns@gmail.com>
-" Last Change:    2025 Jun 20
+" Last Change:    2025 Jun 23
 " Former Maintainer: Charles E. Campbell
 
 " DO NOT CHANGE DIRECTLY.
@@ -1223,8 +1223,12 @@ syn region       vimEcho
       \ start="\<echoc\%[onsole]\>"
       \ start="\<echon\>"
       \ start="\<echow\%[indow]\>"
-      \ skip=+\\|\|\n\s*\\\|\n\s*"\\ +
-      \ matchgroup=vimCmdSep end="|" excludenl end="$" contains=@vimContinue,@vimExprList transparent
+      \ skip=+\\|\|||\|\n\s*\%(\\\|["#]\\ \)+
+      \ end="\ze|"
+      \ excludenl end="$"
+      \ nextgroup=vimCmdSep
+      \ contains=@vimContinue,@vimExprList
+      \ transparent
 
 syn match      vimEchohl       "\<echohl\=\>"  skipwhite nextgroup=vimGroup,vimHLGroup,vimEchohlNone
 syn case ignore
@@ -1233,7 +1237,15 @@ syn case match
 
 syn cluster    vimEcho contains=vimEcho,vimEchohl
 
-syn region     vimExecute      matchgroup=vimCommand start="\<exe\%[cute]\>" skip=+\\|\|\n\s*\\\|\n\s*"\\ + matchgroup=vimCmdSep end="|" excludenl end="$" contains=@vimContinue,@vimExprList transparent
+syn region     vimExecute
+      \ matchgroup=vimCommand
+      \ start="\<exe\%[cute]\>"
+      \ skip=+\\|\|||\|\n\s*\%(\\\|["#]\\ \)+
+      \ end="\ze|"
+      \ excludenl end="$"
+      \ nextgroup=vimCmdSep
+      \ contains=@vimContinue,@vimExprList
+      \ transparent
 
 " Filter: {{{2
 " ======
index f42ea1da6d75694e3ffd9b5a844f06009e635e5a..1a8bd425bc33cbc9646f45e3811b3ca8c1074634 100644 (file)
@@ -1,5 +1,6 @@
 >"+0#0000e05#ffffff0| |V|i|m| |:|e|c|h|o| |c|o|m@1|a|n|d|s| +0#0000000&@54
 @75
+@75
 |e+0#af5f00255&|c|h|o| +0#0000000&@7|"+0#e000002&|A|n|s|w|e|r| |=| |"| +0#0000000&|4+0#e000002&|2| +0#0000000&@48
 |e+0#af5f00255&|c|h|o|n| +0#0000000&@6|"+0#e000002&|A|n|s|w|e|r| |=| |"| +0#0000000&|4+0#e000002&|2| +0#0000000&@48
 |e+0#af5f00255&|c|h|o|m|s|g| +0#0000000&@4|"+0#e000002&|A|n|s|w|e|r| |=| |"| +0#0000000&|4+0#e000002&|2| +0#0000000&@48
@@ -7,14 +8,13 @@
 |e+0#af5f00255&|c|h|o|e|r@1| +0#0000000&@4|"+0#e000002&|A|n|s|w|e|r| |=| |"| +0#0000000&|4+0#e000002&|2| +0#0000000&@48
 |e+0#af5f00255&|c|h|o|c|o|n|s|o|l|e| +0#0000000&|"+0#e000002&|A|n|s|w|e|r| |=| |"| +0#0000000&|4+0#e000002&|2| +0#0000000&@48
 @75
-|e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|f|o|l@1|o|w|i|n|g| |c|o|m@1|a|n|d| |i|s| |:|||"| +0#0000000&||| ||| @40
 @75
-|e+0#af5f00255&|c|h|o|h|l| +0#0000000&|W+0#00e0003&|a|r|n|i|n|g|M|s|g| +0#0000000&||| |e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|D|o|n|'|t| |p|a|n|i|c|!|"| +0#0000000&||| |e+0#af5f00255&|c|h|o|h|l| +0#0000000&|N+0#00e0003&|o|n|e| +0#0000000&@21
+|"+0#0000e05&| |t|r|a|i|l|i|n|g| |b|a|r| |v|s| |O|R| |o|p|e|r|a|t|o|r| +0#0000000&@45
 @75
-|e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|A|n|s|w|e|r| |=| |"| +0#0000000&@58
-@5|"+0#0000e05&|\| |c|o|m@1|e|n|t| +0#0000000&@59
-@6|\+0#e000e06&| +0#0000000&|4+0#e000002&|2| +0#0000000&@64
+|"+0#0000e05&| |O|R| |o|p|e|r|a|t|o|r| +0#0000000&@61
+|e+0#af5f00255&|c|h|o| +0#0000000&|f+0#00e0e07&|o@1| +0#0000000&||+0#af5f00255&@1| +0#0000000&|b+0#00e0e07&|a|r| +0#0000000&@59
+|e+0#af5f00255&|c|h|o| +0#0000000&|f+0#00e0e07&|o@1| +0#0000000&||+0#af5f00255&@1| +0#0000000&@63
+@6|\+0#e000e06&| +0#0000000&|b+0#00e0e07&|a|r| +0#0000000&@63
 @75
-|e+0#af5f00255&|c|h|o| +0#0000000&@70
-@6|\+0#e000e06&| +0#0000000&|"+0#e000002&|A|n|s|w|e|r| |=| |"| +0#0000000&@55
+|"+0#0000e05&| |f|o|l@1|o|w|i|n|g| |c|o|m@1|a|n|d| |i|s| |:||| +0#0000000&@49
 @57|1|,|1| @10|T|o|p| 
index 21e7bd2ae0b520698959869b18cc4f1c333aa920..efc9170642a86bd027a4fe62b3c6730ebf25ce1e 100644 (file)
@@ -1,20 +1,20 @@
-|e+0#af5f00255#ffffff0|c|h|o| +0#0000000&|"+0#e000002&|A|n|s|w|e|r| |=| |"| +0#0000000&@58
-@5|"+0#0000e05&|\| |c|o|m@1|e|n|t| +0#0000000&@59
-@6|\+0#e000e06&| +0#0000000&|4+0#e000002&|2| +0#0000000&@64
+|"+0#0000e05#ffffff0| |O|R| |o|p|e|r|a|t|o|r| +0#0000000&@61
+|e+0#af5f00255&|c|h|o| +0#0000000&|f+0#00e0e07&|o@1| +0#0000000&||+0#af5f00255&@1| +0#0000000&|b+0#00e0e07&|a|r| +0#0000000&@59
+|e+0#af5f00255&|c|h|o| +0#0000000&|f+0#00e0e07&|o@1| +0#0000000&||+0#af5f00255&@1| +0#0000000&@63
+@6|\+0#e000e06&| +0#0000000&|b+0#00e0e07&|a|r| +0#0000000&@63
 @75
-|e+0#af5f00255&|c|h|o| +0#0000000&@70
-@6>\+0#e000e06&| +0#0000000&|"+0#e000002&|A|n|s|w|e|r| |=| |"| +0#0000000&@55
-@5|"+0#0000e05&|\| |c|o|m@1|e|n|t| +0#0000000&@59
-@6|\+0#e000e06&| +0#0000000&|4+0#e000002&|2| +0#0000000&@64
+>"+0#0000e05&| |f|o|l@1|o|w|i|n|g| |c|o|m@1|a|n|d| |i|s| |:||| +0#0000000&@49
+|e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|F|o@1|"| +0#0000000&||| ||| @60
 @75
-|"+0#0000e05&| |:|e|c|h|o| |w|i|t|h|o|u|t| |{|e|x|p|r|}| +0#0000000&@52
-|e+0#af5f00255&|c|h|o||+0#0000000&| |e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|F|o@1|"| +0#0000000&@58
+|"+0#0000e05&| |i|n|v|a|l|i|d| |e|x|p|r|e|s@1|i|o|n| +0#0000000&@54
+|e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|F|o@1|"| +0#0000000&||+0#af5f00255&@1| +0#0000000&@61
 @75
-|"+0#0000e05&| |t|r|a|i|l|i|n|g| |c|o|m@1|e|n|t| |n|e@1|d|s| ||| +0#0000000&@48
-|e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|f|o@1|"| +0#0000000&||| |"+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@52
+|e+0#af5f00255&|c|h|o|h|l| +0#0000000&|W+0#00e0003&|a|r|n|i|n|g|M|s|g| +0#0000000&||| |e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|D|o|n|'|t| |p|a|n|i|c|!|"| +0#0000000&||| |e+0#af5f00255&|c|h|o|h|l| +0#0000000&|N+0#00e0003&|o|n|e| +0#0000000&@21
 @75
 @75
-|"+0#0000e05&| |I|s@1|u|e| |#|9@1|8|7| |(|p|a|r|e|n|t|h|e|s|i|s|e|d| |a|r|g|u|m|e|n|t| |-| |n|o|t| |a| |f|u|n|c|t|i|o|n| |c|a|l@1|)| +0#0000000&@14
+|"+0#0000e05&| |l|i|n|e| |c|o|n|t|i|n|u|a|t|i|o|n|s| +0#0000000&@54
 @75
-|l+0#af5f00255&|e|t| +0#0000000&|f+0#00e0e07&|o@1| +0#0000000&|=+0#af5f00255&| +0#0000000&|{+0#e000e06&|'+0#e000002&|e|n|d|'|:+0#0000000&| |1+0#e000002&|2|3|}+0#e000e06&| +0#0000000&@52
-@57|1|9|,|7| @9|6|8|%| 
+|e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|A|n|s|w|e|r| |=| |"| +0#0000000&@58
+@5|"+0#0000e05&|\| |c|o|m@1|e|n|t| +0#0000000&@59
+@6|\+0#e000e06&| +0#0000000&|4+0#e000002&|2| +0#0000000&@64
+@57|1|9|,|1| @9|3@1|%| 
index 47be35b4fe2c0d83343c0652d7ec31938d3e5293..7cc91d41c867839b61950ad535035c6c4516e405 100644 (file)
@@ -1,20 +1,20 @@
-|l+0#af5f00255#ffffff0|e|t| +0#0000000&|f+0#00e0e07&|o@1| +0#0000000&|=+0#af5f00255&| +0#0000000&|{+0#e000e06&|'+0#e000002&|e|n|d|'|:+0#0000000&| |1+0#e000002&|2|3|}+0#e000e06&| +0#0000000&@52
-@75
-|i+0#af5f00255&|f| +0#0000000&|1+0#e000002&|2|3| +0#0000000&@68
-@8|e+0#af5f00255&|c|h|o| +0#0000000&|(+0#e000e06&|f+0#00e0e07&|o@1|.+0#af5f00255&|e+0#00e0e07&|n|d|)+0#e000e06&| +0#0000000&@52
-|e+0#af5f00255&|l|s|e| +0#0000000&@70
-@8>e+0#af5f00255&|c|h|o| +0#0000000&|'+0#e000002&|b|a|r|'| +0#0000000&@56
-|e+0#af5f00255&|n|d|i|f| +0#0000000&@69
-|~+0#4040ff13&| @73
-|~| @73
-|~| @73
-|~| @73
-|~| @73
-|~| @73
-|~| @73
-|~| @73
-|~| @73
-|~| @73
-|~| @73
-|~| @73
-| +0#0000000&@56|3|7|,|2|-|9| @7|B|o|t
+| +0&#ffffff0@5|\+0#e000e06&| +0#0000000&|4+0#e000002&|2| +0#0000000&@64
+@75
+|e+0#af5f00255&|c|h|o| +0#0000000&@70
+@6|\+0#e000e06&| +0#0000000&|"+0#e000002&|A|n|s|w|e|r| |=| |"| +0#0000000&@55
+@5|"+0#0000e05&|\| |c|o|m@1|e|n|t| +0#0000000&@59
+@6>\+0#e000e06&| +0#0000000&|4+0#e000002&|2| +0#0000000&@64
+@75
+@75
+|"+0#0000e05&| |t|r|a|i|l|i|n|g| |b|a|r| |a|n|d| |c|o|m@1|e|n|t|s| +0#0000000&@47
+@75
+|"+0#0000e05&| |:|e|c|h|o| |w|i|t|h|o|u|t| |{|e|x|p|r|}| +0#0000000&@52
+|e+0#af5f00255&|c|h|o||+0#0000000&| |e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|F|o@1|"| +0#0000000&@58
+@75
+|"+0#0000e05&| |t|r|a|i|l|i|n|g| |c|o|m@1|e|n|t| |n|e@1|d|s| ||| +0#0000000&@48
+|e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|F|o@1|"| +0#0000000&||| |"+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@52
+@75
+@75
+|"+0#0000e05&| |I|s@1|u|e| |#|9@1|8|7| |(|p|a|r|e|n|t|h|e|s|i|s|e|d| |a|r|g|u|m|e|n|t| |-| |n|o|t| |a| |f|u|n|c|t|i|o|n| |c|a|l@1|)| +0#0000000&@14
+@75
+@57|3|7|,|7| @9|7|9|%
diff --git a/runtime/syntax/testdir/dumps/vim_ex_echo_03.dump b/runtime/syntax/testdir/dumps/vim_ex_echo_03.dump
new file mode 100644 (file)
index 0000000..239a31d
--- /dev/null
@@ -0,0 +1,20 @@
+| +0&#ffffff0@74
+|l+0#af5f00255&|e|t| +0#0000000&|f+0#00e0e07&|o@1| +0#0000000&|=+0#af5f00255&| +0#0000000&|{+0#e000e06&|'+0#e000002&|e|n|d|'|:+0#0000000&| |1+0#e000002&|2|3|}+0#e000e06&| +0#0000000&@52
+@75
+|i+0#af5f00255&|f| +0#0000000&|1+0#e000002&|2|3| +0#0000000&@68
+@8|e+0#af5f00255&|c|h|o| +0#0000000&|(+0#e000e06&|f+0#00e0e07&|o@1|.+0#af5f00255&|e+0#00e0e07&|n|d|)+0#e000e06&| +0#0000000&@52
+>e+0#af5f00255&|l|s|e| +0#0000000&@70
+@8|e+0#af5f00255&|c|h|o| +0#0000000&|'+0#e000002&|b|a|r|'| +0#0000000&@56
+|e+0#af5f00255&|n|d|i|f| +0#0000000&@69
+@75
+|~+0#4040ff13&| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+| +0#0000000&@56|5@1|,|1| @9|B|o|t| 
index 55d88afaee12690a8fbb74878aa4c75035c8238c..e5c53af92041ea7fffcb35a74ed85af6fe484e4b 100644 (file)
@@ -1,5 +1,6 @@
 >"+0#0000e05#ffffff0| |V|i|m| |:|e|x|e|c|u|t|e| |c|o|m@1|a|n|d| +0#0000000&@52
 @75
+@75
 |"+0#0000e05&| |:|h|e|l|p| |:|e|x|e|c|u|t|e| +0#0000000&@58
 @75
 |e+0#af5f00255&|x|e|c|u|t|e| +0#0000000&|"+0#e000002&|b|u|f@1|e|r|"| +0#0000000&|n+0#00e0e07&|e|x|t|b|u|f| +0#0000000&@50
@@ -15,6 +16,5 @@
 |e+0#af5f00255&|n|d|i|f| +0#0000000&@69
 |e+0#af5f00255&|x|e|c|u|t|e| +0#0000000&|'+0#e000002&|w|h|i|l|e| |i| |<| |5| ||| |e|c|h|o| |i| ||| |l|e|t| |i| |=| |i| |+| |1| ||| |e|n|d|w|h|i|l|e|'| +0#0000000&@17
 @75
-|"+0#0000e05&| |f|o|l@1|o|w|i|n|g| |c|o|m@1|a|n|d| |i|s| |:|||"| +0#0000000&@48
-|e+0#af5f00255&|x|e|c|u|t|e| +0#0000000&|"+0#e000002&|c|a|l@1| |F|o@1|(|)|"| +0#0000000&||| ||| @50
+@75
 @57|1|,|1| @10|T|o|p| 
index 5330ff3dee095d8547c8e0c7b283dadb11f1934e..733afebc6c9c973c2cf8b88380fc51b0cfe33c77 100644 (file)
@@ -1,20 +1,20 @@
-| +0&#ffffff0|e+0#af5f00255&|n|d|w|h|i|l|e| +0#0000000&@65
+| +0&#ffffff0@1|e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|t|e|s|t|"| +0#0000000&@61
+@1|e+0#af5f00255&|n|d|w|h|i|l|e| +0#0000000&@65
 |e+0#af5f00255&|n|d|i|f| +0#0000000&@69
 |e+0#af5f00255&|x|e|c|u|t|e| +0#0000000&|'+0#e000002&|w|h|i|l|e| |i| |<| |5| ||| |e|c|h|o| |i| ||| |l|e|t| |i| |=| |i| |+| |1| ||| |e|n|d|w|h|i|l|e|'| +0#0000000&@17
 @75
-|"+0#0000e05&| |f|o|l@1|o|w|i|n|g| |c|o|m@1|a|n|d| |i|s| |:|||"| +0#0000000&@48
->e+0#af5f00255&|x|e|c|u|t|e| +0#0000000&|"+0#e000002&|c|a|l@1| |F|o@1|(|)|"| +0#0000000&||| ||| @50
+> @74
+|"+0#0000e05&| |t|r|a|i|l|i|n|g| |b|a|r| |v|s| |O|R| |o|p|e|r|a|t|o|r| +0#0000000&@45
 @75
-|e+0#af5f00255&|x|e|c|u|t|e| +0#0000000&|"+0#e000002&|c|a|l@1|"| +0#0000000&@60
-@6|"+0#0000e05&|\| |c|o|m@1|e|n|t| +0#0000000&@58
-@6|\+0#e000e06&| +0#0000000&|"+0#e000002&|F|o@1|(|)|"| +0#0000000&@59
+|"+0#0000e05&| |O|R| |o|p|e|r|a|t|o|r| +0#0000000&@61
+|e+0#af5f00255&|x|e|c|u|t|e| +0#0000000&|f+0#00e0e07&|o@1| +0#0000000&||+0#af5f00255&@1| +0#0000000&|b+0#00e0e07&|a|r| +0#0000000&|?+0#af5f00255&| +0#0000000&|"+0#e000002&|F|o@1|"| +0#0000000&|:+0#af5f00255&| +0#0000000&|"+0#e000002&|N|o|t|F|o@1|"| +0#0000000&@37
+|e+0#af5f00255&|x|e|c|u|t|e| +0#0000000&|f+0#00e0e07&|o@1| +0#0000000&||+0#af5f00255&@1| +0#0000000&@60
+@6|\+0#e000e06&| +0#0000000&|b+0#00e0e07&|a|r| +0#0000000&|?+0#af5f00255&| +0#0000000&|"+0#e000002&|F|o@1|"| +0#0000000&|:+0#af5f00255&| +0#0000000&|"+0#e000002&|N|o|t|F|o@1|"| +0#0000000&@44
 @75
-|e+0#af5f00255&|x|e|c|u|t|e| +0#0000000&@67
-@6|\+0#e000e06&| +0#0000000&|"+0#e000002&|c|a|l@1|"| +0#0000000&@60
-@6|"+0#0000e05&|\| |c|o|m@1|e|n|t| +0#0000000&@58
-@6|\+0#e000e06&| +0#0000000&|"+0#e000002&|F|o@1|(|)|"| +0#0000000&@59
+|"+0#0000e05&| |f|o|l@1|o|w|i|n|g| |c|o|m@1|a|n|d| |i|s| |:|||"| +0#0000000&@48
+|e+0#af5f00255&|x|e|c|u|t|e| +0#0000000&|"+0#e000002&|F|o@1|"| +0#0000000&||| ||| @57
 @75
-|"+0#0000e05&| |:|e|x|e|c|u|t|e| |w|i|t|h|o|u|t| |{|e|x|p|r|}| +0#0000000&@49
-|e+0#af5f00255&|x|e|c|u|t|e||+0#0000000&| |e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|F|o@1|"| +0#0000000&@55
+|"+0#0000e05&| |i|n|v|a|l|i|d| |e|x|p|r|e|s@1|i|o|n| +0#0000000&@54
+|e+0#af5f00255&|x|e|c|u|t|e| +0#0000000&|"+0#e000002&|F|o@1|"| +0#0000000&||+0#af5f00255&@1| +0#0000000&@58
 @75
-@57|1|9|,|1| @9|5|9|%| 
+@57|1|9|,|0|-|1| @7|3|1|%| 
index fbc1fea6a81f544899646a6aa5585c06000a9ba7..3926f2b2cf11b22c2effb27fa3c2e77ccfb98345 100644 (file)
@@ -1,20 +1,20 @@
 | +0&#ffffff0@74
-|"+0#0000e05&| |t|r|a|i|l|i|n|g| |c|o|m@1|e|n|t| |n|e@1|d|s| ||| +0#0000000&@48
-|e+0#af5f00255&|x|e|c|u|t|e| +0#0000000&|"+0#e000002&|f|o@1|"| +0#0000000&||| |"+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@49
 @75
+|"+0#0000e05&| |l|i|n|e| |c|o|n|t|i|n|u|a|t|i|o|n|s| +0#0000000&@54
 @75
->"+0#0000e05&| |I|s@1|u|e| |#|9@1|8|7| |(|p|a|r|e|n|t|h|e|s|i|s|e|d| |a|r|g|u|m|e|n|t| |-| |n|o|t| |a| |f|u|n|c|t|i|o|n| |c|a|l@1|)| +0#0000000&@14
+|e+0#af5f00255&|x|e|c|u|t|e| +0#0000000&|"+0#e000002&|c|a|l@1|"| +0#0000000&@60
+@6>"+0#0000e05&|\| |c|o|m@1|e|n|t| +0#0000000&@58
+@6|\+0#e000e06&| +0#0000000&|"+0#e000002&|F|o@1|(|)|"| +0#0000000&@59
 @75
-|"+0#0000e05&| +0#0000000&|F+0#0000001#ffff4012|I|X|M|E|:+0#e000e06#ffffff0| +0#0000e05&|e|x|e|c|u|t|e| |i|s| |e|x| |c|o|m@1|a|n|d| |n|o|t| |b|u|i|l|t|i|n| |f|u|n|c|t|i|o|n| +0#0000000&@23
-|l+0#af5f00255&|e|t| +0#0000000&|f+0#00e0e07&|o@1| +0#0000000&|=+0#af5f00255&| +0#0000000&|{+0#e000e06&|'+0#e000002&|a|r|g|'|:+0#0000000&| |"+0#e000002&|c|a|l@1| |F|o@1|(|)|"|}+0#e000e06&| +0#0000000&@43
-|e+0#00e0e07&|x|e|c|u|t|e| +0#0000000&|(+0#e000e06&|f+0#00e0e07&|o@1|.+0#af5f00255&|a+0#00e0e07&|r|g|)+0#e000e06&| +0#0000000&@57
-|~+0#4040ff13&| @73
-|~| @73
-|~| @73
-|~| @73
-|~| @73
-|~| @73
-|~| @73
-|~| @73
-|~| @73
-| +0#0000000&@56|3|7|,|1| @9|B|o|t| 
+|e+0#af5f00255&|x|e|c|u|t|e| +0#0000000&@67
+@6|\+0#e000e06&| +0#0000000&|"+0#e000002&|c|a|l@1|"| +0#0000000&@60
+@6|"+0#0000e05&|\| |c|o|m@1|e|n|t| +0#0000000&@58
+@6|\+0#e000e06&| +0#0000000&|"+0#e000002&|F|o@1|(|)|"| +0#0000000&@59
+@75
+@75
+|"+0#0000e05&| |t|r|a|i|l|i|n|g| |b|a|r| |a|n|d| |c|o|m@1|e|n|t|s| +0#0000000&@47
+@75
+|"+0#0000e05&| |:|e|x|e|c|u|t|e| |w|i|t|h|o|u|t| |{|e|x|p|r|}| +0#0000000&@49
+|e+0#af5f00255&|x|e|c|u|t|e||+0#0000000&| |e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|F|o@1|"| +0#0000000&@55
+@75
+@57|3|7|,|7| @9|7|5|%| 
diff --git a/runtime/syntax/testdir/dumps/vim_ex_execute_03.dump b/runtime/syntax/testdir/dumps/vim_ex_execute_03.dump
new file mode 100644 (file)
index 0000000..21796e0
--- /dev/null
@@ -0,0 +1,20 @@
+| +0&#ffffff0@74
+|"+0#0000e05&| |t|r|a|i|l|i|n|g| |c|o|m@1|e|n|t| |n|e@1|d|s| ||| +0#0000000&@48
+|e+0#af5f00255&|x|e|c|u|t|e| +0#0000000&|"+0#e000002&|F|o@1|"| +0#0000000&||| |"+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@49
+@75
+@75
+>"+0#0000e05&| |I|s@1|u|e| |#|9@1|8|7| |(|p|a|r|e|n|t|h|e|s|i|s|e|d| |a|r|g|u|m|e|n|t| |-| |n|o|t| |a| |f|u|n|c|t|i|o|n| |c|a|l@1|)| +0#0000000&@14
+@75
+|"+0#0000e05&| +0#0000000&|F+0#0000001#ffff4012|I|X|M|E|:+0#e000e06#ffffff0| +0#0000e05&|e|x|e|c|u|t|e| |i|s| |e|x| |c|o|m@1|a|n|d| |n|o|t| |b|u|i|l|t|i|n| |f|u|n|c|t|i|o|n| +0#0000000&@23
+|l+0#af5f00255&|e|t| +0#0000000&|f+0#00e0e07&|o@1| +0#0000000&|=+0#af5f00255&| +0#0000000&|{+0#e000e06&|'+0#e000002&|a|r|g|'|:+0#0000000&| |"+0#e000002&|c|a|l@1| |F|o@1|(|)|"|}+0#e000e06&| +0#0000000&@43
+|e+0#00e0e07&|x|e|c|u|t|e| +0#0000000&|(+0#e000e06&|f+0#00e0e07&|o@1|.+0#af5f00255&|a+0#00e0e07&|r|g|)+0#e000e06&| +0#0000000&@57
+@75
+|~+0#4040ff13&| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+| +0#0000000&@56|5@1|,|1| @9|B|o|t| 
index df2bf5c97db1271e1b565186812e692a18b01197..bebd28229d222dfb6f74dbaf18b7449c96b5ca87 100644 (file)
@@ -1,5 +1,6 @@
 " Vim :echo commands
 
+
 echo        "Answer = " 42
 echon       "Answer = " 42
 echomsg     "Answer = " 42
@@ -7,10 +8,25 @@ echowindow  "Answer = " 42
 echoerr     "Answer = " 42
 echoconsole "Answer = " 42
 
-echo "following command is :|" | |
+
+" trailing bar vs OR operator
+
+" OR operator
+echo foo || bar
+echo foo ||
+      \ bar
+
+" following command is :|
+echo "Foo" | |
+
+" invalid expression
+echo "Foo" ||
 
 echohl WarningMsg | echo "Don't panic!" | echohl None
 
+
+" line continuations
+
 echo "Answer = "
      "\ comment
       \ 42
@@ -20,11 +36,14 @@ echo
      "\ comment
       \ 42
 
+
+" trailing bar and comments
+
 " :echo without {expr}
 echo| echo "Foo"
 
 " trailing comment needs |
-echo "foo" | " comment
+echo "Foo" | " comment
 
 
 " Issue #9987 (parenthesised argument - not a function call)
@@ -36,3 +55,4 @@ if 123
 else
        echo 'bar'
 endif
+
index 2ec507e1c114d2c87dbc9992f4e9b61528a3b970..f36f8a7d81fb9e856f34da5cd20470c014c63008 100644 (file)
@@ -1,5 +1,6 @@
 " Vim :execute command
 
+
 " :help :execute
 
 execute "buffer" nextbuf
@@ -15,8 +16,22 @@ if 0
 endif
 execute 'while i < 5 | echo i | let i = i + 1 | endwhile'
 
+
+" trailing bar vs OR operator
+
+" OR operator
+execute foo || bar ? "Foo" : "NotFoo"
+execute foo ||
+      \ bar ? "Foo" : "NotFoo"
+
 " following command is :|"
-execute "call Foo()" | |
+execute "Foo" | |
+
+" invalid expression
+execute "Foo" ||
+
+
+" line continuations
 
 execute "call"
       "\ comment
@@ -27,11 +42,14 @@ execute
       "\ comment
       \ "Foo()"
 
+
+" trailing bar and comments
+
 " :execute without {expr}
 execute| echo "Foo"
 
 " trailing comment needs |
-execute "foo" | " comment
+execute "Foo" | " comment
 
 
 " Issue #9987 (parenthesised argument - not a function call)
@@ -39,3 +57,4 @@ execute "foo" | " comment
 " FIXME: execute is ex command not builtin function
 let foo = {'arg': "call Foo()"}
 execute (foo.arg)
+
index 0021b7433a93fc43f6f581199e5990ba461251f1..6b91ce7ca7c630239f43d72788bbdcbb33d3d130 100644 (file)
@@ -2,7 +2,7 @@
 " Language:       Vim script
 " Maintainer:     Hirohito Higashi <h.east.727 ATMARK gmail.com>
 "         Doug Kearns <dougkearns@gmail.com>
-" Last Change:    2025 Jun 20
+" Last Change:    2025 Jun 23
 " Former Maintainer: Charles E. Campbell
 
 " DO NOT CHANGE DIRECTLY.
@@ -1280,8 +1280,12 @@ syn region       vimEcho
       \ start="\<echoc\%[onsole]\>"
       \ start="\<echon\>"
       \ start="\<echow\%[indow]\>"
-      \ skip=+\\|\|\n\s*\\\|\n\s*"\\ +
-      \ matchgroup=vimCmdSep end="|" excludenl end="$" contains=@vimContinue,@vimExprList transparent
+      \ skip=+\\|\|||\|\n\s*\%(\\\|["#]\\ \)+
+      \ end="\ze|"
+      \ excludenl end="$"
+      \ nextgroup=vimCmdSep
+      \ contains=@vimContinue,@vimExprList
+      \ transparent
 
 syn match      vimEchohl       "\<echohl\=\>"  skipwhite nextgroup=vimGroup,vimHLGroup,vimEchohlNone
 syn case ignore
@@ -1290,7 +1294,15 @@ syn case match
 
 syn cluster    vimEcho contains=vimEcho,vimEchohl
 
-syn region     vimExecute      matchgroup=vimCommand start="\<exe\%[cute]\>" skip=+\\|\|\n\s*\\\|\n\s*"\\ + matchgroup=vimCmdSep end="|" excludenl end="$" contains=@vimContinue,@vimExprList transparent
+syn region     vimExecute
+      \ matchgroup=vimCommand
+      \ start="\<exe\%[cute]\>"
+      \ skip=+\\|\|||\|\n\s*\%(\\\|["#]\\ \)+
+      \ end="\ze|"
+      \ excludenl end="$"
+      \ nextgroup=vimCmdSep
+      \ contains=@vimContinue,@vimExprList
+      \ transparent
 
 " Filter: {{{2
 " ======