runtime(qml): Add optional chaining to QML syntax

Commit: 
https://github.com/vim/vim/commit/c5de8231f436d47ca5daf4f4d5d91c55632f52ce
Author: ii14 <[email protected]>
Date:   Tue Apr 28 21:20:41 2026 +0000

    runtime(qml): Add optional chaining to QML syntax
    
    "obj?.prop" was wrongly parsed as ternary operator.
    
    closes: #19988
    
    Signed-off-by: ii14 <[email protected]>
    Signed-off-by: Christian Brabandt <[email protected]>

diff --git a/runtime/syntax/qml.vim b/runtime/syntax/qml.vim
index d6f2abec3..e395d83c2 100644
--- a/runtime/syntax/qml.vim
+++ b/runtime/syntax/qml.vim
@@ -4,6 +4,7 @@
 " Maintainer:   Chase Knowlden <[email protected]>
 " Changes:      `git log` is your friend
 " Last Change:  2023 Aug 16
+" 2026 Apr 16 by Vim project: handle ?. optional chaining #19988
 "
 " This file is bassed on the original work done by Warwick Allison
 " <[email protected]> whose did about 99% of the work here.
@@ -44,6 +45,7 @@ syn match   qmlObjectLiteralType 
"[A-Za-z][_A-Za-z0-9]*\s*\({\)\@="
 syn region  qmlTernaryColon   start="?" end=":" 
contains=@qmlExpr,qmlBraces,qmlParens,qmlLineComment
 syn match   qmlBindingProperty   "\<[A-Za-z][_A-Za-z.0-9]*\s*:"
 syn match  qmlNullishCoalescing    "??"
+syn match   qmlOptionalChaining  "?\."
 
 syn keyword qmlConditional       if else switch
 syn keyword qmlRepeat            while for do in

-- 
-- 
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 [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/vim_dev/E1wHq0L-006HyJ-K9%40256bit.org.

Raspunde prin e-mail lui