Commit: runtime(java): add syntax support for Java switch expressions (#9124)

5 views
Skip to first unread message

Christian Brabandt

unread,
Feb 22, 2024, 9:15:11 AMFeb 22
to vim...@googlegroups.com
runtime(java): add syntax support for Java switch expressions (#9124)

Commit: https://github.com/vim/vim/commit/20d61e1b94e5ac571b3a313765517582f86616f3
Author: Nick Hanley <nichola...@gmail.com>
Date: Thu Feb 22 09:06:19 2024 -0500

runtime(java): add syntax support for Java switch expressions (https://github.com/vim/vim/issues/9124)

Signed-off-by: Nick Hanley <nichola...@gmail.com>
Signed-off-by: Doug Kearns <dougk...@gmail.com>
Signed-off-by: Christian Brabandt <c...@256bit.org>

diff --git a/runtime/syntax/java.vim b/runtime/syntax/java.vim
index 00d607194..44fbfa839 100644
--- a/runtime/syntax/java.vim
+++ b/runtime/syntax/java.vim
@@ -2,7 +2,7 @@
" Language: Java
" Maintainer: Claudio Fleiner <cla...@fleiner.com>
" URL: https://github.com/fleiner/vim/blob/master/runtime/syntax/java.vim
-" Last Change: 2022 Jun 08
+" Last Change: 2023 Aug 13

" Please check :help java.vim for comments on some of the options available.

@@ -39,7 +39,7 @@ syn keyword javaTypedef this super
syn keyword javaOperator var new instanceof
syn keyword javaType boolean char byte short int long float double
syn keyword javaType void
-syn keyword javaStatement return
+syn keyword javaStatement return yield
syn keyword javaStorageClass static synchronized transient volatile final strictfp serializable
syn keyword javaExceptions throw try catch finally
syn keyword javaAssert assert
@@ -142,7 +142,7 @@ if exists("java_space_errors")
endif
endif

-syn region javaLabelRegion transparent matchgroup=javaLabel start="\<case\>" end="->" matchgroup=NONE end=":" contains=javaNumber,javaCharacter,javaString
+syn region javaLabelRegion transparent matchgroup=javaLabel start="\<case\>" matchgroup=NONE end=":\|->" contains=javaNumber,javaCharacter,javaString
syn match javaUserLabel "^\s*[_$a-zA-Z][_$a-zA-Z0-9_]*\s*:"he=e-1 contains=javaLabel
syn keyword javaLabel default

Reply all
Reply to author
Forward
0 new messages