runtime(vim): Update base-syntax, match ternary and falsy operators
fixes: #14423
fixes: #16227
closes: #16484
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
diff --git a/runtime/syntax/generator/vim.vim.base b/runtime/syntax/generator/vim.vim.base
index 23e3423..8029073 100644
--- a/runtime/syntax/generator/vim.vim.base
+++ b/runtime/syntax/generator/vim.vim.base
@@ -2,7 +2,7 @@
" Language: Vim script
" Maintainer: Hirohito Higashi <h.east.727 ATMARK gmail.com>
" Doug Kearns <dougkearns@gmail.com>
-" Last Change: 2025 Jan 19
+" Last Change: 2025 Jan 20
" Former Maintainer: Charles E. Campbell
" DO NOT CHANGE DIRECTLY.
@@ -283,6 +283,10 @@
syn cluster vimOperGroup contains=vimEnvvar,vimFunc,vimFuncVar,vimOper,vimOperParen,vimNumber,vimString,vimRegister,@vimContinue,vim9Comment,vimVar,vimBoolean,vimNull
syn match vimOper "\a\@<!!" skipwhite nextgroup=vimString,vimSpecFile
syn match vimOper "||\|&&\|[-+*/%.]" skipwhite nextgroup=vimString,vimSpecFile
+syn match vimOper "?" skipwhite nextgroup=@vimExprList
+" distinguish ternary : from ex-colon
+syn match vimOper "\s\@1<=:\ze\s\|\s\@1<=:$" skipwhite nextgroup=@vimExprList
+syn match vimOper "??" skipwhite nextgroup=@vimExprList
syn match vimOper "=" skipwhite nextgroup=vimString,vimSpecFile
syn match vimOper "\%#=1\%(==\|!=\|>=\|<=\|=\~\|!\~\|>\|<\)[?#]\=" skipwhite nextgroup=vimString,vimSpecFile
syn match vimOper "\<is\%(not\)\=\>" skipwhite nextgroup=vimString,vimSpecFile
@@ -298,9 +302,9 @@
syn cluster vimFuncList contains=vimFuncBang,vimFunctionError,vimFuncKey,vimFuncSID,Tag
syn cluster vimDefList contains=vimFuncBang,vimFunctionError,vimDefKey,vimFuncSID,Tag
-syn cluster vimFuncBodyCommon contains=@vimCmdList,vimCmplxRepeat,vimContinue,vimCtrlChar,vimDef,vimEnvvar,vimFBVar,vimFunc,vimFunction,vimLetHereDoc,vimNotation,vimNotFunc,vimNumber,vimOper,vimOperParen,vimRegister,vimSearch,vimSpecFile,vimString,vimSubst,vimFuncFold,vimDefFold
-syn cluster vimFuncBodyList contains=@vimFuncBodyCommon,vimComment,vimLineComment,vimFuncVar,vimInsert,vimConst,vimLet
-syn cluster vimDefBodyList contains=@vimFuncBodyCommon,vim9Comment,vim9LineComment,vim9Const,vim9Final,vim9Var,vim9Null,vim9Boolean,vim9For
+syn cluster vimFuncBodyCommon contains=@vimCmdList,vimCmplxRepeat,vimContinue,vimCtrlChar,vimDef,vimEnvvar,vimFBVar,vimFunc,vimFunction,vimLetHereDoc,vimNotation,vimNotFunc,vimNumber,vimOper,vimOperParen,vimRegister,vimSpecFile,vimString,vimSubst,vimFuncFold,vimDefFold
+syn cluster vimFuncBodyList contains=@vimFuncBodyCommon,vimComment,vimLineComment,vimFuncVar,vimInsert,vimConst,vimLet,vimSearch
+syn cluster vimDefBodyList contains=@vimFuncBodyCommon,vim9Comment,vim9LineComment,vim9Const,vim9Final,vim9Var,vim9Null,vim9Boolean,vim9For,vim9Search
syn region vimFuncPattern contained matchgroup=vimOper start="/" end="$" contains=@vimSubstList
syn match vimFunction "\<fu\%[nction]\>" skipwhite nextgroup=vimCmdSep,vimComment,vimFuncPattern contains=vimFuncKey
@@ -1017,8 +1021,10 @@
" Searches And Globals: {{{2
" ====================
-syn match vimSearch '^\s*[/?].*' contains=vimSearchDelim
+VimL syn match vimSearch '^\s*[/?].*' contains=vimSearchDelim
syn match vimSearchDelim '^\s*\zs[/?]\|[/?]$' contained
+Vim9 syn match vim9Search '^\s*:[/?].*' contains=vim9SearchDelim
+syn match vim9SearchDelim '^\s*\zs:[/?]\|[/?]$' contained contains=vimCmdSep
syn region vimGlobal matchgroup=Statement start='\<g\%[lobal]!\=/' skip='\\.' end='/' skipwhite nextgroup=vimSubst1
syn region vimGlobal matchgroup=Statement start='\<v\%[global]!\=/' skip='\\.' end='/' skipwhite nextgroup=vimSubst1
@@ -1399,8 +1405,8 @@
hi def link vimQuoteEscape vimEscape
hi def link vimRegister SpecialChar
hi def link vimScriptDelim Comment
- hi def link vimSearchDelim Statement
hi def link vimSearch vimString
+ hi def link vimSearchDelim Delimiter
hi def link vimSep Delimiter
hi def link vimSet vimCommand
hi def link vimSetAll vimOption
@@ -1493,6 +1499,8 @@
hi def link vim9MethodNameError vimFunctionError
hi def link vim9Null Constant
hi def link vim9Public vimCommand
+ hi def link vim9Search vimString
+ hi def link vim9SearchDelim Delimiter
hi def link vim9Static vimCommand
hi def link vim9Super Identifier
hi def link vim9This Identifier
diff --git a/runtime/syntax/testdir/dumps/vim9_ex_commands_00.dump b/runtime/syntax/testdir/dumps/vim9_ex_commands_00.dump
index d681dcf..3cecb58 100644
--- a/runtime/syntax/testdir/dumps/vim9_ex_commands_00.dump
+++ b/runtime/syntax/testdir/dumps/vim9_ex_commands_00.dump
@@ -12,7 +12,7 @@
|:|h+0#af5f00255&|e|l|p| +0#0000000&@69
@1|:|h+0#af5f00255&|e|l|p| +0#0000000&@68
|:| |h+0#af5f00255&|e|l|p| +0#0000000&@68
-@1|:| |h+0#af5f00255&|e|l|p| +0#0000000&@67
+@1|:+0#af5f00255&| +0#0000000&|h+0#00e0e07&|e|l|p| +0#0000000&|#+0#0000e05&| |F+0#0000001#ffff4012|I|X|M|E| +0#0000000#ffffff0@59
@75
|:|2+0#af5f00255&|m|a|t|c|h| +0#0000000&@67
|:|3+0#af5f00255&|m|a|t|c|h| +0#0000000&@67
diff --git a/runtime/syntax/testdir/dumps/vim9_ex_commands_01.dump b/runtime/syntax/testdir/dumps/vim9_ex_commands_01.dump
index 58ba6ab..19837f2 100644
--- a/runtime/syntax/testdir/dumps/vim9_ex_commands_01.dump
+++ b/runtime/syntax/testdir/dumps/vim9_ex_commands_01.dump
@@ -1,5 +1,5 @@
|:+0&#ffffff0| |h+0#af5f00255&|e|l|p| +0#0000000&@68
-@1|:| |h+0#af5f00255&|e|l|p| +0#0000000&@67
+@1|:+0#af5f00255&| +0#0000000&|h+0#00e0e07&|e|l|p| +0#0000000&|#+0#0000e05&| |F+0#0000001#ffff4012|I|X|M|E| +0#0000000#ffffff0@59
@75
|:|2+0#af5f00255&|m|a|t|c|h| +0#0000000&@67
|:|3+0#af5f00255&|m|a|t|c|h| +0#0000000&@67
diff --git a/runtime/syntax/testdir/dumps/vim9_expr_00.dump b/runtime/syntax/testdir/dumps/vim9_expr_00.dump
index 2c7da39..373b3a0 100644
--- a/runtime/syntax/testdir/dumps/vim9_expr_00.dump
+++ b/runtime/syntax/testdir/dumps/vim9_expr_00.dump
@@ -2,19 +2,19 @@
|#+0#0000e05&| |V|i|m|9|-|s|c|r|i|p|t| |e|x|p|r|e|s@1|i|o|n|s| +0#0000000&@49
@75
@75
-|#+0#0000e05&| |C|o|m@1|a|n|d| |{|e|x|p|r|}| |a|r|g|u|m|e|n|t|s| +0#0000000&@48
+|#+0#0000e05&| |O|p|e|r|a|t|o|r|s| +0#0000000&@63
@75
-|i+0#af5f00255&|f| +0#0000000&|t+0#e000002&|r|u|e| +0#0000000&@67
-@2|e+0#af5f00255&|c|h|o| +0#0000000&|t+0#e000002&|r|u|e| +0#0000000&@63
-|e+0#af5f00255&|l|s|e|i|f| +0#0000000&|f+0#e000002&|a|l|s|e| +0#0000000&@62
-@2|e+0#af5f00255&|c|h|o| +0#0000000&|f+0#e000002&|a|l|s|e| +0#0000000&@62
-|e+0#af5f00255&|n|d|i|f| +0#0000000&@69
+|#+0#0000e05&| |T|e|r|n|a|r|y| +0#0000000&@65
@75
-|w+0#af5f00255&|h|i|l|e| +0#0000000&|t+0#e000002&|r|u|e| +0#0000000&@64
-@2|b+0#af5f00255&|r|e|a|k| +0#0000000&@67
-|e+0#af5f00255&|n|d|w|h|i|l|e| +0#0000000&@66
+|e+0#af5f00255&|c|h|o| +0#0000000&|e+0#00e0e07&|x|p|r| +0#0000000&|?+0#af5f00255&| +0#0000000&|e+0#00e0e07&|x|p|r| +0#0000000&|:+0#af5f00255&| +0#0000000&|e+0#00e0e07&|x|p|r| +0#0000000&@51
@75
-|d+0#af5f00255&|e|f| +0#0000000&|F|o@1|(+0#e000e06&|)|:+0#0000000&| |b+0#00e0003&|o@1|l| +0#0000000&@59
-@2|r+0#af5f00255&|e|t|u|r|n| +0#0000000&|t+0#e000002&|r|u|e| +0#0000000&@61
-|e+0#af5f00255&|n|d@1|e|f| +0#0000000&@68
+|e+0#af5f00255&|c|h|o| +0#0000000&|l+0#00e0e07&|n|u|m| +0#0000000&|=+0#af5f00255&@1| +0#0000000&|1+0#e000002&| +0#0000000&|?+0#af5f00255&| +0#0000000&|"+0#e000002&|t|o|p|"| +0#0000000&|:+0#af5f00255&| +0#0000000&|l+0#00e0e07&|n|u|m| +0#0000000&@45
+|e+0#af5f00255&|c|h|o| +0#0000000&|l+0#00e0e07&|n|u|m| +0#0000000&|=+0#af5f00255&@1| +0#0000000&|1+0#e000002&| +0#0000000&|?+0#af5f00255&| +0#0000000&|"+0#e000002&|t|o|p|"| +0#0000000&|:+0#af5f00255&| +0#0000000&|l+0#00e0e07&|n|u|m| +0#0000000&|=+0#af5f00255&@1| +0#0000000&|1+0#e000002&|0@2| +0#0000000&|?+0#af5f00255&| +0#0000000&|"+0#e000002&|l|a|s|t|"| +0#0000000&|:+0#af5f00255&| +0#0000000&|l+0#00e0e07&|n|u|m| +0#0000000&@21
+@75
+|e+0#af5f00255&|c|h|o| +0#0000000&|l+0#00e0e07&|n|u|m| +0#0000000&|=+0#af5f00255&@1| +0#0000000&|1+0#e000002&| +0#0000000&@60
+@8|?+0#af5f00255&| +0#0000000&|"+0#e000002&|t|o|p|"| +0#0000000&@59
+@8|:+0#af5f00255&| +0#0000000&|l+0#00e0e07&|n|u|m| +0#0000000&|=+0#af5f00255&@1| +0#0000000&|1+0#e000002&|0@2| +0#0000000&@52
+@16|?+0#af5f00255&| +0#0000000&|"+0#e000002&|l|a|s|t|"| +0#0000000&@50
+@16|:+0#af5f00255&| +0#0000000&|l+0#00e0e07&|n|u|m| +0#0000000&@52
+|e+0#af5f00255&|c|h|o| +0#0000000&|l+0#00e0e07&|n|u|m| +0#0000000&|=+0#af5f00255&@1| +0#0000000&|1+0#e000002&| +0#0000000&|?+0#af5f00255&| +0#0000000&@58
@57|1|,|1| @10|T|o|p|
diff --git a/runtime/syntax/testdir/dumps/vim9_expr_01.dump b/runtime/syntax/testdir/dumps/vim9_expr_01.dump
index 8cd3c68..3e822fd 100644
--- a/runtime/syntax/testdir/dumps/vim9_expr_01.dump
+++ b/runtime/syntax/testdir/dumps/vim9_expr_01.dump
@@ -1,20 +1,20 @@
-| +0&#ffffff0@1|b+0#af5f00255&|r|e|a|k| +0#0000000&@67
-|e+0#af5f00255&|n|d|w|h|i|l|e| +0#0000000&@66
+|e+0#af5f00255#ffffff0|c|h|o| +0#0000000&|l+0#00e0e07&|n|u|m| +0#0000000&|=+0#af5f00255&@1| +0#0000000&|1+0#e000002&| +0#0000000&@60
+@8|?+0#af5f00255&| +0#0000000&|"+0#e000002&|t|o|p|"| +0#0000000&@59
+@8|:+0#af5f00255&| +0#0000000&|l+0#00e0e07&|n|u|m| +0#0000000&|=+0#af5f00255&@1| +0#0000000&|1+0#e000002&|0@2| +0#0000000&@52
+@16|?+0#af5f00255&| +0#0000000&|"+0#e000002&|l|a|s|t|"| +0#0000000&@50
+@16|:+0#af5f00255&| +0#0000000&|l+0#00e0e07&|n|u|m| +0#0000000&@52
+>e+0#af5f00255&|c|h|o| +0#0000000&|l+0#00e0e07&|n|u|m| +0#0000000&|=+0#af5f00255&@1| +0#0000000&|1+0#e000002&| +0#0000000&|?+0#af5f00255&| +0#0000000&@58
+@8|"+0#e000002&|t|o|p|"| +0#0000000&|:+0#af5f00255&| +0#0000000&@59
+@8|l|n|u|m| |=+0#af5f00255&@1| +0#0000000&|1+0#e000002&|0@2| +0#0000000&|?+0#af5f00255&| +0#0000000&@52
+@16|"+0#e000002&|l|a|s|t|"| +0#0000000&|:+0#af5f00255&| +0#0000000&@50
+@16|l|n|u|m| @54
@75
-|d+0#af5f00255&|e|f| +0#0000000&|F|o@1|(+0#e000e06&|)|:+0#0000000&| |b+0#00e0003&|o@1|l| +0#0000000&@59
-@2|r+0#af5f00255&|e|t|u|r|n| +0#0000000&|t+0#e000002&|r|u|e| +0#0000000&@61
->e+0#af5f00255&|n|d@1|e|f| +0#0000000&@68
-@75
-|~+0#4040ff13&| @73
-|~| @73
-|~| @73
-|~| @73
-|~| @73
-|~| @73
-|~| @73
-|~| @73
-|~| @73
-|~| @73
-|~| @73
-|~| @73
-| +0#0000000&@56|1|9|,|1| @9|B|o|t|
+|e+0#af5f00255&|c|h|o| +0#0000000&|t+0#e000002&|r|u|e| +0#0000000&|?+0#af5f00255&| +0#0000000&|t+0#e000002&|r|u|e| +0#0000000&|:+0#af5f00255&| +0#0000000&|f+0#e000002&|a|l|s|e| +0#0000000&@50
+|e+0#af5f00255&|c|h|o| +0#0000000&|1+0#e000002&| +0#0000000&|?+0#af5f00255&| +0#0000000&|1+0#e000002&| +0#0000000&|:+0#af5f00255&| +0#0000000&|0+0#e000002&| +0#0000000&@60
+|e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|f|o@1|"| +0#0000000&|?+0#af5f00255&| +0#0000000&|"+0#e000002&|f|o@1|"| +0#0000000&|:+0#af5f00255&| +0#0000000&|"+0#e000002&|b|a|r|"| +0#0000000&@48
+|e+0#af5f00255&|c|h|o| +0#0000000&|f+0#00e0e07&|o@1| +0#0000000&|?+0#af5f00255&| +0#0000000&|f+0#00e0e07&|o@1| +0#0000000&|:+0#af5f00255&| +0#0000000&|b+0#00e0e07&|a|r| +0#0000000&@54
+|e+0#af5f00255&|c|h|o| +0#0000000&|g+0#00e0e07&|:|f|o@1| +0#0000000&|?+0#af5f00255&| +0#0000000&|g+0#00e0e07&|:|f|o@1| +0#0000000&|:+0#af5f00255&| +0#0000000&|g+0#00e0e07&|:|b|a|r| +0#0000000&@48
+|e+0#af5f00255&|c|h|o| +0#0000000&|$+0#e000e06&|F|O@1| +0#0000000&|?+0#af5f00255&| +0#0000000&|$+0#e000e06&|F|O@1| +0#0000000&|:+0#af5f00255&| +0#0000000&|$+0#e000e06&|B|A|R| +0#0000000&@51
+|e+0#af5f00255&|c|h|o| +0#0000000&|T|r|u|e|(+0#e000e06&|)| +0#0000000&|?+0#af5f00255&| +0#0000000&|T|r|u|e|(+0#e000e06&|)| +0#0000000&|:+0#af5f00255&| +0#0000000&|F|a|l|s|e|(+0#e000e06&|)| +0#0000000&@44
+|e+0#af5f00255&|c|h|o| +0#0000000&|@+0#e000e06&|a| +0#0000000&|?+0#af5f00255&| +0#0000000&|@+0#e000e06&|a| +0#0000000&|:+0#af5f00255&| +0#0000000&|@+0#e000e06&|b| +0#0000000&@57
+@57|1|9|,|1| @9|1|4|%|
diff --git a/runtime/syntax/testdir/dumps/vim9_expr_02.dump b/runtime/syntax/testdir/dumps/vim9_expr_02.dump
new file mode 100644
index 0000000..f8df58e
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim9_expr_02.dump
@@ -0,0 +1,20 @@
+|e+0#af5f00255#ffffff0|c|h|o| +0#0000000&|@+0#e000e06&|a| +0#0000000&|?+0#af5f00255&| +0#0000000&|@+0#e000e06&|a| +0#0000000&|:+0#af5f00255&| +0#0000000&|@+0#e000e06&|b| +0#0000000&@57
+|e+0#af5f00255&|c|h|o| +0#0000000&|(+0#e000e06&|1+0#e000002&|)+0#e000e06&| +0#0000000&|?+0#af5f00255&| +0#0000000&|(+0#e000e06&|1+0#e000002&|)+0#e000e06&| +0#0000000&|:+0#af5f00255&| +0#0000000&|(+0#e000e06&|0+0#e000002&|)+0#e000e06&| +0#0000000&@54
+@75
+|#+0#0000e05&| |F|a|l|s|y| +0#0000000&@67
+@75
+>e+0#af5f00255&|c|h|o| +0#0000000&|e+0#00e0e07&|x|p|r| +0#0000000&|?+0#af5f00255&@1| +0#0000000&|e+0#00e0e07&|x|p|r| +0#0000000&@57
+@75
+|e+0#af5f00255&|c|h|o| +0#0000000&|t+0#00e0e07&|h|e|L|i|s|t| +0#0000000&|?+0#af5f00255&@1| +0#0000000&|'+0#e000002&|l|i|s|t| |i|s| |e|m|p|t|y|'| +0#0000000&@43
+|e+0#af5f00255&|c|h|o| +0#0000000&|G|e|t|N|a|m|e|(+0#e000e06&|)| +0#0000000&|?+0#af5f00255&@1| +0#0000000&|'+0#e000002&|u|n|k|n|o|w|n|'| +0#0000000&@47
+@75
+|e+0#af5f00255&|c|h|o| +0#0000000&|t+0#00e0e07&|h|e|L|i|s|t| +0#0000000&@62
+@6|\+0#e000e06&| +0#0000000&|?+0#af5f00255&@1| +0#0000000&|'+0#e000002&|l|i|s|t| |i|s| |e|m|p|t|y|'| +0#0000000&@48
+|e+0#af5f00255&|c|h|o| +0#0000000&|t+0#00e0e07&|h|e|L|i|s|t| +0#0000000&|?+0#af5f00255&@1| +0#0000000&@59
+@6|\+0#e000e06&| +0#0000000&|'+0#e000002&|l|i|s|t| |i|s| |e|m|p|t|y|'| +0#0000000&@51
+@75
+|e+0#af5f00255&|c|h|o| +0#0000000&|t+0#e000002&|r|u|e| +0#0000000&|?+0#af5f00255&@1| +0#0000000&|t+0#e000002&|r|u|e| +0#0000000&@57
+|e+0#af5f00255&|c|h|o| +0#0000000&|1+0#e000002&| +0#0000000&|?+0#af5f00255&@1| +0#0000000&|1+0#e000002&| +0#0000000&@63
+|e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|f|o@1|"| +0#0000000&|?+0#af5f00255&@1| +0#0000000&|"+0#e000002&|f|o@1|"| +0#0000000&@55
+|e+0#af5f00255&|c|h|o| +0#0000000&|f+0#00e0e07&|o@1| +0#0000000&|?+0#af5f00255&@1| +0#0000000&|f+0#00e0e07&|o@1| +0#0000000&@59
+@57|3|7|,|1| @9|3|5|%|
diff --git a/runtime/syntax/testdir/dumps/vim9_expr_03.dump b/runtime/syntax/testdir/dumps/vim9_expr_03.dump
new file mode 100644
index 0000000..6f824f2
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim9_expr_03.dump
@@ -0,0 +1,20 @@
+|e+0#af5f00255#ffffff0|c|h|o| +0#0000000&|f+0#00e0e07&|o@1| +0#0000000&|?+0#af5f00255&@1| +0#0000000&|f+0#00e0e07&|o@1| +0#0000000&@59
+|e+0#af5f00255&|c|h|o| +0#0000000&|g+0#00e0e07&|:|f|o@1| +0#0000000&|?+0#af5f00255&@1| +0#0000000&|g+0#00e0e07&|:|f|o@1| +0#0000000&@55
+|e+0#af5f00255&|c|h|o| +0#0000000&|$+0#e000e06&|F|O@1| +0#0000000&|?+0#af5f00255&@1| +0#0000000&|$+0#e000e06&|F|O@1| +0#0000000&@57
+|e+0#af5f00255&|c|h|o| +0#0000000&|T|r|u|e|(+0#e000e06&|)| +0#0000000&|?+0#af5f00255&@1| +0#0000000&|T|r|u|e|(+0#e000e06&|)| +0#0000000&@53
+|e+0#af5f00255&|c|h|o| +0#0000000&|@+0#e000e06&|a| +0#0000000&|?+0#af5f00255&@1| +0#0000000&|@+0#e000e06&|a| +0#0000000&@61
+>e+0#af5f00255&|c|h|o| +0#0000000&|(+0#e000e06&|1+0#e000002&|)+0#e000e06&| +0#0000000&|?+0#af5f00255&@1| +0#0000000&|(+0#e000e06&|1+0#e000002&|)+0#e000e06&| +0#0000000&@59
+@75
+@75
+|#+0#0000e05&| |C|o|m@1|a|n|d| |{|e|x|p|r|}| |a|r|g|u|m|e|n|t|s| +0#0000000&@48
+@75
+|i+0#af5f00255&|f| +0#0000000&|t+0#e000002&|r|u|e| +0#0000000&@67
+@2|e+0#af5f00255&|c|h|o| +0#0000000&|t+0#e000002&|r|u|e| +0#0000000&@63
+|e+0#af5f00255&|l|s|e|i|f| +0#0000000&|f+0#e000002&|a|l|s|e| +0#0000000&@62
+@2|e+0#af5f00255&|c|h|o| +0#0000000&|f+0#e000002&|a|l|s|e| +0#0000000&@62
+|e+0#af5f00255&|n|d|i|f| +0#0000000&@69
+@75
+|w+0#af5f00255&|h|i|l|e| +0#0000000&|t+0#e000002&|r|u|e| +0#0000000&@64
+@2|b+0#af5f00255&|r|e|a|k| +0#0000000&@67
+|e+0#af5f00255&|n|d|w|h|i|l|e| +0#0000000&@66
+@57|5@1|,|1| @9|5@1|%|
diff --git a/runtime/syntax/testdir/dumps/vim9_expr_04.dump b/runtime/syntax/testdir/dumps/vim9_expr_04.dump
new file mode 100644
index 0000000..32a423b
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim9_expr_04.dump
@@ -0,0 +1,20 @@
+|e+0#af5f00255#ffffff0|n|d|w|h|i|l|e| +0#0000000&@66
+@75
+|d+0#af5f00255&|e|f| +0#0000000&|F|o@1|(+0#e000e06&|)|:+0#0000000&| |b+0#00e0003&|o@1|l| +0#0000000&@59
+@2|r+0#af5f00255&|e|t|u|r|n| +0#0000000&|t+0#e000002&|r|u|e| +0#0000000&@61
+|e+0#af5f00255&|n|d@1|e|f| +0#0000000&@68
+> @74
+@75
+|#+0#0000e05&| |I|s@1|u|e| |#|1|4@1|2|3| |(|v|i|m|.|v|i|m|:| |O|p|t| |o|u|t| |o|f| |v|i|m|S|e|a|r|c|h|*|)| +0#0000000&@27
+@75
+|:|?+0#e000e06&|t+0#e000002&|r|u|t|h|y| +0#0000000&@66
+|c+0#af5f00255&|o|n|s|t| +0#0000000&|t+0#00e0e07&|r|u|t|h|y|:+0#0000000&| |n+0#00e0003&|u|m|b|e|r| +0#0000000&|=+0#af5f00255&| +0#0000000&|f+0#e000002&|a|l|s|e| +0#0000000&@46
+@4|?+0#af5f00255&| +0#0000000&|(+0#e000e06&|0+0#e000002&| +0#0000000&@66
+@4|)+0#e000e06&| +0#0000000&@69
+@4|:+0#af5f00255&| +0#0000000&|(+0#e000e06&|1+0#e000002&| +0#0000000&@66
+@4|)+0#e000e06&| +0#0000000&@69
+|e+0#af5f00255&|c|h|o| +0#0000000&|t+0#00e0e07&|r|u|t|h|y| +0#0000000&@63
+@75
+|d+0#af5f00255&|e|f| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&@65
+| +0#e000002&@1|:+0#0000000&|?+0#e000e06&|t+0#e000002&|r|u|t|h|y| +0#0000000&@64
+@57|7|3|,|0|-|1| @7|7|6|%|
diff --git a/runtime/syntax/testdir/dumps/vim9_expr_05.dump b/runtime/syntax/testdir/dumps/vim9_expr_05.dump
new file mode 100644
index 0000000..925ce68
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim9_expr_05.dump
@@ -0,0 +1,20 @@
+| +0#e000002#ffffff0@1|:+0#0000000&|?+0#e000e06&|t+0#e000002&|r|u|t|h|y| +0#0000000&@64
+@2|c+0#af5f00255&|o|n|s|t| +0#0000000&|t+0#00e0e07&|r|u|t|h|y|:+0#0000000&| |n+0#00e0003&|u|m|b|e|r| +0#0000000&|=+0#af5f00255&| +0#0000000&|f+0#e000002&|a|l|s|e| +0#0000000&@44
+@6|?+0#af5f00255&| +0#0000000&|(+0#e000e06&|0+0#e000002&| +0#0000000&@64
+@6|)+0#e000e06&| +0#0000000&@67
+@6|:+0#af5f00255&| +0#0000000&|(+0#e000e06&|1+0#e000002&| +0#0000000&@64
+@6>)+0#e000e06&| +0#0000000&@67
+@2|e+0#af5f00255&|c|h|o| +0#0000000&|t+0#00e0e07&|r|u|t|h|y| +0#0000000&@61
+|e+0#af5f00255&|n|d@1|e|f| +0#0000000&@68
+@75
+@75
+|#+0#0000e05&| |I|s@1|u|e| |#|1|6|2@1|7| |(|V|i|m|s|c|r|i|p|t| |t|e|r|n|a|r|y| |e|x|p|r|e|s@1|i|o|n| |h|i|g|h|l|i|g|h|t|i|n|g|)| +0#0000000&@16
+@75
+|v+0#af5f00255&|a|r| +0#0000000&|f+0#00e0e07&|o@1| +0#0000000&|=+0#af5f00255&| +0#0000000&|'+0#e000002&|f|o@1|'| +0#0000000&@24|#+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@25
+|v+0#af5f00255&|a|r| +0#0000000&|b+0#00e0e07&|a|r| +0#0000000&|=+0#af5f00255&| +0#0000000&|f|o@1| |=+0#af5f00255&@1| +0#0000000&|'+0#e000002&|f|o@1|'| +0#0000000&|?+0#af5f00255&| +0#0000000&|'+0#e000002&|b|a|r|'| +0#0000000&|:+0#af5f00255&| +0#0000000&|'+0#e000002&|b|a|z|'| +0#0000000&@36
+|v+0#af5f00255&|a|r| +0#0000000&|b+0#00e0e07&|a|z| +0#0000000&|=+0#af5f00255&| +0#0000000&|f|o@1| |=+0#af5f00255&@1| +0#0000000&|'+0#e000002&|f|o@1|'| +0#0000000&@52
+@12|\+0#e000e06&| +0#0000000&|?+0#af5f00255&| +0#0000000&|'+0#e000002&|b|a|z|'| +0#0000000&@53
+@12|\+0#e000e06&| +0#0000000&|:+0#af5f00255&| +0#0000000&|'+0#e000002&|b|a|r|'| +0#0000000&@53
+|v+0#af5f00255&|a|r| +0#0000000&|q+0#00e0e07&|u|x| +0#0000000&|=+0#af5f00255&| +0#0000000&|f|o@1| |=+0#af5f00255&@1| +0#0000000&|'+0#e000002&|f|o@1|'| +0#0000000&@52
+@12|?+0#af5f00255&| +0#0000000&|'+0#e000002&|q|u|x|'| +0#0000000&@20|#+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@25
+@57|9|1|,|7| @9|9|6|%|
diff --git a/runtime/syntax/testdir/dumps/vim9_expr_06.dump b/runtime/syntax/testdir/dumps/vim9_expr_06.dump
new file mode 100644
index 0000000..befcab3
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim9_expr_06.dump
@@ -0,0 +1,20 @@
+| +0&#ffffff0@11|?+0#af5f00255&| +0#0000000&|'+0#e000002&|q|u|x|'| +0#0000000&@20|#+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@25
+@12|:+0#af5f00255&| +0#0000000&|'+0#e000002&|q|u|x|'| +0#0000000&@20|#+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@25
+|e+0#af5f00255&|c|h|o| +0#0000000&|q+0#00e0e07&|u|x| +0#0000000&|?+0#af5f00255&@1| +0#0000000&|'+0#e000002&|q|u@1|x|'| +0#0000000&@56
+> @74
+|~+0#4040ff13&| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+| +0#0000000&@56|1|0|7|,|0|-|1| @6|B|o|t|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_commands_00.dump b/runtime/syntax/testdir/dumps/vim_ex_commands_00.dump
index 863ae38..8c54501 100644
--- a/runtime/syntax/testdir/dumps/vim_ex_commands_00.dump
+++ b/runtime/syntax/testdir/dumps/vim_ex_commands_00.dump
@@ -11,7 +11,7 @@
|:|h+0#af5f00255&|e|l|p| +0#0000000&@69
@1|:|h+0#af5f00255&|e|l|p| +0#0000000&@68
|:| |h+0#af5f00255&|e|l|p| +0#0000000&@68
-@1|:| |h+0#af5f00255&|e|l|p| +0#0000000&@67
+@1|:+0#af5f00255&| +0#0000000&|h+0#00e0e07&|e|l|p| +0#0000000&|#| |F|I|X|M|E| @59
@75
|:|2+0#af5f00255&|m|a|t|c|h| +0#0000000&@67
|:|3+0#af5f00255&|m|a|t|c|h| +0#0000000&@67
diff --git a/runtime/syntax/testdir/dumps/vim_ex_commands_01.dump b/runtime/syntax/testdir/dumps/vim_ex_commands_01.dump
index 23936b8..1f3f677 100644
--- a/runtime/syntax/testdir/dumps/vim_ex_commands_01.dump
+++ b/runtime/syntax/testdir/dumps/vim_ex_commands_01.dump
@@ -1,4 +1,4 @@
-| +0&#ffffff0|:| |h+0#af5f00255&|e|l|p| +0#0000000&@67
+| +0&#ffffff0|:+0#af5f00255&| +0#0000000&|h+0#00e0e07&|e|l|p| +0#0000000&|#| |F|I|X|M|E| @59
@75
|:|2+0#af5f00255&|m|a|t|c|h| +0#0000000&@67
|:|3+0#af5f00255&|m|a|t|c|h| +0#0000000&@67
diff --git a/runtime/syntax/testdir/dumps/vim_expr_01.dump b/runtime/syntax/testdir/dumps/vim_expr_01.dump
index ca2875d..8dc7041 100644
--- a/runtime/syntax/testdir/dumps/vim_expr_01.dump
+++ b/runtime/syntax/testdir/dumps/vim_expr_01.dump
@@ -17,4 +17,4 @@
|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
-@57|1|5|,|1| @10|9|%|
+@57|1|5|,|1| @10|6|%|
diff --git a/runtime/syntax/testdir/dumps/vim_expr_02.dump b/runtime/syntax/testdir/dumps/vim_expr_02.dump
index da1a0d9..901b5ff 100644
--- a/runtime/syntax/testdir/dumps/vim_expr_02.dump
+++ b/runtime/syntax/testdir/dumps/vim_expr_02.dump
@@ -17,4 +17,4 @@
|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|2|3|%|
+@57|3|2|,|0|-|1| @7|1|4|%|
diff --git a/runtime/syntax/testdir/dumps/vim_expr_03.dump b/runtime/syntax/testdir/dumps/vim_expr_03.dump
index 74655c8..bcffddf 100644
--- a/runtime/syntax/testdir/dumps/vim_expr_03.dump
+++ b/runtime/syntax/testdir/dumps/vim_expr_03.dump
@@ -17,4 +17,4 @@
|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
-@57|5|0|,|1| @9|3|9|%|
+@57|5|0|,|1| @9|2|4|%|
diff --git a/runtime/syntax/testdir/dumps/vim_expr_04.dump b/runtime/syntax/testdir/dumps/vim_expr_04.dump
index c760613..08c2f98 100644
--- a/runtime/syntax/testdir/dumps/vim_expr_04.dump
+++ b/runtime/syntax/testdir/dumps/vim_expr_04.dump
@@ -17,4 +17,4 @@
|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
-@57|6|8|,|1| @9|5@1|%|
+@57|6|8|,|1| @9|3|4|%|
diff --git a/runtime/syntax/testdir/dumps/vim_expr_05.dump b/runtime/syntax/testdir/dumps/vim_expr_05.dump
index 53f62dc..c927b11 100644
--- a/runtime/syntax/testdir/dumps/vim_expr_05.dump
+++ b/runtime/syntax/testdir/dumps/vim_expr_05.dump
@@ -7,14 +7,14 @@
@75
|"+0#0000e05&| |O|p|e|r|a|t|o|r|s| +0#0000000&@63
@75
-|"+0#0000e05&| |C|o|m|p|a|r|i|s|o|n| |-| |u|s|i|n|g| |'|i|g|n|o|r|c|a|s|e|'| +0#0000000&@42
-|e+0#af5f00255&|c|h|o| +0#0000000&|e+0#00e0e07&|x|p|r| +0#0000000&|=+0#af5f00255&@1| +0#0000000&@4|e+0#00e0e07&|x|p|r| +0#0000000&@53
-|e+0#af5f00255&|c|h|o| +0#0000000&|e+0#00e0e07&|x|p|r| +0#0000000&|!+0#af5f00255&|=| +0#0000000&@4|e+0#00e0e07&|x|p|r| +0#0000000&@53
-|e+0#af5f00255&|c|h|o| +0#0000000&|e+0#00e0e07&|x|p|r| +0#0000000&|>+0#af5f00255&| +0#0000000&@5|e+0#00e0e07&|x|p|r| +0#0000000&@53
-|e+0#af5f00255&|c|h|o| +0#0000000&|e+0#00e0e07&|x|p|r| +0#0000000&|>+0#af5f00255&|=| +0#0000000&@4|e+0#00e0e07&|x|p|r| +0#0000000&@53
-|e+0#af5f00255&|c|h|o| +0#0000000&|e+0#00e0e07&|x|p|r| +0#0000000&|<+0#af5f00255&| +0#0000000&@5|e+0#00e0e07&|x|p|r| +0#0000000&@53
-|e+0#af5f00255&|c|h|o| +0#0000000&|e+0#00e0e07&|x|p|r| +0#0000000&|<+0#af5f00255&|=| +0#0000000&@4|e+0#00e0e07&|x|p|r| +0#0000000&@53
-|e+0#af5f00255&|c|h|o| +0#0000000&|e+0#00e0e07&|x|p|r| +0#0000000&|=+0#af5f00255&|~| +0#0000000&@4|e+0#00e0e07&|x|p|r| +0#0000000&@53
-|e+0#af5f00255&|c|h|o| +0#0000000&|e+0#00e0e07&|x|p|r| +0#0000000&|!+0#af5f00255&|~| +0#0000000&@4|e+0#00e0e07&|x|p|r| +0#0000000&@53
-|e+0#af5f00255&|c|h|o| +0#0000000&|e+0#00e0e07&|x|p|r| +0#0000000&|i+0#af5f00255&|s| +0#0000000&@4|e+0#00e0e07&|x|p|r| +0#0000000&@53
-@57|8|6|,|1| @9|7|1|%|
+|"+0#0000e05&| |T|e|r|n|a|r|y| +0#0000000&@65
+|e+0#af5f00255&|c|h|o| +0#0000000&|e+0#00e0e07&|x|p|r| +0#0000000&|?+0#af5f00255&| +0#0000000&|e+0#00e0e07&|x|p|r| +0#0000000&|:+0#af5f00255&| +0#0000000&|e+0#00e0e07&|x|p|r| +0#0000000&@51
+@75
+|e+0#af5f00255&|c|h|o| +0#0000000&|l+0#00e0e07&|n|u|m| +0#0000000&|=+0#af5f00255&@1| +0#0000000&|1+0#e000002&| +0#0000000&|?+0#af5f00255&| +0#0000000&|"+0#e000002&|t|o|p|"| +0#0000000&|:+0#af5f00255&| +0#0000000&|l+0#00e0e07&|n|u|m| +0#0000000&@45
+|e+0#af5f00255&|c|h|o| +0#0000000&|l+0#00e0e07&|n|u|m| +0#0000000&|=+0#af5f00255&@1| +0#0000000&|1+0#e000002&| +0#0000000&|?+0#af5f00255&| +0#0000000&|"+0#e000002&|t|o|p|"| +0#0000000&|:+0#af5f00255&| +0#0000000&|l+0#00e0e07&|n|u|m| +0#0000000&|=+0#af5f00255&@1| +0#0000000&|1+0#e000002&|0@2| +0#0000000&|?+0#af5f00255&| +0#0000000&|"+0#e000002&|l|a|s|t|"| +0#0000000&|:+0#af5f00255&| +0#0000000&|l+0#00e0e07&|n|u|m| +0#0000000&@21
+@75
+|e+0#af5f00255&|c|h|o| +0#0000000&|l+0#00e0e07&|n|u|m| +0#0000000&|=+0#af5f00255&@1| +0#0000000&|1+0#e000002&| +0#0000000&@60
+@6|\+0#e000e06&| +0#0000000&|?+0#af5f00255&| +0#0000000&|"+0#e000002&|t|o|p|"| +0#0000000&@59
+@6|\+0#e000e06&| +0#0000000&|:+0#af5f00255&| +0#0000000&|l+0#00e0e07&|n|u|m| +0#0000000&|=+0#af5f00255&@1| +0#0000000&|1+0#e000002&|0@2| +0#0000000&@52
+@6|\+0#e000e06&| +0#0000000&@8|?+0#af5f00255&| +0#0000000&|"+0#e000002&|l|a|s|t|"| +0#0000000&@50
+@57|8|6|,|1| @9|4@1|%|
diff --git a/runtime/syntax/testdir/dumps/vim_expr_06.dump b/runtime/syntax/testdir/dumps/vim_expr_06.dump
index 9c58105..b1b7e4b 100644
--- a/runtime/syntax/testdir/dumps/vim_expr_06.dump
+++ b/runtime/syntax/testdir/dumps/vim_expr_06.dump
@@ -1,20 +1,20 @@
-|e+0#af5f00255#ffffff0|c|h|o| +0#0000000&|e+0#00e0e07&|x|p|r| +0#0000000&|i+0#af5f00255&|s| +0#0000000&@4|e+0#00e0e07&|x|p|r| +0#0000000&@53
-|e+0#af5f00255&|c|h|o| +0#0000000&|e+0#00e0e07&|x|p|r| +0#0000000&|i+0#af5f00255&|s|n|o|t| +0#0000000&@1|e+0#00e0e07&|x|p|r| +0#0000000&@53
+| +0&#ffffff0@5|\+0#e000e06&| +0#0000000&@8|?+0#af5f00255&| +0#0000000&|"+0#e000002&|l|a|s|t|"| +0#0000000&@50
+@6|\+0#e000e06&| +0#0000000&@8|:+0#af5f00255&| +0#0000000&|l+0#00e0e07&|n|u|m| +0#0000000&@52
+|e+0#af5f00255&|c|h|o| +0#0000000&|l+0#00e0e07&|n|u|m| +0#0000000&|=+0#af5f00255&@1| +0#0000000&|1+0#e000002&| +0#0000000&|?+0#af5f00255&| +0#0000000&@58
+@6|\+0#e000e06&| +0#0000000&|"+0#e000002&|t|o|p|"| +0#0000000&|:+0#af5f00255&| +0#0000000&@59
+@6|\+0#e000e06&| +0#0000000&|l+0#00e0e07&|n|u|m| +0#0000000&|=+0#af5f00255&@1| +0#0000000&|1+0#e000002&|0@2| +0#0000000&|?+0#af5f00255&| +0#0000000&@52
+@6>\+0#e000e06&| +0#0000000&@8|"+0#e000002&|l|a|s|t|"| +0#0000000&|:+0#af5f00255&| +0#0000000&@50
+@6|\+0#e000e06&| +0#0000000&@8|l+0#00e0e07&|n|u|m| +0#0000000&@54
@75
-|"+0#0000e05&| |C|o|m|p|a|r|i|s|o|n| |-| |m|a|t|c|h| |c|a|s|e| +0#0000000&@49
-|e+0#af5f00255&|c|h|o| +0#0000000&|e+0#00e0e07&|x|p|r| +0#0000000&|=+0#af5f00255&@1|#| +0#0000000&@3|e+0#00e0e07&|x|p|r| +0#0000000&@53
->e+0#af5f00255&|c|h|o| +0#0000000&|e+0#00e0e07&|x|p|r| +0#0000000&|!+0#af5f00255&|=|#| +0#0000000&@3|e+0#00e0e07&|x|p|r| +0#0000000&@53
-|e+0#af5f00255&|c|h|o| +0#0000000&|e+0#00e0e07&|x|p|r| +0#0000000&|>+0#af5f00255&|#| +0#0000000&@4|e+0#00e0e07&|x|p|r| +0#0000000&@53
-|e+0#af5f00255&|c|h|o| +0#0000000&|e+0#00e0e07&|x|p|r| +0#0000000&|>+0#af5f00255&|=|#| +0#0000000&@3|e+0#00e0e07&|x|p|r| +0#0000000&@53
-|e+0#af5f00255&|c|h|o| +0#0000000&|e+0#00e0e07&|x|p|r| +0#0000000&|<+0#af5f00255&|#| +0#0000000&@4|e+0#00e0e07&|x|p|r| +0#0000000&@53
-|e+0#af5f00255&|c|h|o| +0#0000000&|e+0#00e0e07&|x|p|r| +0#0000000&|<+0#af5f00255&|=|#| +0#0000000&@3|e+0#00e0e07&|x|p|r| +0#0000000&@53
-|e+0#af5f00255&|c|h|o| +0#0000000&|e+0#00e0e07&|x|p|r| +0#0000000&|=+0#af5f00255&|~|#| +0#0000000&@3|e+0#00e0e07&|x|p|r| +0#0000000&@53
-|e+0#af5f00255&|c|h|o| +0#0000000&|e+0#00e0e07&|x|p|r| +0#0000000&|!+0#af5f00255&|~|#| +0#0000000&@3|e+0#00e0e07&|x|p|r| +0#0000000&@53
-|e+0#af5f00255&|c|h|o| +0#0000000&|e+0#00e0e07&|x|p|r| +0#0000000&|i+0#af5f00255&|s|#| +0#0000000&@3|e+0#00e0e07&|x|p|r| +0#0000000&@53
-|e+0#af5f00255&|c|h|o| +0#0000000&|e+0#00e0e07&|x|p|r| +0#0000000&|i+0#af5f00255&|s|n|o|t|#| +0#0000000&|e+0#00e0e07&|x|p|r| +0#0000000&@53
+|e+0#af5f00255&|c|h|o| +0#0000000&|1+0#e000002&| +0#0000000&|?+0#af5f00255&| +0#0000000&|1+0#e000002&| +0#0000000&|:+0#af5f00255&| +0#0000000&|0+0#e000002&| +0#0000000&@60
+|e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|f|o@1|"| +0#0000000&|?+0#af5f00255&| +0#0000000&|"+0#e000002&|f|o@1|"| +0#0000000&|:+0#af5f00255&| +0#0000000&|"+0#e000002&|b|a|r|"| +0#0000000&@48
+|e+0#af5f00255&|c|h|o| +0#0000000&|f+0#00e0e07&|o@1| +0#0000000&|?+0#af5f00255&| +0#0000000&|f+0#00e0e07&|o@1| +0#0000000&|:+0#af5f00255&| +0#0000000&|b+0#00e0e07&|a|r| +0#0000000&@54
+|e+0#af5f00255&|c|h|o| +0#0000000&|g+0#00e0e07&|:|f|o@1| +0#0000000&|?+0#af5f00255&| +0#0000000&|g+0#00e0e07&|:|f|o@1| +0#0000000&|:+0#af5f00255&| +0#0000000&|g+0#00e0e07&|:|b|a|r| +0#0000000&@48
+|e+0#af5f00255&|c|h|o| +0#0000000&|$+0#e000e06&|F|O@1| +0#0000000&|?+0#af5f00255&| +0#0000000&|$+0#e000e06&|F|O@1| +0#0000000&|:+0#af5f00255&| +0#0000000&|$+0#e000e06&|B|A|R| +0#0000000&@51
+|e+0#af5f00255&|c|h|o| +0#0000000&|T|r|u|e|(+0#e000e06&|)| +0#0000000&|?+0#af5f00255&| +0#0000000&|T|r|u|e|(+0#e000e06&|)| +0#0000000&|:+0#af5f00255&| +0#0000000&|F|a|l|s|e|(+0#e000e06&|)| +0#0000000&@44
+|e+0#af5f00255&|c|h|o| +0#0000000&|@+0#e000e06&|a| +0#0000000&|?+0#af5f00255&| +0#0000000&|@+0#e000e06&|a| +0#0000000&|:+0#af5f00255&| +0#0000000&|@+0#e000e06&|b| +0#0000000&@57
+|e+0#af5f00255&|c|h|o| +0#0000000&|(+0#e000e06&|1+0#e000002&|)+0#e000e06&| +0#0000000&|?+0#af5f00255&| +0#0000000&|(+0#e000e06&|1+0#e000002&|)+0#e000e06&| +0#0000000&|:+0#af5f00255&| +0#0000000&|(+0#e000e06&|0+0#e000002&|)+0#e000e06&| +0#0000000&@54
@75
-|"+0#0000e05&| |C|o|m|p|a|r|i|s|o|n| |-| |i|g|n|o|r|e| |c|a|s|e| +0#0000000&@48
-|e+0#af5f00255&|c|h|o| +0#0000000&|e+0#00e0e07&|x|p|r| +0#0000000&|=+0#af5f00255&@1|?| +0#0000000&@3|e+0#00e0e07&|x|p|r| +0#0000000&@53
-|e+0#af5f00255&|c|h|o| +0#0000000&|e+0#00e0e07&|x|p|r| +0#0000000&|!+0#af5f00255&|=|?| +0#0000000&@3|e+0#00e0e07&|x|p|r| +0#0000000&@53
-|e+0#af5f00255&|c|h|o| +0#0000000&|e+0#00e0e07&|x|p|r| +0#0000000&|>+0#af5f00255&|?| +0#0000000&@4|e+0#00e0e07&|x|p|r| +0#0000000&@53
-@57|1|0|4|,|1| @8|8|7|%|
+|"+0#0000e05&| |F|a|l|s|y| +0#0000000&@67
+|e+0#af5f00255&|c|h|o| +0#0000000&|e+0#00e0e07&|x|p|r| +0#0000000&|?+0#af5f00255&@1| +0#0000000&|e+0#00e0e07&|x|p|r| +0#0000000&@57
+@57|1|0|4|,|7| @8|5|4|%|
diff --git a/runtime/syntax/testdir/dumps/vim_expr_07.dump b/runtime/syntax/testdir/dumps/vim_expr_07.dump
index c32edfd..d0aafdd 100644
--- a/runtime/syntax/testdir/dumps/vim_expr_07.dump
+++ b/runtime/syntax/testdir/dumps/vim_expr_07.dump
@@ -1,20 +1,20 @@
-|e+0#af5f00255#ffffff0|c|h|o| +0#0000000&|e+0#00e0e07&|x|p|r| +0#0000000&|>+0#af5f00255&|?| +0#0000000&@4|e+0#00e0e07&|x|p|r| +0#0000000&@53
-|e+0#af5f00255&|c|h|o| +0#0000000&|e+0#00e0e07&|x|p|r| +0#0000000&|>+0#af5f00255&|=|?| +0#0000000&@3|e+0#00e0e07&|x|p|r| +0#0000000&@53
-|e+0#af5f00255&|c|h|o| +0#0000000&|e+0#00e0e07&|x|p|r| +0#0000000&|<+0#af5f00255&|?| +0#0000000&@4|e+0#00e0e07&|x|p|r| +0#0000000&@53
-|e+0#af5f00255&|c|h|o| +0#0000000&|e+0#00e0e07&|x|p|r| +0#0000000&|<+0#af5f00255&|=|?| +0#0000000&@3|e+0#00e0e07&|x|p|r| +0#0000000&@53
-|e+0#af5f00255&|c|h|o| +0#0000000&|e+0#00e0e07&|x|p|r| +0#0000000&|=+0#af5f00255&|~|?| +0#0000000&@3|e+0#00e0e07&|x|p|r| +0#0000000&@53
->e+0#af5f00255&|c|h|o| +0#0000000&|e+0#00e0e07&|x|p|r| +0#0000000&|!+0#af5f00255&|~|?| +0#0000000&@3|e+0#00e0e07&|x|p|r| +0#0000000&@53
-|e+0#af5f00255&|c|h|o| +0#0000000&|e+0#00e0e07&|x|p|r| +0#0000000&|i+0#af5f00255&|s|?| +0#0000000&@3|e+0#00e0e07&|x|p|r| +0#0000000&@53
-|e+0#af5f00255&|c|h|o| +0#0000000&|e+0#00e0e07&|x|p|r| +0#0000000&|i+0#af5f00255&|s|n|o|t|?| +0#0000000&|e+0#00e0e07&|x|p|r| +0#0000000&@53
+|e+0#af5f00255#ffffff0|c|h|o| +0#0000000&|e+0#00e0e07&|x|p|r| +0#0000000&|?+0#af5f00255&@1| +0#0000000&|e+0#00e0e07&|x|p|r| +0#0000000&@57
@75
-|"+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| |"+0#e000002&|e|c|h|o| |v|i|m|N|u|m|b|e|r| |*|v|i|m|C|o|m@1|a|n|d|*| |v|i|m
-|N|u|m|b|e|r|"|)+0#0000e05&| +0#0000000&@66
-|e+0#af5f00255&|c|h|o| +0#0000000&|4+0#e000002&|2| +0#0000000&|i+0#af5f00255&|s| +0#0000000&|4+0#e000002&|2| +0#0000000&@61
+|e+0#af5f00255&|c|h|o| +0#0000000&|t+0#00e0e07&|h|e|L|i|s|t| +0#0000000&|?+0#af5f00255&@1| +0#0000000&|'+0#e000002&|l|i|s|t| |i|s| |e|m|p|t|y|'| +0#0000000&@43
+|e+0#af5f00255&|c|h|o| +0#0000000&|G|e|t|N|a|m|e|(+0#e000e06&|)| +0#0000000&|?+0#af5f00255&@1| +0#0000000&|'+0#e000002&|u|n|k|n|o|w|n|'| +0#0000000&@47
@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
+>e+0#af5f00255&|c|h|o| +0#0000000&|t+0#00e0e07&|h|e|L|i|s|t| +0#0000000&@62
+@6|\+0#e000e06&| +0#0000000&|?+0#af5f00255&@1| +0#0000000&|'+0#e000002&|l|i|s|t| |i|s| |e|m|p|t|y|'| +0#0000000&@48
+|e+0#af5f00255&|c|h|o| +0#0000000&|t+0#00e0e07&|h|e|L|i|s|t| +0#0000000&|?+0#af5f00255&@1| +0#0000000&@59
+@6|\+0#e000e06&| +0#0000000&|'+0#e000002&|l|i|s|t| |i|s| |e|m|p|t|y|'| +0#0000000&@51
@75
-|~+0#4040ff13&| @73
-|~| @73
-|~| @73
-| +0#0000000&@56|1|2@1|,|1| @8|B|o|t|
+|e+0#af5f00255&|c|h|o| +0#0000000&|1+0#e000002&| +0#0000000&|?+0#af5f00255&@1| +0#0000000&|1+0#e000002&| +0#0000000&@63
+|e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|f|o@1|"| +0#0000000&|?+0#af5f00255&@1| +0#0000000&|"+0#e000002&|f|o@1|"| +0#0000000&@55
+|e+0#af5f00255&|c|h|o| +0#0000000&|f+0#00e0e07&|o@1| +0#0000000&|?+0#af5f00255&@1| +0#0000000&|f+0#00e0e07&|o@1| +0#0000000&@59
+|e+0#af5f00255&|c|h|o| +0#0000000&|g+0#00e0e07&|:|f|o@1| +0#0000000&|?+0#af5f00255&@1| +0#0000000&|g+0#00e0e07&|:|f|o@1| +0#0000000&@55
+|e+0#af5f00255&|c|h|o| +0#0000000&|$+0#e000e06&|F|O@1| +0#0000000&|?+0#af5f00255&@1| +0#0000000&|$+0#e000e06&|F|O@1| +0#0000000&@57
+|e+0#af5f00255&|c|h|o| +0#0000000&|T|r|u|e|(+0#e000e06&|)| +0#0000000&|?+0#af5f00255&@1| +0#0000000&|T|r|u|e|(+0#e000e06&|)| +0#0000000&@53
+|e+0#af5f00255&|c|h|o| +0#0000000&|@+0#e000e06&|a| +0#0000000&|?+0#af5f00255&@1| +0#0000000&|@+0#e000e06&|a| +0#0000000&@61
+|e+0#af5f00255&|c|h|o| +0#0000000&|(+0#e000e06&|1+0#e000002&|)+0#e000e06&| +0#0000000&|?+0#af5f00255&@1| +0#0000000&|(+0#e000e06&|1+0#e000002&|)+0#e000e06&| +0#0000000&@59
+@75
+@57|1|2@1|,|1| @8|6|4|%|
diff --git a/runtime/syntax/testdir/dumps/vim_expr_08.dump b/runtime/syntax/testdir/dumps/vim_expr_08.dump
new file mode 100644
index 0000000..8670b55
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_expr_08.dump
@@ -0,0 +1,20 @@
+| +0&#ffffff0@74
+|"+0#0000e05&| |C|o|m|p|a|r|i|s|o|n| |-| |u|s|i|n|g| |'|i|g|n|o|r|c|a|s|e|'| +0#0000000&@42
+|e+0#af5f00255&|c|h|o| +0#0000000&|e+0#00e0e07&|x|p|r| +0#0000000&|=+0#af5f00255&@1| +0#0000000&@4|e+0#00e0e07&|x|p|r| +0#0000000&@53
+|e+0#af5f00255&|c|h|o| +0#0000000&|e+0#00e0e07&|x|p|r| +0#0000000&|!+0#af5f00255&|=| +0#0000000&@4|e+0#00e0e07&|x|p|r| +0#0000000&@53
+|e+0#af5f00255&|c|h|o| +0#0000000&|e+0#00e0e07&|x|p|r| +0#0000000&|>+0#af5f00255&| +0#0000000&@5|e+0#00e0e07&|x|p|r| +0#0000000&@53
+>e+0#af5f00255&|c|h|o| +0#0000000&|e+0#00e0e07&|x|p|r| +0#0000000&|>+0#af5f00255&|=| +0#0000000&@4|e+0#00e0e07&|x|p|r| +0#0000000&@53
+|e+0#af5f00255&|c|h|o| +0#0000000&|e+0#00e0e07&|x|p|r| +0#0000000&|<+0#af5f00255&| +0#0000000&@5|e+0#00e0e07&|x|p|r| +0#0000000&@53
+|e+0#af5f00255&|c|h|o| +0#0000000&|e+0#00e0e07&|x|p|r| +0#0000000&|<+0#af5f00255&|=| +0#0000000&@4|e+0#00e0e07&|x|p|r| +0#0000000&@53
+|e+0#af5f00255&|c|h|o| +0#0000000&|e+0#00e0e07&|x|p|r| +0#0000000&|=+0#af5f00255&|~| +0#0000000&@4|e+0#00e0e07&|x|p|r| +0#0000000&@53
+|e+0#af5f00255&|c|h|o| +0#0000000&|e+0#00e0e07&|x|p|r| +0#0000000&|!+0#af5f00255&|~| +0#0000000&@4|e+0#00e0e07&|x|p|r| +0#0000000&@53
+|e+0#af5f00255&|c|h|o| +0#0000000&|e+0#00e0e07&|x|p|r| +0#0000000&|i+0#af5f00255&|s| +0#0000000&@4|e+0#00e0e07&|x|p|r| +0#0000000&@53
+|e+0#af5f00255&|c|h|o| +0#0000000&|e+0#00e0e07&|x|p|r| +0#0000000&|i+0#af5f00255&|s|n|o|t| +0#0000000&@1|e+0#00e0e07&|x|p|r| +0#0000000&@53
+@75
+|"+0#0000e05&| |C|o|m|p|a|r|i|s|o|n| |-| |m|a|t|c|h| |c|a|s|e| +0#0000000&@49
+|e+0#af5f00255&|c|h|o| +0#0000000&|e+0#00e0e07&|x|p|r| +0#0000000&|=+0#af5f00255&@1|#| +0#0000000&@3|e+0#00e0e07&|x|p|r| +0#0000000&@53
+|e+0#af5f00255&|c|h|o| +0#0000000&|e+0#00e0e07&|x|p|r| +0#0000000&|!+0#af5f00255&|=|#| +0#0000000&@3|e+0#00e0e07&|x|p|r| +0#0000000&@53
+|e+0#af5f00255&|c|h|o| +0#0000000&|e+0#00e0e07&|x|p|r| +0#0000000&|>+0#af5f00255&|#| +0#0000000&@4|e+0#00e0e07&|x|p|r| +0#0000000&@53
+|e+0#af5f00255&|c|h|o| +0#0000000&|e+0#00e0e07&|x|p|r| +0#0000000&|>+0#af5f00255&|=|#| +0#0000000&@3|e+0#00e0e07&|x|p|r| +0#0000000&@53
+|e+0#af5f00255&|c|h|o| +0#0000000&|e+0#00e0e07&|x|p|r| +0#0000000&|<+0#af5f00255&|#| +0#0000000&@4|e+0#00e0e07&|x|p|r| +0#0000000&@53
+@57|1|4|0|,|1| @8|7|4|%|
diff --git a/runtime/syntax/testdir/dumps/vim_expr_09.dump b/runtime/syntax/testdir/dumps/vim_expr_09.dump
new file mode 100644
index 0000000..106ba75
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_expr_09.dump
@@ -0,0 +1,20 @@
+|e+0#af5f00255#ffffff0|c|h|o| +0#0000000&|e+0#00e0e07&|x|p|r| +0#0000000&|<+0#af5f00255&|#| +0#0000000&@4|e+0#00e0e07&|x|p|r| +0#0000000&@53
+|e+0#af5f00255&|c|h|o| +0#0000000&|e+0#00e0e07&|x|p|r| +0#0000000&|<+0#af5f00255&|=|#| +0#0000000&@3|e+0#00e0e07&|x|p|r| +0#0000000&@53
+|e+0#af5f00255&|c|h|o| +0#0000000&|e+0#00e0e07&|x|p|r| +0#0000000&|=+0#af5f00255&|~|#| +0#0000000&@3|e+0#00e0e07&|x|p|r| +0#0000000&@53
+|e+0#af5f00255&|c|h|o| +0#0000000&|e+0#00e0e07&|x|p|r| +0#0000000&|!+0#af5f00255&|~|#| +0#0000000&@3|e+0#00e0e07&|x|p|r| +0#0000000&@53
+|e+0#af5f00255&|c|h|o| +0#0000000&|e+0#00e0e07&|x|p|r| +0#0000000&|i+0#af5f00255&|s|#| +0#0000000&@3|e+0#00e0e07&|x|p|r| +0#0000000&@53
+>e+0#af5f00255&|c|h|o| +0#0000000&|e+0#00e0e07&|x|p|r| +0#0000000&|i+0#af5f00255&|s|n|o|t|#| +0#0000000&|e+0#00e0e07&|x|p|r| +0#0000000&@53
+@75
+|"+0#0000e05&| |C|o|m|p|a|r|i|s|o|n| |-| |i|g|n|o|r|e| |c|a|s|e| +0#0000000&@48
+|e+0#af5f00255&|c|h|o| +0#0000000&|e+0#00e0e07&|x|p|r| +0#0000000&|=+0#af5f00255&@1|?| +0#0000000&@3|e+0#00e0e07&|x|p|r| +0#0000000&@53
+|e+0#af5f00255&|c|h|o| +0#0000000&|e+0#00e0e07&|x|p|r| +0#0000000&|!+0#af5f00255&|=|?| +0#0000000&@3|e+0#00e0e07&|x|p|r| +0#0000000&@53
+|e+0#af5f00255&|c|h|o| +0#0000000&|e+0#00e0e07&|x|p|r| +0#0000000&|>+0#af5f00255&|?| +0#0000000&@4|e+0#00e0e07&|x|p|r| +0#0000000&@53
+|e+0#af5f00255&|c|h|o| +0#0000000&|e+0#00e0e07&|x|p|r| +0#0000000&|>+0#af5f00255&|=|?| +0#0000000&@3|e+0#00e0e07&|x|p|r| +0#0000000&@53
+|e+0#af5f00255&|c|h|o| +0#0000000&|e+0#00e0e07&|x|p|r| +0#0000000&|<+0#af5f00255&|?| +0#0000000&@4|e+0#00e0e07&|x|p|r| +0#0000000&@53
+|e+0#af5f00255&|c|h|o| +0#0000000&|e+0#00e0e07&|x|p|r| +0#0000000&|<+0#af5f00255&|=|?| +0#0000000&@3|e+0#00e0e07&|x|p|r| +0#0000000&@53
+|e+0#af5f00255&|c|h|o| +0#0000000&|e+0#00e0e07&|x|p|r| +0#0000000&|=+0#af5f00255&|~|?| +0#0000000&@3|e+0#00e0e07&|x|p|r| +0#0000000&@53
+|e+0#af5f00255&|c|h|o| +0#0000000&|e+0#00e0e07&|x|p|r| +0#0000000&|!+0#af5f00255&|~|?| +0#0000000&@3|e+0#00e0e07&|x|p|r| +0#0000000&@53
+|e+0#af5f00255&|c|h|o| +0#0000000&|e+0#00e0e07&|x|p|r| +0#0000000&|i+0#af5f00255&|s|?| +0#0000000&@3|e+0#00e0e07&|x|p|r| +0#0000000&@53
+|e+0#af5f00255&|c|h|o| +0#0000000&|e+0#00e0e07&|x|p|r| +0#0000000&|i+0#af5f00255&|s|n|o|t|?| +0#0000000&|e+0#00e0e07&|x|p|r| +0#0000000&@53
+@75
+@57|1|5|8|,|1| @8|8|4|%|
diff --git a/runtime/syntax/testdir/dumps/vim_expr_10.dump b/runtime/syntax/testdir/dumps/vim_expr_10.dump
new file mode 100644
index 0000000..35de769
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_expr_10.dump
@@ -0,0 +1,20 @@
+| +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| |"+0#e000002&|e|c|h|o| |v|i|m|N|u|m|b|e|r| |*|v|i|m|C|o|m@1|a|n|d|*| |v|i|m
+|N|u|m|b|e|r|"|)+0#0000e05&| +0#0000000&@66
+|e+0#af5f00255&|c|h|o| +0#0000000&|4+0#e000002&|2| +0#0000000&|i+0#af5f00255&|s| +0#0000000&|4+0#e000002&|2| +0#0000000&@61
+@75
+> @74
+|"+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
+@75
+|"+0#0000e05&| |I|s@1|u|e| |#|1|4@1|2|3| |(|v|i|m|.|v|i|m|:| |O|p|t| |o|u|t| |o|f| |v|i|m|S|e|a|r|c|h|*|)| +0#0000000&@27
+@75
+|?+0#e000e06&|t+0#e000002&|r|u|t|h|y| +0#0000000&@67
+|l+0#af5f00255&|e|t| +0#0000000&|t+0#00e0e07&|r|u|t|h|y| +0#0000000&|=+0#af5f00255&| +0#0000000&|0+0#e000002&| +0#0000000&@60
+|\+0#e000e06&| +0#0000000&@2|?+0#af5f00255&| +0#0000000&|(+0#e000e06&|0+0#e000002&| +0#0000000&@66
+|\+0#e000e06&| +0#0000000&@2|)+0#e000e06&| +0#0000000&@69
+|\+0#e000e06&| +0#0000000&@2|:+0#af5f00255&| +0#0000000&|(+0#e000e06&|1+0#e000002&| +0#0000000&@66
+|\+0#e000e06&| +0#0000000&@2|)+0#e000e06&| +0#0000000&@69
+|e+0#af5f00255&|c|h|o| +0#0000000&|t+0#00e0e07&|r|u|t|h|y| +0#0000000&@63
+@57|1|7|5|,|0|-|1| @6|9|3|%|
diff --git a/runtime/syntax/testdir/dumps/vim_expr_11.dump b/runtime/syntax/testdir/dumps/vim_expr_11.dump
new file mode 100644
index 0000000..50d5773
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_expr_11.dump
@@ -0,0 +1,20 @@
+|e+0#af5f00255#ffffff0|c|h|o| +0#0000000&|t+0#00e0e07&|r|u|t|h|y| +0#0000000&@63
+@75
+|f+0#af5f00255&|u|n|c|t|i|o|n| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&@60
+| +0#e000002&@1|?+0#e000e06&|t+0#e000002&|r|u|t|h|y| +0#0000000&@65
+@2|l+0#af5f00255&|e|t| +0#0000000&|t+0#00e0e07&|r|u|t|h|y| +0#0000000&|=+0#af5f00255&| +0#0000000&|0+0#e000002&| +0#0000000&@58
+@2>\+0#e000e06&| +0#0000000&@2|?+0#af5f00255&| +0#0000000&|(+0#e000e06&|0+0#e000002&| +0#0000000&@64
+@2|\+0#e000e06&| +0#0000000&@2|)+0#e000e06&| +0#0000000&@67
+@2|\+0#e000e06&| +0#0000000&@2|:+0#af5f00255&| +0#0000000&|(+0#e000e06&|1+0#e000002&| +0#0000000&@64
+@2|\+0#e000e06&| +0#0000000&@2|)+0#e000e06&| +0#0000000&@67
+@2|e+0#af5f00255&|c|h|o| +0#0000000&|t+0#00e0e07&|r|u|t|h|y| +0#0000000&@61
+|e+0#af5f00255&|n|d|f|u|n|c|t|i|o|n| +0#0000000&@63
+@75
+|~+0#4040ff13&| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+| +0#0000000&@56|1|9|3|,|3| @8|B|o|t|
diff --git a/runtime/syntax/testdir/input/vim9_ex_commands.vim b/runtime/syntax/testdir/input/vim9_ex_commands.vim
index c0eb97d..e08cec3 100644
--- a/runtime/syntax/testdir/input/vim9_ex_commands.vim
+++ b/runtime/syntax/testdir/input/vim9_ex_commands.vim
@@ -12,7 +12,7 @@
:help
:help
: help
- : help
+ : help # FIXME
:2match
:3match
diff --git a/runtime/syntax/testdir/input/vim9_expr.vim b/runtime/syntax/testdir/input/vim9_expr.vim
index 784d861..7faaa5f 100644
--- a/runtime/syntax/testdir/input/vim9_expr.vim
+++ b/runtime/syntax/testdir/input/vim9_expr.vim
@@ -2,6 +2,59 @@
# Vim9-script expressions
+# Operators
+
+# Ternary
+
+echo expr ? expr : expr
+
+echo lnum == 1 ? "top" : lnum
+echo lnum == 1 ? "top" : lnum == 1000 ? "last" : lnum
+
+echo lnum == 1
+ ? "top"
+ : lnum == 1000
+ ? "last"
+ : lnum
+echo lnum == 1 ?
+ "top" :
+ lnum == 1000 ?
+ "last" :
+ lnum
+
+echo true ? true : false
+echo 1 ? 1 : 0
+echo "foo" ? "foo" : "bar"
+echo foo ? foo : bar
+echo g:foo ? g:foo : g:bar
+echo $FOO ? $FOO : $BAR
+echo True() ? True() : False()
+echo @a ? @a : @b
+echo (1) ? (1) : (0)
+
+# Falsy
+
+echo expr ?? expr
+
+echo theList ?? 'list is empty'
+echo GetName() ?? 'unknown'
+
+echo theList
+ \ ?? 'list is empty'
+echo theList ??
+ \ 'list is empty'
+
+echo true ?? true
+echo 1 ?? 1
+echo "foo" ?? "foo"
+echo foo ?? foo
+echo g:foo ?? g:foo
+echo $FOO ?? $FOO
+echo True() ?? True()
+echo @a ?? @a
+echo (1) ?? (1)
+
+
# Command {expr} arguments
if true
@@ -18,3 +71,37 @@
return true
enddef
+
+# Issue #14423 (vim.vim: Opt out of vimSearch*)
+
+:?truthy
+const truthy: number = false
+ ? (0
+ )
+ : (1
+ )
+echo truthy
+
+def Foo()
+ :?truthy
+ const truthy: number = false
+ ? (0
+ )
+ : (1
+ )
+ echo truthy
+enddef
+
+
+# Issue #16227 (Vimscript ternary expression highlighting)
+
+var foo = 'foo' # comment
+var bar = foo == 'foo' ? 'bar' : 'baz'
+var baz = foo == 'foo'
+ \ ? 'baz'
+ \ : 'bar'
+var qux = foo == 'foo'
+ ? 'qux' # comment
+ : 'qux' # comment
+echo qux ?? 'quux'
+
diff --git a/runtime/syntax/testdir/input/vim_ex_commands.vim b/runtime/syntax/testdir/input/vim_ex_commands.vim
index 98f32d7..7a58365 100644
--- a/runtime/syntax/testdir/input/vim_ex_commands.vim
+++ b/runtime/syntax/testdir/input/vim_ex_commands.vim
@@ -11,7 +11,7 @@
:help
:help
: help
- : help
+ : help # FIXME
:2match
:3match
diff --git a/runtime/syntax/testdir/input/vim_expr.vim b/runtime/syntax/testdir/input/vim_expr.vim
index 903db92..569d4ce 100644
--- a/runtime/syntax/testdir/input/vim_expr.vim
+++ b/runtime/syntax/testdir/input/vim_expr.vim
@@ -87,6 +87,52 @@
" Operators
+" Ternary
+echo expr ? expr : expr
+
+echo lnum == 1 ? "top" : lnum
+echo lnum == 1 ? "top" : lnum == 1000 ? "last" : lnum
+
+echo lnum == 1
+ \ ? "top"
+ \ : lnum == 1000
+ \ ? "last"
+ \ : lnum
+echo lnum == 1 ?
+ \ "top" :
+ \ lnum == 1000 ?
+ \ "last" :
+ \ lnum
+
+echo 1 ? 1 : 0
+echo "foo" ? "foo" : "bar"
+echo foo ? foo : bar
+echo g:foo ? g:foo : g:bar
+echo $FOO ? $FOO : $BAR
+echo True() ? True() : False()
+echo @a ? @a : @b
+echo (1) ? (1) : (0)
+
+" Falsy
+echo expr ?? expr
+
+echo theList ?? 'list is empty'
+echo GetName() ?? 'unknown'
+
+echo theList
+ \ ?? 'list is empty'
+echo theList ??
+ \ 'list is empty'
+
+echo 1 ?? 1
+echo "foo" ?? "foo"
+echo foo ?? foo
+echo g:foo ?? g:foo
+echo $FOO ?? $FOO
+echo True() ?? True()
+echo @a ?? @a
+echo (1) ?? (1)
+
" Comparison - using 'ignorcase'
echo expr == expr
echo expr != expr
@@ -126,6 +172,28 @@
" Unreported issue (incorrectly matches as "echo vimNumber *vimCommand* vimNumber")
echo 42 is 42
+
" Issue #16221 (vimString becomes vimVar when preceded by !)
let bar = !'g:bar'->exists()
+
+" Issue #14423 (vim.vim: Opt out of vimSearch*)
+
+?truthy
+let truthy = 0
+\ ? (0
+\ )
+\ : (1
+\ )
+echo truthy
+
+function Foo()
+ ?truthy
+ let truthy = 0
+ \ ? (0
+ \ )
+ \ : (1
+ \ )
+ echo truthy
+endfunction
+
diff --git a/runtime/syntax/vim.vim b/runtime/syntax/vim.vim
index fc69a43..b19a435 100644
--- a/runtime/syntax/vim.vim
+++ b/runtime/syntax/vim.vim
@@ -2,7 +2,7 @@
" Language: Vim script
" Maintainer: Hirohito Higashi <h.east.727 ATMARK gmail.com>
" Doug Kearns <dougkearns@gmail.com>
-" Last Change: 2025 Jan 19
+" Last Change: 2025 Jan 20
" Former Maintainer: Charles E. Campbell
" DO NOT CHANGE DIRECTLY.
@@ -321,6 +321,10 @@
syn cluster vimOperGroup contains=vimEnvvar,vimFunc,vimFuncVar,vimOper,vimOperParen,vimNumber,vimString,vimRegister,@vimContinue,vim9Comment,vimVar,vimBoolean,vimNull
syn match vimOper "\a\@<!!" skipwhite nextgroup=vimString,vimSpecFile
syn match vimOper "||\|&&\|[-+*/%.]" skipwhite nextgroup=vimString,vimSpecFile
+syn match vimOper "?" skipwhite nextgroup=@vimExprList
+" distinguish ternary : from ex-colon
+syn match vimOper "\s\@1<=:\ze\s\|\s\@1<=:$" skipwhite nextgroup=@vimExprList
+syn match vimOper "??" skipwhite nextgroup=@vimExprList
syn match vimOper "=" skipwhite nextgroup=vimString,vimSpecFile
syn match vimOper "\%#=1\%(==\|!=\|>=\|<=\|=\~\|!\~\|>\|<\)[?#]\=" skipwhite nextgroup=vimString,vimSpecFile
syn match vimOper "\<is\%(not\)\=\>" skipwhite nextgroup=vimString,vimSpecFile
@@ -336,9 +340,9 @@
syn cluster vimFuncList contains=vimFuncBang,vimFunctionError,vimFuncKey,vimFuncSID,Tag
syn cluster vimDefList contains=vimFuncBang,vimFunctionError,vimDefKey,vimFuncSID,Tag
-syn cluster vimFuncBodyCommon contains=@vimCmdList,vimCmplxRepeat,vimContinue,vimCtrlChar,vimDef,vimEnvvar,vimFBVar,vimFunc,vimFunction,vimLetHereDoc,vimNotation,vimNotFunc,vimNumber,vimOper,vimOperParen,vimRegister,vimSearch,vimSpecFile,vimString,vimSubst,vimFuncFold,vimDefFold
-syn cluster vimFuncBodyList contains=@vimFuncBodyCommon,vimComment,vimLineComment,vimFuncVar,vimInsert,vimConst,vimLet
-syn cluster vimDefBodyList contains=@vimFuncBodyCommon,vim9Comment,vim9LineComment,vim9Const,vim9Final,vim9Var,vim9Null,vim9Boolean,vim9For
+syn cluster vimFuncBodyCommon contains=@vimCmdList,vimCmplxRepeat,vimContinue,vimCtrlChar,vimDef,vimEnvvar,vimFBVar,vimFunc,vimFunction,vimLetHereDoc,vimNotation,vimNotFunc,vimNumber,vimOper,vimOperParen,vimRegister,vimSpecFile,vimString,vimSubst,vimFuncFold,vimDefFold
+syn cluster vimFuncBodyList contains=@vimFuncBodyCommon,vimComment,vimLineComment,vimFuncVar,vimInsert,vimConst,vimLet,vimSearch
+syn cluster vimDefBodyList contains=@vimFuncBodyCommon,vim9Comment,vim9LineComment,vim9Const,vim9Final,vim9Var,vim9Null,vim9Boolean,vim9For,vim9Search
syn region vimFuncPattern contained matchgroup=vimOper start="/" end="$" contains=@vimSubstList
syn match vimFunction "\<fu\%[nction]\>" skipwhite nextgroup=vimCmdSep,vimComment,vimFuncPattern contains=vimFuncKey
@@ -1063,8 +1067,10 @@
" Searches And Globals: {{{2
" ====================
-syn match vimSearch '^\s*[/?].*' contains=vimSearchDelim
+VimL syn match vimSearch '^\s*[/?].*' contains=vimSearchDelim
syn match vimSearchDelim '^\s*\zs[/?]\|[/?]$' contained
+Vim9 syn match vim9Search '^\s*:[/?].*' contains=vim9SearchDelim
+syn match vim9SearchDelim '^\s*\zs:[/?]\|[/?]$' contained contains=vimCmdSep
syn region vimGlobal matchgroup=Statement start='\<g\%[lobal]!\=/' skip='\\.' end='/' skipwhite nextgroup=vimSubst1
syn region vimGlobal matchgroup=Statement start='\<v\%[global]!\=/' skip='\\.' end='/' skipwhite nextgroup=vimSubst1
@@ -1445,8 +1451,8 @@
hi def link vimQuoteEscape vimEscape
hi def link vimRegister SpecialChar
hi def link vimScriptDelim Comment
- hi def link vimSearchDelim Statement
hi def link vimSearch vimString
+ hi def link vimSearchDelim Delimiter
hi def link vimSep Delimiter
hi def link vimSet vimCommand
hi def link vimSetAll vimOption
@@ -1539,6 +1545,8 @@
hi def link vim9MethodNameError vimFunctionError
hi def link vim9Null Constant
hi def link vim9Public vimCommand
+ hi def link vim9Search vimString
+ hi def link vim9SearchDelim Delimiter
hi def link vim9Static vimCommand
hi def link vim9Super Identifier
hi def link vim9This Identifier