runtime(vim): Update base-syntax, fix inline Vim9 dict comments at SOL

Commit: 
https://github.com/vim/vim/commit/b9ffbf57f86e7b78021e2c8899ee0aa06966ddf5
Author: Doug Kearns <dougkea...@gmail.com>
Date:   Sun Apr 27 19:17:06 2025 +0200

    runtime(vim): Update base-syntax, fix inline Vim9 dict comments at SOL
    
    Match Vim9 comments at start-of-line (no leading whitespace) in
    dictionaries, lists and parenthesised expressions and argument lists.
    
    Addresses https://github.com/vim/vim/pull/14975#issuecomment-2832643115
    
    Report and fix by Aliaksei Budavei.
    
    closes: #17211
    
    Signed-off-by: Doug Kearns <dougkea...@gmail.com>
    Signed-off-by: Christian Brabandt <c...@256bit.org>

diff --git a/runtime/syntax/generator/vim.vim.base 
b/runtime/syntax/generator/vim.vim.base
index 7b91ff23e..9b46afd50 100644
--- a/runtime/syntax/generator/vim.vim.base
+++ b/runtime/syntax/generator/vim.vim.base
@@ -351,7 +351,7 @@ Vim9 syn match      vimAugroup      
"\<aug\%[roup]\>\ze\s*\%([#|]\|$\)"     skipwhite nextgro
 
 " Operators: {{{2
 " =========
-syn cluster    vimOperGroup    
contains=@vimContinue,@vimExprList,vim9Comment,vimContinueString
+syn cluster    vimOperGroup    
contains=@vimContinue,@vimExprList,vim9Comment,vim9LineComment,vimContinueString
 syn match      vimOper " \@<!!"                        skipwhite skipnl 
nextgroup=@vimOperContinue,@vimExprList,vimSpecFile
 syn match      vimOper "||\|&&\|[-+*/%.]"              skipwhite skipnl 
nextgroup=@vimOperContinue,@vimExprList,vimSpecFile
 syn match      vimOper "?"                     skipwhite skipnl 
nextgroup=@vimOperContinue,@vimExprList,vimContinueString
diff --git a/runtime/syntax/testdir/dumps/vim9_comment_01.dump 
b/runtime/syntax/testdir/dumps/vim9_comment_01.dump
index 3eee3e9f6..da29430fd 100644
--- a/runtime/syntax/testdir/dumps/vim9_comment_01.dump
+++ b/runtime/syntax/testdir/dumps/vim9_comment_01.dump
@@ -17,4 +17,4 @@
 @75
 |#+0#0000e05&| |M|u|l|t|i|l|i|n|e| |c|o|m@1|e|n|t|s| +0#0000000&@54
 @75
-@57|1|9|,|0|-|1| @7|2|6|%| 
+@57|1|9|,|0|-|1| @7|1|7|%| 
diff --git a/runtime/syntax/testdir/dumps/vim9_comment_02.dump 
b/runtime/syntax/testdir/dumps/vim9_comment_02.dump
index 7a630912f..23ecd7e24 100644
--- a/runtime/syntax/testdir/dumps/vim9_comment_02.dump
+++ b/runtime/syntax/testdir/dumps/vim9_comment_02.dump
@@ -17,4 +17,4 @@
 @75
 |#+0#0000e05&| |L|i|n|e|-|c|o|n|t|i|n|u|a|t|i|o|n| |c|o|m@1|e|n|t|s| 
+0#0000000&@46
 @75
-@57|3|7|,|1| @9|6|3|%| 
+@57|3|7|,|1| @9|4|2|%| 
diff --git a/runtime/syntax/testdir/dumps/vim9_comment_03.dump 
b/runtime/syntax/testdir/dumps/vim9_comment_03.dump
index daede6013..b28daf472 100644
--- a/runtime/syntax/testdir/dumps/vim9_comment_03.dump
+++ b/runtime/syntax/testdir/dumps/vim9_comment_03.dump
@@ -6,15 +6,15 @@
 @6>\+0#e000e06&| +0#0000000&|a|r|g|2| @62
 @75
 @75
-|#+0#0000e05&| +0#0000000&|I+0#e000e06&|s@1|u|e|:| +0#0000e05&|#|1|3|0|4|7| 
+0#0000000&@59
+|#+0#0000e05&| |E|x|p|r|e|s@1|i|o|n| |c|o|m@1|e|n|t|s| +0#0000000&@53
 @75
-|i+0#af5f00255&|f| 
+0#0000000&|!+0#af5f00255&|e+0#00e0e07&|x|i|s|t|s|(+0#e000e06&|"+0#e000002&|:|D|i|f@1|O|r|i|g|"|)+0#e000e06&|
 +0#0000000&@51
