diff options
author | dkearns <dougkearns@gmail.com> | 2024-04-10 05:19:41 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-09 21:19:41 +0200 |
commit | e43ace558aee904f5ebb805daed763961bdbccde (patch) | |
tree | e0bd0512564a413e438691f71f9b0bad41e50301 /runtime/syntax | |
parent | a040019be68859f0667ae475de8d67bb755596ed (diff) |
runtime(vim): Update base-syntax, no curly-brace names in Vim9 script (#14466)
Remove curly-brace name matching for :def functions. This is not
supported in Vim9 script.
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Diffstat (limited to 'runtime/syntax')
-rw-r--r-- | runtime/syntax/generator/vim.vim.base | 6 | ||||
-rw-r--r-- | runtime/syntax/testdir/dumps/vim_ex_def_01.dump | 14 | ||||
-rw-r--r-- | runtime/syntax/testdir/dumps/vim_ex_def_02.dump | 18 | ||||
-rw-r--r-- | runtime/syntax/testdir/dumps/vim_ex_def_03.dump | 20 | ||||
-rw-r--r-- | runtime/syntax/testdir/dumps/vim_ex_def_04.dump | 22 | ||||
-rw-r--r-- | runtime/syntax/testdir/dumps/vim_ex_def_05.dump | 26 | ||||
-rw-r--r-- | runtime/syntax/testdir/dumps/vim_ex_def_99.dump | 2 | ||||
-rw-r--r-- | runtime/syntax/testdir/dumps/vim_ex_def_fold_01.dump | 14 | ||||
-rw-r--r-- | runtime/syntax/testdir/dumps/vim_ex_def_fold_02.dump | 24 | ||||
-rw-r--r-- | runtime/syntax/testdir/dumps/vim_ex_def_fold_03.dump | 20 | ||||
-rw-r--r-- | runtime/syntax/testdir/dumps/vim_ex_def_fold_04.dump | 20 | ||||
-rw-r--r-- | runtime/syntax/testdir/dumps/vim_ex_def_fold_05.dump | 24 | ||||
-rw-r--r-- | runtime/syntax/testdir/dumps/vim_ex_def_fold_99.dump | 2 | ||||
-rw-r--r-- | runtime/syntax/testdir/input/vim_ex_def.vim | 18 | ||||
-rw-r--r-- | runtime/syntax/testdir/input/vim_ex_def_fold.vim | 18 | ||||
-rw-r--r-- | runtime/syntax/vim.vim | 6 |
16 files changed, 111 insertions, 143 deletions
diff --git a/runtime/syntax/generator/vim.vim.base b/runtime/syntax/generator/vim.vim.base index 0f8ab0adda..9ab923c4f4 100644 --- a/runtime/syntax/generator/vim.vim.base +++ b/runtime/syntax/generator/vim.vim.base @@ -3,7 +3,7 @@ " Maintainer: Hirohito Higashi <h.east.727 ATMARK gmail.com> " Doug Kearns <dougkearns@gmail.com> " URL: https://github.com/vim-jp/syntax-vim-ex -" Last Change: 2024 Mar 31 +" Last Change: 2024 Apr 09 " Former Maintainer: Charles E. Campbell " DO NOT CHANGE DIRECTLY. @@ -277,8 +277,8 @@ syn match vimEnddef "\<enddef\>" if exists("g:vimsyn_folding") && g:vimsyn_folding =~# 'f' syn region vimFuncFold start="\<fu\%[nction]\>!\=\s*\%(<[sS][iI][dD]>\|[sg]:\)\=\%(\i\|[#.]\|{.\{-1,}}\)\+\s*(" end="\<endf\%[unction]\>" contains=vimFunction fold keepend transparent - syn region vimFuncFold start="\<def\>!\=\s*\%(<[sS][iI][dD]>\|[sg]:\)\=\%(\i\|[#.]\|{.\{-1,}}\)\+(" end="\<enddef\>" contains=vimDef fold keepend transparent - syn region vimFuncFold start="\<def\s\+new\%(\i\|{.\{-1,}}\)\+(" end="\<enddef\>" contains=vimDef fold keepend transparent + syn region vimFuncFold start="\<def\>!\=\s*\%(<[sS][iI][dD]>\|[sg]:\)\=\%(\i\|[#.]\)\+(" end="\<enddef\>" contains=vimDef fold keepend transparent + syn region vimFuncFold start="\<def\s\+new\i\+(" end="\<enddef\>" contains=vimDef fold keepend transparent endif syn match vimFuncVar contained "a:\%(\K\k*\|\d\+\)\>" diff --git a/runtime/syntax/testdir/dumps/vim_ex_def_01.dump b/runtime/syntax/testdir/dumps/vim_ex_def_01.dump index c7b49de976..2aebd409c0 100644 --- a/runtime/syntax/testdir/dumps/vim_ex_def_01.dump +++ b/runtime/syntax/testdir/dumps/vim_ex_def_01.dump @@ -6,15 +6,15 @@ >d+0#af5f00255&|e|f| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&@65 |e+0#af5f00255&|n|d@1|e|f| +0#0000000&@68 @75 -|#+0#0000e05&| |c|u|r|l|y|-|b|r|a|c|e| |n|a|m|e|s| +0#0000000&@55 -|d+0#af5f00255&|e|f| +0#0000000&|{|"|F|"|}|o@1|(+0#e000e06&|)| +0#0000000&@61 +|d+0#af5f00255&|e|f| +0#0000000&|F|o@1|(+0#e000e06&|)|:+0#0000000&| |n+0#00e0003&|u|m|b|e|r| +0#0000000&@57 +@2|r+0#af5f00255&|e|t|u|r|n| +0#0000000&|4+0#e000002&|2| +0#0000000&@63 |e+0#af5f00255&|n|d@1|e|f| +0#0000000&@68 @75 -|d+0#af5f00255&|e|f| +0#0000000&|F|{|"|o|"|}|o|(+0#e000e06&|)| +0#0000000&@61 +|"+0#0000e05&| |t|r|a|i|l|i|n|g| |w|h|i|t|e|s|p|a|c|e| +0#0000000&@53 +|d+0#af5f00255&|e|f| +0#0000000&|F|o@1|(+0#e000e06&|)|:+0#0000000&| |n+0#00e0003&|u|m|b|e|r| +0#0000000&@57 +@2|r+0#af5f00255&|e|t|u|r|n| +0#0000000&|4+0#e000002&|2| +0#0000000&@63 |e+0#af5f00255&|n|d@1|e|f| +0#0000000&@68 @75 -|d+0#af5f00255&|e|f| +0#0000000&|F|o|{|"|o|"|}|(+0#e000e06&|)| +0#0000000&@61 +|d+0#af5f00255&|e|f| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&|#+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@55 |e+0#af5f00255&|n|d@1|e|f| +0#0000000&@68 -@75 -|d+0#af5f00255&|e|f| +0#0000000&|{|"|F|"|}|o|{|"|o|"|}|(+0#e000e06&|)| +0#0000000&@57 -@57|1|9|,|1| @9|1|2|%| +@57|1|9|,|1| @9|1|4|%| diff --git a/runtime/syntax/testdir/dumps/vim_ex_def_02.dump b/runtime/syntax/testdir/dumps/vim_ex_def_02.dump index 7ebe3c666b..ebfa3e1c3e 100644 --- a/runtime/syntax/testdir/dumps/vim_ex_def_02.dump +++ b/runtime/syntax/testdir/dumps/vim_ex_def_02.dump @@ -1,20 +1,20 @@ -|d+0#af5f00255#ffffff0|e|f| +0#0000000&|{|"|F|"|}|o|{|"|o|"|}|(+0#e000e06&|)| +0#0000000&@57 -|e+0#af5f00255&|n|d@1|e|f| +0#0000000&@68 +|e+0#af5f00255#ffffff0|n|d@1|e|f| +0#0000000&@68 @75 -|d+0#af5f00255&|e|f| +0#0000000&|{|"|F|"|}|{|"|o|"|}|{|"|o|"|}|(+0#e000e06&|)| +0#0000000&@53 +|d+0#af5f00255&|e|f| +0#0000000&|F|o@1|(+0#e000e06&|)|:+0#0000000&| |n+0#00e0003&|u|m|b|e|r| +0#0000000&|#+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@47 +@2|r+0#af5f00255&|e|t|u|r|n| +0#0000000&|4+0#e000002&|2| +0#0000000&@63 |e+0#af5f00255&|n|d@1|e|f| +0#0000000&@68 > @74 -|d+0#af5f00255&|e|f| +0#0000000&|F|o@1|(+0#e000e06&|)|:+0#0000000&| |n+0#00e0003&|u|m|b|e|r| +0#0000000&@57 +|d+0#af5f00255&|e|f|!| +0#0000000&|F|o@1|(+0#e000e06&|)|:+0#0000000&| |n+0#00e0003&|u|m|b|e|r| +0#0000000&@56 @2|r+0#af5f00255&|e|t|u|r|n| +0#0000000&|4+0#e000002&|2| +0#0000000&@63 |e+0#af5f00255&|n|d@1|e|f| +0#0000000&@68 @75 -|#+0#0000e05&| |t|r|a|i|l|i|n|g| |w|h|i|t|e|s|p|a|c|e| +0#0000000&@53 -|d+0#af5f00255&|e|f| +0#0000000&|F|o@1|(+0#e000e06&|)|:+0#0000000&| |n+0#00e0003&|u|m|b|e|r| +0#0000000&@57 +|d+0#af5f00255&|e|f| +0#0000000&|g+0#e000e06&|:|F+0#0000000&|o@1|(+0#e000e06&|)|:+0#0000000&| |n+0#00e0003&|u|m|b|e|r| +0#0000000&@55 @2|r+0#af5f00255&|e|t|u|r|n| +0#0000000&|4+0#e000002&|2| +0#0000000&@63 |e+0#af5f00255&|n|d@1|e|f| +0#0000000&@68 @75 -|d+0#af5f00255&|e|f| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&|#+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@55 +|d+0#af5f00255&|e|f| +0#0000000&|s+0#e000e06&|:|F+0#0000000&|o@1|(+0#e000e06&|)|:+0#0000000&| |n+0#00e0003&|u|m|b|e|r| +0#0000000&@55 +@2|r+0#af5f00255&|e|t|u|r|n| +0#0000000&|4+0#e000002&|2| +0#0000000&@63 |e+0#af5f00255&|n|d@1|e|f| +0#0000000&@68 @75 -|d+0#af5f00255&|e|f| +0#0000000&|F|o@1|(+0#e000e06&|)|:+0#0000000&| |n+0#00e0003&|u|m|b|e|r| +0#0000000&|#+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@47 -@57|3|7|,|0|-|1| @7|2|9|%| +|d+0#af5f00255&|e|f| +0#0000000&|<+0#e000e06&|S|I|D|>|F+0#0000000&|o@1|(+0#e000e06&|)|:+0#0000000&| |n+0#00e0003&|u|m|b|e|r| +0#0000000&@52 +@57|3|7|,|0|-|1| @7|3|4|%| diff --git a/runtime/syntax/testdir/dumps/vim_ex_def_03.dump b/runtime/syntax/testdir/dumps/vim_ex_def_03.dump index 50fed4124f..6046e659ce 100644 --- a/runtime/syntax/testdir/dumps/vim_ex_def_03.dump +++ b/runtime/syntax/testdir/dumps/vim_ex_def_03.dump @@ -1,20 +1,20 @@ -|d+0#af5f00255#ffffff0|e|f| +0#0000000&|F|o@1|(+0#e000e06&|)|:+0#0000000&| |n+0#00e0003&|u|m|b|e|r| +0#0000000&|#+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@47 +|d+0#af5f00255#ffffff0|e|f| +0#0000000&|<+0#e000e06&|S|I|D|>|F+0#0000000&|o@1|(+0#e000e06&|)|:+0#0000000&| |n+0#00e0003&|u|m|b|e|r| +0#0000000&@52 @2|r+0#af5f00255&|e|t|u|r|n| +0#0000000&|4+0#e000002&|2| +0#0000000&@63 |e+0#af5f00255&|n|d@1|e|f| +0#0000000&@68 @75 -|d+0#af5f00255&|e|f|!| +0#0000000&|F|o@1|(+0#e000e06&|)|:+0#0000000&| |n+0#00e0003&|u|m|b|e|r| +0#0000000&@56 +|d+0#af5f00255&|e|f| +0#0000000&|f|o@1|#|b|a|r|#|F|o@1|(+0#e000e06&|)|:+0#0000000&| |n+0#00e0003&|u|m|b|e|r| +0#0000000&@49 @2>r+0#af5f00255&|e|t|u|r|n| +0#0000000&|4+0#e000002&|2| +0#0000000&@63 |e+0#af5f00255&|n|d@1|e|f| +0#0000000&@68 @75 -|d+0#af5f00255&|e|f| +0#0000000&|g+0#e000e06&|:|F+0#0000000&|o@1|(+0#e000e06&|)|:+0#0000000&| |n+0#00e0003&|u|m|b|e|r| +0#0000000&@55 -@2|r+0#af5f00255&|e|t|u|r|n| +0#0000000&|4+0#e000002&|2| +0#0000000&@63 +|"+0#0000e05&| |s|a|m|e| |n|a|m|e| |a|s| |a|n| |E|x| |c|o|m@1|a|n|d| +0#0000000&@46 +|d+0#af5f00255&|e|f| +0#0000000&|s+0#e000e06&|:|l+0#0000000&|s|(+0#e000e06&|)| +0#0000000&@64 |e+0#af5f00255&|n|d@1|e|f| +0#0000000&@68 @75 -|d+0#af5f00255&|e|f| +0#0000000&|s+0#e000e06&|:|F+0#0000000&|o@1|(+0#e000e06&|)|:+0#0000000&| |n+0#00e0003&|u|m|b|e|r| +0#0000000&@55 -@2|r+0#af5f00255&|e|t|u|r|n| +0#0000000&|4+0#e000002&|2| +0#0000000&@63 -|e+0#af5f00255&|n|d@1|e|f| +0#0000000&@68 @75 -|d+0#af5f00255&|e|f| +0#0000000&|<+0#e000e06&|S|I|D|>|F+0#0000000&|o@1|(+0#e000e06&|)|:+0#0000000&| |n+0#00e0003&|u|m|b|e|r| +0#0000000&@52 -@2|r+0#af5f00255&|e|t|u|r|n| +0#0000000&|4+0#e000002&|2| +0#0000000&@63 +|"+0#0000e05&| |r|e|t|u|r|n| |t|y|p|e|s| +0#0000000&@60 +@75 +|d+0#af5f00255&|e|f| +0#0000000&|F|o@1|(+0#e000e06&|)|:+0#0000000&| |v+0#00e0003&|o|i|d| +0#0000000&@59 |e+0#af5f00255&|n|d@1|e|f| +0#0000000&@68 -@57|5@1|,|3| @9|4|6|%| +@75 +|d+0#af5f00255&|e|f| +0#0000000&|F|o@1|(+0#e000e06&|)|:+0#0000000&| |v+0#00e0003&|o|i|d| +0#0000000&|#+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@49 +@57|5@1|,|3| @9|5|4|%| diff --git a/runtime/syntax/testdir/dumps/vim_ex_def_04.dump b/runtime/syntax/testdir/dumps/vim_ex_def_04.dump index 64141b7ca9..7394771f47 100644 --- a/runtime/syntax/testdir/dumps/vim_ex_def_04.dump +++ b/runtime/syntax/testdir/dumps/vim_ex_def_04.dump @@ -1,20 +1,20 @@ -|e+0#af5f00255#ffffff0|n|d@1|e|f| +0#0000000&@68 +|d+0#af5f00255#ffffff0|e|f| +0#0000000&|F|o@1|(+0#e000e06&|)|:+0#0000000&| |v+0#00e0003&|o|i|d| +0#0000000&|#+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@49 +|e+0#af5f00255&|n|d@1|e|f| +0#0000000&@68 @75 -|d+0#af5f00255&|e|f| +0#0000000&|f|o@1|#|b|a|r|#|F|o@1|(+0#e000e06&|)|:+0#0000000&| |n+0#00e0003&|u|m|b|e|r| +0#0000000&@49 -@2|r+0#af5f00255&|e|t|u|r|n| +0#0000000&|4+0#e000002&|2| +0#0000000&@63 +|d+0#af5f00255&|e|f| +0#0000000&|F|o@1|(+0#e000e06&|)|:+0#0000000&| |l+0#00e0003&|i|s|t|<|d|i|c|t|<|n|u|m|b|e|r|>@1| +0#0000000&@45 |e+0#af5f00255&|n|d@1|e|f| +0#0000000&@68 > @74 -|"+0#0000e05&| |s|a|m|e| |n|a|m|e| |a|s| |a|n| |E|x| |c|o|m@1|a|n|d| +0#0000000&@46 -|d+0#af5f00255&|e|f| +0#0000000&|s+0#e000e06&|:|l+0#0000000&|s|(+0#e000e06&|)| +0#0000000&@64 +|d+0#af5f00255&|e|f| +0#0000000&|F|o@1|(+0#e000e06&|)|:+0#0000000&| |f+0#00e0003&|u|n|c|(|d|i|c|t|<|l|i|s|t|<|n|u|m|b|e|r|>@1|,+0#0000000&| |f+0#00e0003&|u|n|c|,+0#0000000&| |b+0#00e0003&|o@1|l|,+0#0000000&| |f+0#00e0003&|u|n|c|(|n|u|m|b|e|r|,+0#0000000&| |l+0#00e0003&|i|s|t|<|n|u|m|b|e|r|>|)@1 +|:+0#0000000&| |b+0#00e0003&|o@1|l| +0#0000000&@68 |e+0#af5f00255&|n|d@1|e|f| +0#0000000&@68 @75 @75 -|"+0#0000e05&| |r|e|t|u|r|n| |t|y|p|e|s| +0#0000000&@60 -@75 -|d+0#af5f00255&|e|f| +0#0000000&|F|o@1|(+0#e000e06&|)|:+0#0000000&| |v+0#00e0003&|o|i|d| +0#0000000&@59 -|e+0#af5f00255&|n|d@1|e|f| +0#0000000&@68 +|"+0#0000e05&| |:|e|n|d@1|e|f| |t|r|a|i|l|i|n|g| +0#0000000&@56 @75 -|d+0#af5f00255&|e|f| +0#0000000&|F|o@1|(+0#e000e06&|)|:+0#0000000&| |v+0#00e0003&|o|i|d| +0#0000000&|#+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@49 +|d+0#af5f00255&|e|f| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&@65 +| +0#0000e05&@1|#| |t|r|a|i|l|i|n|g| |w|h|i|t|e|s|p|a|c|e| +0#0000000&@51 |e+0#af5f00255&|n|d@1|e|f| +0#0000000&@68 @75 -@57|7|3|,|0|-|1| @7|6|3|%| +|d+0#af5f00255&|e|f| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&@65 +|e+0#af5f00255&|n|d@1|e|f| +0#0000000&||| |e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|F|o@1|"| +0#0000000&@55 +@57|7|3|,|0|-|1| @7|7|3|%| diff --git a/runtime/syntax/testdir/dumps/vim_ex_def_05.dump b/runtime/syntax/testdir/dumps/vim_ex_def_05.dump index 9fc0cfa348..2db207b43b 100644 --- a/runtime/syntax/testdir/dumps/vim_ex_def_05.dump +++ b/runtime/syntax/testdir/dumps/vim_ex_def_05.dump @@ -1,20 +1,20 @@ -|d+0#af5f00255#ffffff0|e|f| +0#0000000&|F|o@1|(+0#e000e06&|)|:+0#0000000&| |l+0#00e0003&|i|s|t|<|d|i|c|t|<|n|u|m|b|e|r|>@1| +0#0000000&@45 -|e+0#af5f00255&|n|d@1|e|f| +0#0000000&@68 +| +0&#ffffff0@74 +|d+0#af5f00255&|e|f| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&@65 +|e+0#af5f00255&|n|d@1|e|f| +0#0000000&|"+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@58 @75 -|d+0#af5f00255&|e|f| +0#0000000&|F|o@1|(+0#e000e06&|)|:+0#0000000&| |f+0#00e0003&|u|n|c|(|d|i|c|t|<|l|i|s|t|<|n|u|m|b|e|r|>@1|,+0#0000000&| |f+0#00e0003&|u|n|c|,+0#0000000&| |b+0#00e0003&|o@1|l|,+0#0000000&| |f+0#00e0003&|u|n|c|(|n|u|m|b|e|r|,+0#0000000&| |l+0#00e0003&|i|s|t|<|n|u|m|b|e|r|>|)@1 -|:+0#0000000&| |b+0#00e0003&|o@1|l| +0#0000000&@68 ->e+0#af5f00255&|n|d@1|e|f| +0#0000000&@68 @75 +>"+0#0000e05&| |p|a|r|a|m|e|t|e|r|s| +0#0000000&@62 @75 -|"+0#0000e05&| |:|e|n|d@1|e|f| |t|r|a|i|l|i|n|g| +0#0000000&@56 +|d+0#af5f00255&|e|f| +0#0000000&|F|o@1|(+0#e000e06&|x+0#00e0e07&|:+0#0000000&| |b+0#00e0003&|o@1|l|,+0#0000000&| |y+0#00e0e07&| +0#0000000&|=+0#af5f00255&| +0#0000000&|4+0#e000002&|2|,+0#0000000&| |z+0#00e0e07&|:+0#0000000&| |s+0#00e0003&|t|r|i|n|g| +0#0000000&|=+0#af5f00255&| +0#0000000&|"+0#e000002&|z|e|d|"|)+0#e000e06&| +0#0000000&@31 +|e+0#af5f00255&|n|d@1|e|f| +0#0000000&@68 @75 -|d+0#af5f00255&|e|f| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&@65 -| +0#0000e05&@1|#| |t|r|a|i|l|i|n|g| |w|h|i|t|e|s|p|a|c|e| +0#0000000&@51 +|d+0#af5f00255&|e|f| +0#0000000&|F|o@1|(+0#e000e06&| +0#0000000&@66 +@4|x+0#00e0e07&|:+0#0000000&| |b+0#00e0003&|o@1|l|,+0#0000000&| @62 +@4|y+0#00e0e07&| +0#0000000&|=+0#af5f00255&| +0#0000000&|4+0#e000002&|2|,+0#0000000&| @63 +@4|z+0#00e0e07&|:+0#0000000&| |s+0#00e0003&|t|r|i|n|g| +0#0000000&|=+0#af5f00255&| +0#0000000&|"+0#e000002&|z|e|d|"|)+0#e000e06&| +0#0000000&@52 |e+0#af5f00255&|n|d@1|e|f| +0#0000000&@68 @75 -|d+0#af5f00255&|e|f| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&@65 -|e+0#af5f00255&|n|d@1|e|f| +0#0000000&||| |e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|F|o@1|"| +0#0000000&@55 @75 -|d+0#af5f00255&|e|f| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&@65 -|e+0#af5f00255&|n|d@1|e|f| +0#0000000&|"+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@58 -@57|9|1|,|1| @9|8|0|%| +|"+0#0000e05&| |c|o|m@1|e|n|t|s| +0#0000000&@64 +@75 +@57|9|1|,|1| @9|9|4|%| diff --git a/runtime/syntax/testdir/dumps/vim_ex_def_99.dump b/runtime/syntax/testdir/dumps/vim_ex_def_99.dump index 2eca72a57b..9b4249f186 100644 --- a/runtime/syntax/testdir/dumps/vim_ex_def_99.dump +++ b/runtime/syntax/testdir/dumps/vim_ex_def_99.dump @@ -17,4 +17,4 @@ @2|"+0#e000002&|u|s|e|l|e|s@1| |s|t|r|i|n|g|"| +0#0000000&@56 |e+0#af5f00255&|n|d@1|e|f| +0#0000000&@68 > @74 -@57|1|2|5|,|0|-|1| @6|B|o|t| +@57|1|0|9|,|0|-|1| @6|B|o|t| diff --git a/runtime/syntax/testdir/dumps/vim_ex_def_fold_01.dump b/runtime/syntax/testdir/dumps/vim_ex_def_fold_01.dump index d1803d5e37..4f80331b5c 100644 --- a/runtime/syntax/testdir/dumps/vim_ex_def_fold_01.dump +++ b/runtime/syntax/testdir/dumps/vim_ex_def_fold_01.dump @@ -6,15 +6,15 @@ >"+0#0000e05&| |e|m|p|t|y| |d|e|f|i|n|i|t|i|o|n| +0#0000000&@56 |++0#0000e05#a8a8a8255|-@1| @1|2| |l|i|n|e|s|:| |d|e|f| |F|o@1|(|)|-@51 | +0#0000000#ffffff0@74 -|#+0#0000e05&| |c|u|r|l|y|-|b|r|a|c|e| |n|a|m|e|s| +0#0000000&@55 -|++0#0000e05#a8a8a8255|-@1| @1|2| |l|i|n|e|s|:| |d|e|f| |{|"|F|"|}|o@1|(|)|-@47 +|++0#0000e05#a8a8a8255|-@1| @1|3| |l|i|n|e|s|:| |d|e|f| |F|o@1|(|)|:| |n|u|m|b|e|r|-@43 | +0#0000000#ffffff0@74 -|++0#0000e05#a8a8a8255|-@1| @1|2| |l|i|n|e|s|:| |d|e|f| |F|{|"|o|"|}|o|(|)|-@47 +|"+0#0000e05&| |t|r|a|i|l|i|n|g| |w|h|i|t|e|s|p|a|c|e| +0#0000000&@53 +|++0#0000e05#a8a8a8255|-@1| @1|3| |l|i|n|e|s|:| |d|e|f| |F|o@1|(|)|:| |n|u|m|b|e|r| @1|-@41 | +0#0000000#ffffff0@74 -|++0#0000e05#a8a8a8255|-@1| @1|2| |l|i|n|e|s|:| |d|e|f| |F|o|{|"|o|"|}|(|)|-@47 +|++0#0000e05#a8a8a8255|-@1| @1|2| |l|i|n|e|s|:| |d|e|f| |F|o@1|(|)| |#| |c|o|m@1|e|n|t|-@41 | +0#0000000#ffffff0@74 -|++0#0000e05#a8a8a8255|-@1| @1|2| |l|i|n|e|s|:| |d|e|f| |{|"|F|"|}|o|{|"|o|"|}|(|)|-@43 +|++0#0000e05#a8a8a8255|-@1| @1|3| |l|i|n|e|s|:| |d|e|f| |F|o@1|(|)|:| |n|u|m|b|e|r| |#| |c|o|m@1|e|n|t|-@33 | +0#0000000#ffffff0@74 -|++0#0000e05#a8a8a8255|-@1| @1|2| |l|i|n|e|s|:| |d|e|f| |{|"|F|"|}|{|"|o|"|}|{|"|o|"|}|(|)|-@39 +|++0#0000e05#a8a8a8255|-@1| @1|3| |l|i|n|e|s|:| |d|e|f|!| |F|o@1|(|)|:| |n|u|m|b|e|r|-@42 | +0#0000000#ffffff0@74 -@57|1|9|,|1| @9|1|2|%| +@57|1|9|,|1| @9|1|6|%| diff --git a/runtime/syntax/testdir/dumps/vim_ex_def_fold_02.dump b/runtime/syntax/testdir/dumps/vim_ex_def_fold_02.dump index d9668cd59f..bbd362c83d 100644 --- a/runtime/syntax/testdir/dumps/vim_ex_def_fold_02.dump +++ b/runtime/syntax/testdir/dumps/vim_ex_def_fold_02.dump @@ -1,20 +1,20 @@ -| +0&#ffffff0@74 -|++0#0000e05#a8a8a8255|-@1| @1|2| |l|i|n|e|s|:| |d|e|f| |F|o|{|"|o|"|}|(|)|-@47 -| +0#0000000#ffffff0@74 -|++0#0000e05#a8a8a8255|-@1| @1|2| |l|i|n|e|s|:| |d|e|f| |{|"|F|"|}|o|{|"|o|"|}|(|)|-@43 -| +0#0000000#ffffff0@74 ->++0#0000e05#a8a8a8255|-@1| @1|2| |l|i|n|e|s|:| |d|e|f| |{|"|F|"|}|{|"|o|"|}|{|"|o|"|}|(|)|-@39 -| +0#0000000#ffffff0@74 -|++0#0000e05#a8a8a8255|-@1| @1|3| |l|i|n|e|s|:| |d|e|f| |F|o@1|(|)|:| |n|u|m|b|e|r|-@43 -| +0#0000000#ffffff0@74 -|#+0#0000e05&| |t|r|a|i|l|i|n|g| |w|h|i|t|e|s|p|a|c|e| +0#0000000&@53 +|"+0#0000e05#ffffff0| |t|r|a|i|l|i|n|g| |w|h|i|t|e|s|p|a|c|e| +0#0000000&@53 |++0#0000e05#a8a8a8255|-@1| @1|3| |l|i|n|e|s|:| |d|e|f| |F|o@1|(|)|:| |n|u|m|b|e|r| @1|-@41 | +0#0000000#ffffff0@74 |++0#0000e05#a8a8a8255|-@1| @1|2| |l|i|n|e|s|:| |d|e|f| |F|o@1|(|)| |#| |c|o|m@1|e|n|t|-@41 | +0#0000000#ffffff0@74 -|++0#0000e05#a8a8a8255|-@1| @1|3| |l|i|n|e|s|:| |d|e|f| |F|o@1|(|)|:| |n|u|m|b|e|r| |#| |c|o|m@1|e|n|t|-@33 +>++0#0000e05#a8a8a8255|-@1| @1|3| |l|i|n|e|s|:| |d|e|f| |F|o@1|(|)|:| |n|u|m|b|e|r| |#| |c|o|m@1|e|n|t|-@33 | +0#0000000#ffffff0@74 |++0#0000e05#a8a8a8255|-@1| @1|3| |l|i|n|e|s|:| |d|e|f|!| |F|o@1|(|)|:| |n|u|m|b|e|r|-@42 | +0#0000000#ffffff0@74 |++0#0000e05#a8a8a8255|-@1| @1|3| |l|i|n|e|s|:| |d|e|f| |g|:|F|o@1|(|)|:| |n|u|m|b|e|r|-@41 -| +0#0000000#ffffff0@56|3|7|,|1| @9|3|0|%| +| +0#0000000#ffffff0@74 +|++0#0000e05#a8a8a8255|-@1| @1|3| |l|i|n|e|s|:| |d|e|f| |s|:|F|o@1|(|)|:| |n|u|m|b|e|r|-@41 +| +0#0000000#ffffff0@74 +|++0#0000e05#a8a8a8255|-@1| @1|3| |l|i|n|e|s|:| |d|e|f| |<|S|I|D|>|F|o@1|(|)|:| |n|u|m|b|e|r|-@38 +| +0#0000000#ffffff0@74 +|++0#0000e05#a8a8a8255|-@1| @1|3| |l|i|n|e|s|:| |d|e|f| |f|o@1|#|b|a|r|#|F|o@1|(|)|:| |n|u|m|b|e|r|-@35 +| +0#0000000#ffffff0@74 +|"+0#0000e05&| |s|a|m|e| |n|a|m|e| |a|s| |a|n| |E|x| |c|o|m@1|a|n|d| +0#0000000&@46 +|++0#0000e05#a8a8a8255|-@1| @1|2| |l|i|n|e|s|:| |d|e|f| |s|:|l|s|(|)|-@50 +| +0#0000000#ffffff0@56|3|7|,|1| @9|3|4|%| diff --git a/runtime/syntax/testdir/dumps/vim_ex_def_fold_03.dump b/runtime/syntax/testdir/dumps/vim_ex_def_fold_03.dump index d20fb79f42..7ba9744e8e 100644 --- a/runtime/syntax/testdir/dumps/vim_ex_def_fold_03.dump +++ b/runtime/syntax/testdir/dumps/vim_ex_def_fold_03.dump @@ -1,20 +1,20 @@ | +0&#ffffff0@74 -|++0#0000e05#a8a8a8255|-@1| @1|2| |l|i|n|e|s|:| |d|e|f| |F|o@1|(|)| |#| |c|o|m@1|e|n|t|-@41 -| +0#0000000#ffffff0@74 -|++0#0000e05#a8a8a8255|-@1| @1|3| |l|i|n|e|s|:| |d|e|f| |F|o@1|(|)|:| |n|u|m|b|e|r| |#| |c|o|m@1|e|n|t|-@33 -| +0#0000000#ffffff0@74 ->++0#0000e05#a8a8a8255|-@1| @1|3| |l|i|n|e|s|:| |d|e|f|!| |F|o@1|(|)|:| |n|u|m|b|e|r|-@42 -| +0#0000000#ffffff0@74 -|++0#0000e05#a8a8a8255|-@1| @1|3| |l|i|n|e|s|:| |d|e|f| |g|:|F|o@1|(|)|:| |n|u|m|b|e|r|-@41 -| +0#0000000#ffffff0@74 |++0#0000e05#a8a8a8255|-@1| @1|3| |l|i|n|e|s|:| |d|e|f| |s|:|F|o@1|(|)|:| |n|u|m|b|e|r|-@41 | +0#0000000#ffffff0@74 |++0#0000e05#a8a8a8255|-@1| @1|3| |l|i|n|e|s|:| |d|e|f| |<|S|I|D|>|F|o@1|(|)|:| |n|u|m|b|e|r|-@38 | +0#0000000#ffffff0@74 -|++0#0000e05#a8a8a8255|-@1| @1|3| |l|i|n|e|s|:| |d|e|f| |f|o@1|#|b|a|r|#|F|o@1|(|)|:| |n|u|m|b|e|r|-@35 +>++0#0000e05#a8a8a8255|-@1| @1|3| |l|i|n|e|s|:| |d|e|f| |f|o@1|#|b|a|r|#|F|o@1|(|)|:| |n|u|m|b|e|r|-@35 | +0#0000000#ffffff0@74 |"+0#0000e05&| |s|a|m|e| |n|a|m|e| |a|s| |a|n| |E|x| |c|o|m@1|a|n|d| +0#0000000&@46 |++0#0000e05#a8a8a8255|-@1| @1|2| |l|i|n|e|s|:| |d|e|f| |s|:|l|s|(|)|-@50 | +0#0000000#ffffff0@74 @75 -@57|5@1|,|1| @9|4|9|%| +|"+0#0000e05&| |r|e|t|u|r|n| |t|y|p|e|s| +0#0000000&@60 +@75 +|++0#0000e05#a8a8a8255|-@1| @1|2| |l|i|n|e|s|:| |d|e|f| |F|o@1|(|)|:| |v|o|i|d|-@45 +| +0#0000000#ffffff0@74 +|++0#0000e05#a8a8a8255|-@1| @1|2| |l|i|n|e|s|:| |d|e|f| |F|o@1|(|)|:| |v|o|i|d| |#| |c|o|m@1|e|n|t|-@35 +| +0#0000000#ffffff0@74 +|++0#0000e05#a8a8a8255|-@1| @1|2| |l|i|n|e|s|:| |d|e|f| |F|o@1|(|)|:| |l|i|s|t|<|d|i|c|t|<|n|u|m|b|e|r|>@1|-@31 +| +0#0000000#ffffff0@74 +@57|5@1|,|1| @9|5@1|%| diff --git a/runtime/syntax/testdir/dumps/vim_ex_def_fold_04.dump b/runtime/syntax/testdir/dumps/vim_ex_def_fold_04.dump index bc95a8b224..66c845b2ba 100644 --- a/runtime/syntax/testdir/dumps/vim_ex_def_fold_04.dump +++ b/runtime/syntax/testdir/dumps/vim_ex_def_fold_04.dump @@ -1,20 +1,20 @@ | +0&#ffffff0@74 -|++0#0000e05#a8a8a8255|-@1| @1|3| |l|i|n|e|s|:| |d|e|f| |s|:|F|o@1|(|)|:| |n|u|m|b|e|r|-@41 +|++0#0000e05#a8a8a8255|-@1| @1|2| |l|i|n|e|s|:| |d|e|f| |F|o@1|(|)|:| |v|o|i|d|-@45 | +0#0000000#ffffff0@74 -|++0#0000e05#a8a8a8255|-@1| @1|3| |l|i|n|e|s|:| |d|e|f| |<|S|I|D|>|F|o@1|(|)|:| |n|u|m|b|e|r|-@38 +|++0#0000e05#a8a8a8255|-@1| @1|2| |l|i|n|e|s|:| |d|e|f| |F|o@1|(|)|:| |v|o|i|d| |#| |c|o|m@1|e|n|t|-@35 | +0#0000000#ffffff0@74 ->++0#0000e05#a8a8a8255|-@1| @1|3| |l|i|n|e|s|:| |d|e|f| |f|o@1|#|b|a|r|#|F|o@1|(|)|:| |n|u|m|b|e|r|-@35 +>++0#0000e05#a8a8a8255|-@1| @1|2| |l|i|n|e|s|:| |d|e|f| |F|o@1|(|)|:| |l|i|s|t|<|d|i|c|t|<|n|u|m|b|e|r|>@1|-@31 | +0#0000000#ffffff0@74 -|"+0#0000e05&| |s|a|m|e| |n|a|m|e| |a|s| |a|n| |E|x| |c|o|m@1|a|n|d| +0#0000000&@46 -|++0#0000e05#a8a8a8255|-@1| @1|2| |l|i|n|e|s|:| |d|e|f| |s|:|l|s|(|)|-@50 +|++0#0000e05#a8a8a8255|-@1| @1|2| |l|i|n|e|s|:| |d|e|f| |F|o@1|(|)|:| |f|u|n|c|(|d|i|c|t|<|l|i|s|t|<|n|u|m|b|e|r|>@1|,| |f|u|n|c|,| |b|o@1|l|,| |f|u|n|c|(|n|u|m|b|e|r|,| | +0#0000000#ffffff0@74 @75 -|"+0#0000e05&| |r|e|t|u|r|n| |t|y|p|e|s| +0#0000000&@60 +|"+0#0000e05&| |:|e|n|d@1|e|f| |t|r|a|i|l|i|n|g| +0#0000000&@56 @75 -|++0#0000e05#a8a8a8255|-@1| @1|2| |l|i|n|e|s|:| |d|e|f| |F|o@1|(|)|:| |v|o|i|d|-@45 +|++0#0000e05#a8a8a8255|-@1| @1|3| |l|i|n|e|s|:| |d|e|f| |F|o@1|(|)|-@51 | +0#0000000#ffffff0@74 -|++0#0000e05#a8a8a8255|-@1| @1|2| |l|i|n|e|s|:| |d|e|f| |F|o@1|(|)|:| |v|o|i|d| |#| |c|o|m@1|e|n|t|-@35 +|++0#0000e05#a8a8a8255|-@1| @1|2| |l|i|n|e|s|:| |d|e|f| |F|o@1|(|)|-@51 | +0#0000000#ffffff0@74 -|++0#0000e05#a8a8a8255|-@1| @1|2| |l|i|n|e|s|:| |d|e|f| |F|o@1|(|)|:| |l|i|s|t|<|d|i|c|t|<|n|u|m|b|e|r|>@1|-@31 +|++0#0000e05#a8a8a8255|-@1| @1|2| |l|i|n|e|s|:| |d|e|f| |F|o@1|(|)|-@51 | +0#0000000#ffffff0@74 -@57|7|3|,|1| @9|6|2|%| +@75 +@57|7|3|,|1| @9|7@1|%| diff --git a/runtime/syntax/testdir/dumps/vim_ex_def_fold_05.dump b/runtime/syntax/testdir/dumps/vim_ex_def_fold_05.dump index cc31e3d822..688b788eb8 100644 --- a/runtime/syntax/testdir/dumps/vim_ex_def_fold_05.dump +++ b/runtime/syntax/testdir/dumps/vim_ex_def_fold_05.dump @@ -1,20 +1,20 @@ | +0&#ffffff0@74 -|++0#0000e05#a8a8a8255|-@1| @1|2| |l|i|n|e|s|:| |d|e|f| |F|o@1|(|)|:| |v|o|i|d| |#| |c|o|m@1|e|n|t|-@35 -| +0#0000000#ffffff0@74 -|++0#0000e05#a8a8a8255|-@1| @1|2| |l|i|n|e|s|:| |d|e|f| |F|o@1|(|)|:| |l|i|s|t|<|d|i|c|t|<|n|u|m|b|e|r|>@1|-@31 +|++0#0000e05#a8a8a8255|-@1| @1|2| |l|i|n|e|s|:| |d|e|f| |F|o@1|(|)|-@51 | +0#0000000#ffffff0@74 ->++0#0000e05#a8a8a8255|-@1| @1|2| |l|i|n|e|s|:| |d|e|f| |F|o@1|(|)|:| |f|u|n|c|(|d|i|c|t|<|l|i|s|t|<|n|u|m|b|e|r|>@1|,| |f|u|n|c|,| |b|o@1|l|,| |f|u|n|c|(|n|u|m|b|e|r|,| +|++0#0000e05#a8a8a8255|-@1| @1|2| |l|i|n|e|s|:| |d|e|f| |F|o@1|(|)|-@51 | +0#0000000#ffffff0@74 +> @74 +|"+0#0000e05&| |p|a|r|a|m|e|t|e|r|s| +0#0000000&@62 @75 -|"+0#0000e05&| |:|e|n|d@1|e|f| |t|r|a|i|l|i|n|g| +0#0000000&@56 -@75 -|++0#0000e05#a8a8a8255|-@1| @1|3| |l|i|n|e|s|:| |d|e|f| |F|o@1|(|)|-@51 +|++0#0000e05#a8a8a8255|-@1| @1|2| |l|i|n|e|s|:| |d|e|f| |F|o@1|(|x|:| |b|o@1|l|,| |y| |=| |4|2|,| |z|:| |s|t|r|i|n|g| |=| |"|z|e|d|"|)|-@17 | +0#0000000#ffffff0@74 -|++0#0000e05#a8a8a8255|-@1| @1|2| |l|i|n|e|s|:| |d|e|f| |F|o@1|(|)|-@51 -| +0#0000000#ffffff0@74 -|++0#0000e05#a8a8a8255|-@1| @1|2| |l|i|n|e|s|:| |d|e|f| |F|o@1|(|)|-@51 +|++0#0000e05#a8a8a8255|-@1| @1|5| |l|i|n|e|s|:| |d|e|f| |F|o@1|(|-@52 | +0#0000000#ffffff0@74 @75 -|"+0#0000e05&| |p|a|r|a|m|e|t|e|r|s| +0#0000000&@62 +|"+0#0000e05&| |c|o|m@1|e|n|t|s| +0#0000000&@64 @75 -@57|9|1|,|1| @9|8|3|%| +|++0#0000e05#a8a8a8255|-@1| @1|4| |l|i|n|e|s|:| |d|e|f| |F|o@1|(|)|-@51 +| +0#0000000#ffffff0@74 +|~+0#4040ff13&| @73 +|~| @73 +| +0#0000000&@56|9|1|,|0|-|1| @7|B|o|t| diff --git a/runtime/syntax/testdir/dumps/vim_ex_def_fold_99.dump b/runtime/syntax/testdir/dumps/vim_ex_def_fold_99.dump index 0b4fce2430..f9e9ae099e 100644 --- a/runtime/syntax/testdir/dumps/vim_ex_def_fold_99.dump +++ b/runtime/syntax/testdir/dumps/vim_ex_def_fold_99.dump @@ -17,4 +17,4 @@ @75 |++0#0000e05#a8a8a8255|-@1| @1|4| |l|i|n|e|s|:| |d|e|f| |F|o@1|(|)|-@51 > +0#0000000#ffffff0@74 -@57|1|2|6|,|0|-|1| @6|B|o|t| +@57|1@1|0|,|0|-|1| @6|B|o|t| diff --git a/runtime/syntax/testdir/input/vim_ex_def.vim b/runtime/syntax/testdir/input/vim_ex_def.vim index dd4ecd15a3..2685ba5fd1 100644 --- a/runtime/syntax/testdir/input/vim_ex_def.vim +++ b/runtime/syntax/testdir/input/vim_ex_def.vim @@ -19,27 +19,11 @@ def Foo " comment def Foo() enddef -# curly-brace names -def {"F"}oo() -enddef - -def F{"o"}o() -enddef - -def Fo{"o"}() -enddef - -def {"F"}o{"o"}() -enddef - -def {"F"}{"o"}{"o"}() -enddef - def Foo(): number return 42 enddef -# trailing whitespace +" trailing whitespace def Foo(): number return 42 enddef diff --git a/runtime/syntax/testdir/input/vim_ex_def_fold.vim b/runtime/syntax/testdir/input/vim_ex_def_fold.vim index 7ab3e3f965..865fc5a919 100644 --- a/runtime/syntax/testdir/input/vim_ex_def_fold.vim +++ b/runtime/syntax/testdir/input/vim_ex_def_fold.vim @@ -20,27 +20,11 @@ def Foo " comment def Foo() enddef -# curly-brace names -def {"F"}oo() -enddef - -def F{"o"}o() -enddef - -def Fo{"o"}() -enddef - -def {"F"}o{"o"}() -enddef - -def {"F"}{"o"}{"o"}() -enddef - def Foo(): number return 42 enddef -# trailing whitespace +" trailing whitespace def Foo(): number return 42 enddef diff --git a/runtime/syntax/vim.vim b/runtime/syntax/vim.vim index 21122f9494..cfb94aecff 100644 --- a/runtime/syntax/vim.vim +++ b/runtime/syntax/vim.vim @@ -3,7 +3,7 @@ " Maintainer: Hirohito Higashi <h.east.727 ATMARK gmail.com> " Doug Kearns <dougkearns@gmail.com> " URL: https://github.com/vim-jp/syntax-vim-ex -" Last Change: 2024 Apr 07 +" Last Change: 2024 Apr 09 " Former Maintainer: Charles E. Campbell " DO NOT CHANGE DIRECTLY. @@ -314,8 +314,8 @@ syn match vimEnddef "\<enddef\>" if exists("g:vimsyn_folding") && g:vimsyn_folding =~# 'f' syn region vimFuncFold start="\<fu\%[nction]\>!\=\s*\%(<[sS][iI][dD]>\|[sg]:\)\=\%(\i\|[#.]\|{.\{-1,}}\)\+\s*(" end="\<endf\%[unction]\>" contains=vimFunction fold keepend transparent - syn region vimFuncFold start="\<def\>!\=\s*\%(<[sS][iI][dD]>\|[sg]:\)\=\%(\i\|[#.]\|{.\{-1,}}\)\+(" end="\<enddef\>" contains=vimDef fold keepend transparent - syn region vimFuncFold start="\<def\s\+new\%(\i\|{.\{-1,}}\)\+(" end="\<enddef\>" contains=vimDef fold keepend transparent + syn region vimFuncFold start="\<def\>!\=\s*\%(<[sS][iI][dD]>\|[sg]:\)\=\%(\i\|[#.]\)\+(" end="\<enddef\>" contains=vimDef fold keepend transparent + syn region vimFuncFold start="\<def\s\+new\i\+(" end="\<enddef\>" contains=vimDef fold keepend transparent endif syn match vimFuncVar contained "a:\%(\K\k*\|\d\+\)\>" |