runtime(vim): Update base-syntax, match Vim9 boolean and null literals in parens
- Match Vim9 boolean and null literals in parenthesised expressions and function argument lists. - Match read-only registers in expressions. closes: #16622 Signed-off-by: Doug Kearns <dougkearns@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
committed by
Christian Brabandt
parent
88ce0c546b
commit
a9c06429ac
@ -30,6 +30,7 @@ echo g:foo ? g:foo : g:bar
|
||||
echo $FOO ? $FOO : $BAR
|
||||
echo True() ? True() : False()
|
||||
echo @a ? @a : @b
|
||||
echo (true) ? (true) : (false)
|
||||
echo (1) ? (1) : (0)
|
||||
|
||||
# Falsy
|
||||
@ -52,9 +53,15 @@ echo g:foo ?? g:foo
|
||||
echo $FOO ?? $FOO
|
||||
echo True() ?? True()
|
||||
echo @a ?? @a
|
||||
echo (true) ?? (true)
|
||||
echo (1) ?? (1)
|
||||
|
||||
|
||||
# Function calls
|
||||
|
||||
Foo(true, false, null)
|
||||
|
||||
|
||||
# Command {expr} arguments
|
||||
|
||||
if true
|
||||
|
||||
@ -100,6 +100,15 @@ echo [1, 'two', 1 + 2, "fo" .. "ur"]
|
||||
" Issue #5830 (Incorrect syntax highlighting in Vim script when omitting space in list of string)
|
||||
let l = ['a','b','c']
|
||||
|
||||
" Register
|
||||
|
||||
echo @"
|
||||
echo @0 @1 @2 @3 @4 @5 @6 @7 @8 @9
|
||||
echo @-
|
||||
echo @a @b @c @d @e @f @g @h @i @j @k @l @m @n @o @p @q @r @s @t @u @v @w @x @y @z
|
||||
echo @A @B @C @D @E @F @G @H @I @J @K @L @M @N @O @P @Q @R @S @T @U @V @W @X @Y @Z
|
||||
echo @: @. @% @# @= @* @+ @~ @_ @/
|
||||
|
||||
" Operators
|
||||
|
||||
" Ternary
|
||||
@ -204,6 +213,10 @@ let foo = foo +
|
||||
\ bar +
|
||||
\ "baz"
|
||||
|
||||
" Function calls
|
||||
|
||||
call Foo(v:true, v:false, v:null)
|
||||
|
||||
|
||||
" Issue #16221 (vimString becomes vimVar when preceded by !)
|
||||
let bar = !'g:bar'->exists()
|
||||
|
||||
Reference in New Issue
Block a user