-@2|c+0#af5f00255&|o|m@1|a|n|d| +0#0000000&|D|i|f@1|O|r|i|g| 
|v+0#af5f00255&|e|r|t| +0#0000000&|n+0#af5f00255&|e|w| +0#0000000&||| 
|s+0#af5f00255&|e|t| 
+0#0000000&|b+0#e000e06&|t|=+0#af5f00255&|n+0#0000000&|o|f|i|l|e| ||| 
|r+0#af5f00255&| +0#0000000&|++0#af5f00255&@1|e+0#00e0e07&|d|i|t| 
+0#0000000&|%+0#af5f00255&@1| +0#0000000&||| |0+0#e000002&|d+0#0000000&|_| ||| 
|d+0#af5f00255&|i|f@1|t|h|i|s| +0#0000000&
-@18|\+0#e000e06&| +0#0000000&||| |w+0#af5f00255&|i|n|c|m|d| 
+0#0000000&|p+0#af5f00255&| +0#0000000&||| |d+0#af5f00255&|i|f@1|t|h|i|s| 
+0#0000000&@33
-|e+0#af5f00255&|n|d|i|f| +0#0000000&@69
+|v+0#af5f00255&|a|r| +0#0000000&|f+0#00e0e07&|o@1| +0#0000000&|=+0#af5f00255&| 
+0#0000000&|{+0#e000e06&| +0#0000000&|#+0#0000e05&| |c|o|m@1|e|n|t| 
+0#0000000&@53
+@2|#+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@63
+@2|b+0#00e0e07&|a|r|:+0#0000000&| |4+0#e000002&|2|,+0#0000000&| |#+0#0000e05&| 
|c|o|m@1|e|n|t| +0#0000000&@54
+@2|#+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@63
+@2|#+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@63
+@2|b+0#00e0e07&|a|z|:+0#0000000&| |4+0#e000002&|2| +0#0000000&|#+0#0000e05&| 
|c|o|m@1|e|n|t| +0#0000000&@55
+@2|#+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@63
+|}+0#e000e06&| +0#0000000&|#+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@63
 @75
-@75
-|#+0#0000e05&| +0#0000000&|I+0#e000e06&|s@1|u|e|:| +0#0000e05&|#|1@1|3|0|7| 
|a|n|d| |#|1@1|5|6|0| +0#0000000&@48
-@75
-|#+0#0000e05&| |T|h|i|s| |i|s| |w|h|a|t| |w|e| |c|a|l@1| |"| |b|l|a|h| 
+0#0000000&@45
-@57|5@1|,|7| @9|B|o|t| 
+@57|5@1|,|7| @9|6|7|%| 
diff --git a/runtime/syntax/testdir/dumps/vim9_comment_04.dump 
b/runtime/syntax/testdir/dumps/vim9_comment_04.dump
new file mode 100644
index 000000000..42900217c
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim9_comment_04.dump
@@ -0,0 +1,20 @@
+| +0&#ffffff0@74
+@75
+|#+0#0000e05&| +0#0000000&|I+0#e000e06&|s@1|u|e|:| +0#0000e05&|#|1|3|0|4|7| 
+0#0000000&@59
+@75
+|i+0#af5f00255&|f| 
+0#0000000&|!+0#af5f00255&|e+0#00e0e07&|x|i|s|t|s|(+0#e000e06&|"+0#e000002&|:|D|i|f@1|O|r|i|g|"|)+0#e000e06&|
 +0#0000000&@51
+@2>c+0#af5f00255&|o|m@1|a|n|d| +0#0000000&|D|i|f@1|O|r|i|g| 
|v+0#af5f00255&|e|r|t| +0#0000000&|n+0#af5f00255&|e|w| +0#0000000&||| 
|s+0#af5f00255&|e|t| 
+0#0000000&|b+0#e000e06&|t|=+0#af5f00255&|n+0#0000000&|o|f|i|l|e| ||| 
|r+0#af5f00255&| +0#0000000&|++0#af5f00255&@1|e+0#00e0e07&|d|i|t| 
+0#0000000&|%+0#af5f00255&@1| +0#0000000&||| |0+0#e000002&|d+0#0000000&|_| ||| 
|d+0#af5f00255&|i|f@1|t|h|i|s| +0#0000000&
+@18|\+0#e000e06&| +0#0000000&||| |w+0#af5f00255&|i|n|c|m|d| 
+0#0000000&|p+0#af5f00255&| +0#0000000&||| |d+0#af5f00255&|i|f@1|t|h|i|s| 
+0#0000000&@33
+|e+0#af5f00255&|n|d|i|f| +0#0000000&@69
+@75
+@75
+|#+0#0000e05&| +0#0000000&|I+0#e000e06&|s@1|u|e|:| +0#0000e05&|#|1@1|3|0|7| 
|a|n|d| |#|1@1|5|6|0| +0#0000000&@48
+@75
+|#+0#0000e05&| |T|h|i|s| |i|s| |w|h|a|t| |w|e| |c|a|l@1| |"| |b|l|a|h| 
+0#0000000&@45
+@75
+@75
+|#+0#0000e05&| +0#0000000&|P+0#e000e06&|R|:| +0#0000e05&|#|1|4|9|7|5| 
+0#0000000&@62
+|#+0#0000e05&| 
|h|t@1|p|s|:|/@1|g|i|t|h|u|b|.|c|o|m|/|v|i|m|/|v|i|m|/|p|u|l@1|/|1|4|9|7|5|#|i|s@1|u|e|c|o|m@1|e|n|t|-|2|8|3|2|6|4|3|1@1|5|
 +0#0000000&@11
