changeset 33893:4cdbc09512f4

runtime(vim): Update syntax file and syntax test (#13632) Commit: https://github.com/vim/vim/commit/4e043b1fc7eeba2f726bbca3d50a4e872c8cb658 Author: dkearns <dougkearns@gmail.com> Date: Wed Dec 6 08:58:40 2023 +1100 runtime(vim): Update syntax file and syntax test (https://github.com/vim/vim/issues/13632) Add missing assignment operators (:let*=, :let/= and :let%=). Signed-off-by: Doug Kearns <dougkearns@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
author Christian Brabandt <cb@256bit.org>
date Sun, 10 Dec 2023 15:16:29 +0100
parents d90f75f84362
children cf2ae76cbbf7
files runtime/syntax/testdir/dumps/vim_00.dump runtime/syntax/testdir/dumps/vim_01.dump runtime/syntax/testdir/dumps/vim_99.dump runtime/syntax/testdir/dumps/vim_keymap_00.dump runtime/syntax/testdir/dumps/vim_keymap_01.dump runtime/syntax/testdir/dumps/vim_keymap_99.dump runtime/syntax/testdir/dumps/vim_variables_00.dump runtime/syntax/testdir/dumps/vim_variables_99.dump runtime/syntax/testdir/input/vim.vim runtime/syntax/testdir/input/vim_keymap.vim runtime/syntax/testdir/input/vim_variables.vim runtime/syntax/vim.vim
diffstat 12 files changed, 139 insertions(+), 87 deletions(-) [+]
line wrap: on
line diff
rename from runtime/syntax/testdir/dumps/vim_00.dump
rename to runtime/syntax/testdir/dumps/vim_keymap_00.dump
--- a/runtime/syntax/testdir/dumps/vim_00.dump
+++ b/runtime/syntax/testdir/dumps/vim_keymap_00.dump
@@ -17,4 +17,4 @@
 |s+0#af5f00255&|c|r|i|p|t|e|n|c|o|d|i|n|g| +0#0000000&|u|t|f|-+0#af5f00255&|8+0#e000002&| +0#0000000&@54
 @75
 |@+0#4040ff13&@2| @71
-|"+0#0000000&|i|n|p|u|t|/|v|i|m|.|v|i|m|"| |2|6|L|,| |3|9@1|2|B| @30|1|,|1| @10|T|o|p| 
+|"+0#0000000&|i|n|p|u|t|/|v|i|m|_|k|e|y|m|a|p|.|v|i|m|"| |2|6|L|,| |3|9@1|2|B| @23|1|,|1| @10|T|o|p| 
rename from runtime/syntax/testdir/dumps/vim_01.dump
rename to runtime/syntax/testdir/dumps/vim_keymap_01.dump
rename from runtime/syntax/testdir/dumps/vim_99.dump
rename to runtime/syntax/testdir/dumps/vim_keymap_99.dump
new file mode 100644
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_variables_00.dump
@@ -0,0 +1,20 @@
+>"+0#0000e05#ffffff0| |V|i|m| |v|a|r|i|a|b|l|e| |h|i|g|h|l|i|g|h|t|i|n|g| +0#0000000&@47
+@75
+|l+0#af5f00255&|e|t| +0#0000000&|f+0#00e0e07&|o@1| +0#0000000&|=+0#af5f00255&| +0#0000000&|e|x|p|r| @60
+@75
+|l+0#af5f00255&|e|t| +0#0000000&|f+0#00e0e07&|o@1| +0#0000000&|++0#af5f00255&|=| +0#0000000&|e|x|p|r| @59
+|l+0#af5f00255&|e|t| +0#0000000&|f+0#00e0e07&|o@1| +0#0000000&|-+0#af5f00255&|=| +0#0000000&|e|x|p|r| @59
+|l+0#af5f00255&|e|t| +0#0000000&|f+0#00e0e07&|o@1| +0#0000000&|*+0#af5f00255&|=| +0#0000000&|e|x|p|r| @59
+|l+0#af5f00255&|e|t| +0#0000000&|f+0#00e0e07&|o@1| +0#0000000&|/+0#af5f00255&|=| +0#0000000&|e|x|p|r| @59
+|l+0#af5f00255&|e|t| +0#0000000&|f+0#00e0e07&|o@1| +0#0000000&|%+0#af5f00255&|=| +0#0000000&|e|x|p|r| @59
+|l+0#af5f00255&|e|t| +0#0000000&|f+0#00e0e07&|o@1| +0#0000000&|.+0#af5f00255&|=| +0#0000000&|e|x|p|r| @59
+|l+0#af5f00255&|e|t| +0#0000000&|f+0#00e0e07&|o@1| +0#0000000&|.+0#af5f00255&@1|=| +0#0000000&|e|x|p|r| @58
+|~+0#4040ff13&| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|"+0#0000000&|i|n|p|u|t|/|v|i|m|_|v|a|r|i|a|b|l|e|s|.|v|i|m|"| |1@1|L|,| |1|5|8|B| @21|1|,|1| @10|A|l@1| 
new file mode 100644
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_variables_99.dump
@@ -0,0 +1,20 @@
+|"+0#0000e05#ffffff0| |V|i|m| |v|a|r|i|a|b|l|e| |h|i|g|h|l|i|g|h|t|i|n|g| +0#0000000&@47
+@75
+|l+0#af5f00255&|e|t| +0#0000000&|f+0#00e0e07&|o@1| +0#0000000&|=+0#af5f00255&| +0#0000000&|e|x|p|r| @60
+@75
+|l+0#af5f00255&|e|t| +0#0000000&|f+0#00e0e07&|o@1| +0#0000000&|++0#af5f00255&|=| +0#0000000&|e|x|p|r| @59
+|l+0#af5f00255&|e|t| +0#0000000&|f+0#00e0e07&|o@1| +0#0000000&|-+0#af5f00255&|=| +0#0000000&|e|x|p|r| @59
+|l+0#af5f00255&|e|t| +0#0000000&|f+0#00e0e07&|o@1| +0#0000000&|*+0#af5f00255&|=| +0#0000000&|e|x|p|r| @59
+|l+0#af5f00255&|e|t| +0#0000000&|f+0#00e0e07&|o@1| +0#0000000&|/+0#af5f00255&|=| +0#0000000&|e|x|p|r| @59
+|l+0#af5f00255&|e|t| +0#0000000&|f+0#00e0e07&|o@1| +0#0000000&|%+0#af5f00255&|=| +0#0000000&|e|x|p|r| @59
+|l+0#af5f00255&|e|t| +0#0000000&|f+0#00e0e07&|o@1| +0#0000000&|.+0#af5f00255&|=| +0#0000000&|e|x|p|r| @59
+>l+0#af5f00255&|e|t| +0#0000000&|f+0#00e0e07&|o@1| +0#0000000&|.+0#af5f00255&@1|=| +0#0000000&|e|x|p|r| @58
+|~+0#4040ff13&| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|"+0#0000000&|i|n|p|u|t|/|v|i|m|_|v|a|r|i|a|b|l|e|s|.|v|i|m|"| |1@1|L|,| |1|5|8|B| @21|1@1|,|1| @9|A|l@1| 
rename from runtime/syntax/testdir/input/vim.vim
rename to runtime/syntax/testdir/input/vim_keymap.vim
new file mode 100644
--- /dev/null
+++ b/runtime/syntax/testdir/input/vim_variables.vim
@@ -0,0 +1,11 @@
+" Vim variable highlighting
+
+let foo = expr
+
+let foo += expr
+let foo -= expr
+let foo *= expr
+let foo /= expr
+let foo %= expr
+let foo .= expr
+let foo ..= expr
--- a/runtime/syntax/vim.vim
+++ b/runtime/syntax/vim.vim
@@ -4,6 +4,7 @@
 " Last Change:	May 09, 2023
 " 	2023 Nov 12 by Vim Project (:let-heredoc improvements)
 " 	2023 Nov 20 by Vim Project (:loadkeymap improvements)
+" 	2023 Dec 06 by Vim Project (add missing :let{op}= assignment operators)
 " Version:	9.0-25
 " URL:	http://www.drchip.org/astronaut/vim/index.html#SYNTAX_VIM
 " Automatically generated keyword lists: {{{1
@@ -233,7 +234,7 @@ syn keyword vimAugroupKey contained	aug[
 " Operators: {{{2
 " =========
 syn cluster	vimOperGroup	contains=vimEnvvar,vimFunc,vimFuncVar,vimOper,vimOperParen,vimNumber,vimString,vimType,vimRegister,vimContinue,vim9Comment,vimVar
-syn match	vimOper	"||\|&&\|[-+.!]"				skipwhite nextgroup=vimString,vimSpecFile
+syn match	vimOper	"||\|&&\|[-+*/%.!]"				skipwhite nextgroup=vimString,vimSpecFile
 syn match	vimOper	"\%#=1\(==\|!=\|>=\|<=\|=\~\|!\~\|>\|<\|=\|!\~#\)[?#]\{0,2}"	skipwhite nextgroup=vimString,vimSpecFile
 syn match	vimOper	"\(\<is\|\<isnot\)[?#]\{0,2}\>"			skipwhite nextgroup=vimString,vimSpecFile
 syn region	vimOperParen 	matchgroup=vimParenSep	start="(" end=")" contains=vimoperStar,@vimOperGroup