forked from aniani/vim
runtime(vim): Update base-syntax, match shebang lines (#15011)
Match shebang lines in Vim9 and legacy script. Mark these as an error if they appear anywhere other than the first line of a legacy-script file. In Vim9 script these match as normal line comments rather than an error. Signed-off-by: Doug Kearns <dougkearns@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
20
runtime/syntax/testdir/dumps/vim9_shebang_00.dump
Normal file
20
runtime/syntax/testdir/dumps/vim9_shebang_00.dump
Normal file
@@ -0,0 +1,20 @@
|
||||
>#+0#e000e06#ffffff0|!|/|u|s|r|/|b|i|n|/|e|n|v| |v|i|m| |-|S| +0#0000000&@53
|
||||
|v+0#af5f00255&|i|m|9|s|c|r|i|p|t| +0#0000000&@64
|
||||
@75
|
||||
|#+0#0000e05&| |V|i|m| |s|h|e|b|a|n|g| |l|i|n|e| +0#0000000&@56
|
||||
@75
|
||||
|#+0#0000e05&| |j|u|s|t| |a| |l|i|n|e| |c|o|m@1|e|n|t| +0#0000000&@53
|
||||
|#+0#0000e05&|!|/|u|s|r|/|b|i|n|/|e|n|v| |v|i|m| |-|S| +0#0000000&@53
|
||||
|~+0#4040ff13&| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
| +0#0000000&@56|1|,|1| @10|A|l@1|
|
20
runtime/syntax/testdir/dumps/vim9_shebang_99.dump
Normal file
20
runtime/syntax/testdir/dumps/vim9_shebang_99.dump
Normal file
@@ -0,0 +1,20 @@
|
||||
|#+0#e000e06#ffffff0|!|/|u|s|r|/|b|i|n|/|e|n|v| |v|i|m| |-|S| +0#0000000&@53
|
||||
|v+0#af5f00255&|i|m|9|s|c|r|i|p|t| +0#0000000&@64
|
||||
@75
|
||||
|#+0#0000e05&| |V|i|m| |s|h|e|b|a|n|g| |l|i|n|e| +0#0000000&@56
|
||||
@75
|
||||
|#+0#0000e05&| |j|u|s|t| |a| |l|i|n|e| |c|o|m@1|e|n|t| +0#0000000&@53
|
||||
>#+0#0000e05&|!|/|u|s|r|/|b|i|n|/|e|n|v| |v|i|m| |-|S| +0#0000000&@53
|
||||
|~+0#4040ff13&| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
| +0#0000000&@56|7|,|1| @10|A|l@1|
|
20
runtime/syntax/testdir/dumps/vim_shebang_00.dump
Normal file
20
runtime/syntax/testdir/dumps/vim_shebang_00.dump
Normal file
@@ -0,0 +1,20 @@
|
||||
>#+0#e000e06#ffffff0|!|/|u|s|r|/|b|i|n|/|e|n|v| |v|i|m| |-|S| +0#0000000&@53
|
||||
@75
|
||||
|"+0#0000e05&| |V|i|m| |s|h|e|b|a|n|g| |l|i|n|e| +0#0000000&@56
|
||||
@75
|
||||
|#+0#ffffff16#ff404010|!|/|u|s|r|/|b|i|n|/|e|n|v| |v|i|m| |-|S| +0#0000000#ffffff0@53
|
||||
|~+0#4040ff13&| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
| +0#0000000&@56|1|,|1| @10|A|l@1|
|
20
runtime/syntax/testdir/dumps/vim_shebang_99.dump
Normal file
20
runtime/syntax/testdir/dumps/vim_shebang_99.dump
Normal file
@@ -0,0 +1,20 @@
|
||||
|#+0#e000e06#ffffff0|!|/|u|s|r|/|b|i|n|/|e|n|v| |v|i|m| |-|S| +0#0000000&@53
|
||||
@75
|
||||
|"+0#0000e05&| |V|i|m| |s|h|e|b|a|n|g| |l|i|n|e| +0#0000000&@56
|
||||
@75
|
||||
>#+0#ffffff16#ff404010|!|/|u|s|r|/|b|i|n|/|e|n|v| |v|i|m| |-|S| +0#0000000#ffffff0@53
|
||||
|~+0#4040ff13&| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
| +0#0000000&@56|5|,|1| @10|A|l@1|
|
7
runtime/syntax/testdir/input/vim9_shebang.vim
Executable file
7
runtime/syntax/testdir/input/vim9_shebang.vim
Executable file
@@ -0,0 +1,7 @@
|
||||
#!/usr/bin/env vim -S
|
||||
vim9script
|
||||
|
||||
# Vim shebang line
|
||||
|
||||
# just a line comment
|
||||
#!/usr/bin/env vim -S
|
5
runtime/syntax/testdir/input/vim_shebang.vim
Executable file
5
runtime/syntax/testdir/input/vim_shebang.vim
Executable file
@@ -0,0 +1,5 @@
|
||||
#!/usr/bin/env vim -S
|
||||
|
||||
" Vim shebang line
|
||||
|
||||
#!/usr/bin/env vim -S
|
Reference in New Issue
Block a user