+@75
+|v+0#af5f00255&|a|r| +0#0000000&|d+0#00e0e07&| +0#0000000&|=+0#af5f00255&| 
+0#0000000&|{+0#e000e06&| +0#0000000&@65
+@57|7|3|,|3| @9|9|1|%| 
diff --git a/runtime/syntax/testdir/dumps/vim9_comment_05.dump 
b/runtime/syntax/testdir/dumps/vim9_comment_05.dump
new file mode 100644
index 000000000..34ced4c29
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim9_comment_05.dump
@@ -0,0 +1,20 @@
+|v+0#af5f00255#ffffff0|a|r| +0#0000000&|d+0#00e0e07&| 
+0#0000000&|=+0#af5f00255&| +0#0000000&|{+0#e000e06&| +0#0000000&@65
+@4|a+0#00e0e07&|:| +0#0000000&|0+0#e000002&|,+0#0000000&| @65
+|#+0#0000e05&| |a| |'| |q|u|o|t|e| |{@2| +0#0000000&@59
+|#+0#0000e05&|}@2| +0#0000000&@70
+|b+0#00e0e07&|:| +0#0000000&|0+0#e000002&|,+0#0000000&| @69
+>}+0#e000e06&| +0#0000000&@73
+@75
+|~+0#4040ff13&| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+| +0#0000000&@56|9|1|,|1| @9|B|o|t| 
diff --git a/runtime/syntax/testdir/input/vim9_comment.vim 
b/runtime/syntax/testdir/input/vim9_comment.vim
index 7d22f46bb..590ddd869 100644
--- a/runtime/syntax/testdir/input/vim9_comment.vim
+++ b/runtime/syntax/testdir/input/vim9_comment.vim
@@ -55,6 +55,18 @@ echo "TOP"
       \ arg2
 
 
+# Expression comments
+
+var foo = { # comment
+  # comment
+  bar: 42, # comment
+  # comment
+  # comment
+  baz: 42 # comment
+  # comment
+} # comment
+
+
 # Issue: #13047
 
 if !exists(":DiffOrig")
@@ -66,3 +78,15 @@ endif
 # Issue: #11307 and #11560
 
 # This is what we call " blah
+
+
+# PR: #14975
+# https://github.com/vim/vim/pull/14975#issuecomment-2832643115
+
+var d = {
+    a: 0,
+# a ' quote {{{
+#}}}
+b: 0,
+}
+
diff --git a/runtime/syntax/vim.vim b/runtime/syntax/vim.vim
index 741ec8134..2bf0f7dea 100644
--- a/runtime/syntax/vim.vim
+++ b/runtime/syntax/vim.vim
@@ -403,7 +403,7 @@ Vim9 syn match      vimAugroup      
"\<aug\%[roup]\>\ze\s*\%([#|]\|$\)"     skipwhite nextgro
 
 " Operators: {{{2
 " =========
-syn cluster    vimOperGroup    
contains=@vimContinue,@vimExprList,vim9Comment,vimContinueString
+syn cluster    vimOperGroup    
contains=@vimContinue,@vimExprList,vim9Comment,vim9LineComment,vimContinueString
 syn match      vimOper " \@<!!"                        skipwhite skipnl 
nextgroup=@vimOperContinue,@vimExprList,vimSpecFile
 syn match      vimOper "||\|&&\|[-+*/%.]"              skipwhite skipnl 
nextgroup=@vimOperContinue,@vimExprList,vimSpecFile
 syn match      vimOper "?"                     skipwhite skipnl 
nextgroup=@vimOperContinue,@vimExprList,vimContinueString

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
To view this discussion visit 
https://groups.google.com/d/msgid/vim_dev/E1u95pM-00BQln-8Q%40256bit.org.

Raspunde prin e-mail lui