Mercurial > vim
changeset 35469:6a29a07451c7
runtime(java): Remove the group exclusion list from @javaTop
Commit: https://github.com/vim/vim/commit/94c5d8a5e20e1dd8c9e8434ee14e368276644f61
Author: Aliaksei Budavei <0x000c70@gmail.com>
Date: Wed Jun 19 20:10:47 2024 +0200
runtime(java): Remove the group exclusion list from @javaTop
Instances of anonymous classes can be passed as method
arguments and should be subject to line folding as well.
closes: #15048
Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
line wrap: on
line diff
--- a/runtime/syntax/java.vim +++ b/runtime/syntax/java.vim @@ -3,7 +3,7 @@ " Maintainer: Aliaksei Budavei <0x000c70 AT gmail DOT com> " Former Maintainer: Claudio Fleiner <claudio@fleiner.com> " Repository: https://github.com/zzzyxwvut/java-vim.git -" Last Change: 2024 Jun 15 +" Last Change: 2024 Jun 19 " Please check :help java.vim for comments on some of the options available. @@ -412,15 +412,15 @@ if exists("java_highlight_debug") hi def link DebugType Type endif +" Try not to fold top-level-type bodies under assumption that there is +" but one such body. +exec 'syn region javaBlock transparent start="\%(^\|^\S[^:]\+\)\@' . s:ff.Peek('120', '') . '<!{" end="}" fold' + if exists("java_mark_braces_in_parens_as_errors") syn match javaInParen contained "[{}]" hi def link javaInParen javaError endif -" Try not to fold top-level-type bodies under assumption that there is -" but one such body. -exec 'syn region javaBlock transparent start="\%(^\|^\S[^:]\+\)\@' . s:ff.Peek('120', '') . '<!{" end="}" fold' - " catch errors caused by wrong parenthesis syn region javaParenT transparent matchgroup=javaParen start="(" end=")" contains=@javaTop,javaInParen,javaParenT1 syn region javaParenT1 transparent matchgroup=javaParen1 start="(" end=")" contains=@javaTop,javaInParen,javaParenT2 contained @@ -458,7 +458,7 @@ endif " The @javaTop cluster comprises non-contained Java syntax groups. " Note that the syntax file "aidl.vim" relies on its availability. -syn cluster javaTop contains=TOP,javaDocComment,javaBlock,javaParenError,javaParenT +syn cluster javaTop contains=TOP if !exists("java_minlines") let java_minlines = 10
--- a/runtime/syntax/testdir/dumps/java_enfoldment_00.dump +++ b/runtime/syntax/testdir/dumps/java_enfoldment_00.dump @@ -1,5 +1,5 @@ | +0#0000e05#a8a8a8255@1>/+0&#ffffff0@1| |V|I|M|_|T|E|S|T|_|S|E|T|U|P| |s|e|t|l|o|c|a|l| |f|o|l|d|e|n|a|b|l|e| |f|o|l|d|c|o|l|u|m|n|=|2| |f|o|l|d|m|e|t|h|o|d|=|s|y|n|t|a|x| +0#0000000&@4 -| +0#0000e05#a8a8a8255@1|/+0&#ffffff0@1| |V|I|M|_|T|E|S|T|_|S|E|T|U|P| |l|e|t| |g|:|j|a|v|a|_|m|a|r|k|_|b|r|a|c|e|s|_|i|n|_|p|a|r|e|n|s|_|a|s|_|e|r@1|o|r|s| |=| |1| +0#0000000&@8 +| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@72 | +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@72 |++0#0000e05#a8a8a8255| |+|-@1| |1|6| |l|i|n|e|s|:| |@|S|u|p@1|r|e|s@1|W|a|r|n|i|n|g|s|(|{|-@39 | @1|c+0#00e0003#ffffff0|l|a|s@1| +0#0000000&|F|o|l|d|i|n|g|T|e|s|t|s| |{| @52 @@ -8,13 +8,13 @@ | @1| +0#0000000#ffffff0@72 |++0#0000e05#a8a8a8255| |+|-@1| |1|9| |l|i|n|e|s|:| |s|t|a|t|i|c| |{|-@50 | @1| +0#0000000#ffffff0@72 -| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@3|{| |O|b|j|e|c|t| |b@1| |=| |(@1|O|b|j|e|c|t|)| |n+0#af5f00255&|e|w| +0#0000000&|b+0#00e0003&|y|t|e|[+0#0000000&|]|{+0#ffffff16#ff404010|}|)+0#0000000#ffffff0|;| |}| @28 +| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@3|{| |O|b|j|e|c|t| |b@1| |=| |(@1|O|b|j|e|c|t|)| |n+0#af5f00255&|e|w| +0#0000000&|b+0#00e0003&|y|t|e|[+0#0000000&|]|{|}|)|;| |}| @28 |++0#0000e05#a8a8a8255| |+|-@1| @1|8| |l|i|n|e|s|:| |{|-@57 -| @1| +0#0000000#ffffff0@72 +| @1|/+0&#ffffff0|*|\@2|*|/| +0#0000000&|{| @63 +|++0#0000e05#a8a8a8255| |+|-@1| @1|5| |l|i|n|e|s|:| |(|n|e|w| |j|a|v|a|.|u|t|i|l|.|f|u|n|c|t|i|o|n|.|F|u|n|c|t|i|o|n|<|O|b|j|e|c|t|,| |O|b|j|e|c|t|>|(|)| |{|-@6 +|+| |+|-@1| @1|5| |l|i|n|e|s|:| |(|n|e|w| |j|a|v|a|.|u|t|i|l|.|f|u|n|c|t|i|o|n|.|F|u|n|c|t|i|o|n|<|O|b|j|e|c|t|,| |O|b|j|e|c|t|>|(|)| |{|-@6 +| @1| +0#0000000#ffffff0@3|}| @67 +| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@72 |++0#0000e05#a8a8a8255| |+|-@1| @1|3| |l|i|n|e|s|:| @2|*| |N|o| |o|p|e|r|a|t|i|o|n|.|-@41 | @1| +0#0000000#ffffff0@3|v+0#00e0003&|o|i|d| +0#0000000&|n|o|O|p|1|(|)| |{| |}| @52 -| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@3|/+0#0000e05&|*@1| +0#e000e06&|N|o| |o|p|e|r|a|t|i|o|n|.| +0#0000e05&|*|/| +0#0000000&@48 -| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@3|v+0#00e0003&|o|i|d| +0#0000000&|n|o|O|p|2|(|)| @56 -|++0#0000e05#a8a8a8255| |+|-@1| @1|2| |l|i|n|e|s|:| |{|-@57 -| @1| +0#0000000#ffffff0@3|/+0#0000e05&|*@1| +0#e000e06&|N|o| |o|p|e|r|a|t|i|o|n|.| +0#0000e05&|*|/| +0#0000000&@48 @57|1|,|1| @10|T|o|p|
--- a/runtime/syntax/testdir/dumps/java_enfoldment_01.dump +++ b/runtime/syntax/testdir/dumps/java_enfoldment_01.dump @@ -1,5 +1,5 @@ | +0#0000e05#a8a8a8255@1|/+0&#ffffff0@1| |V|I|M|_|T|E|S|T|_|S|E|T|U|P| |s|e|t|l|o|c|a|l| |f|o|l|d|e|n|a|b|l|e| |f|o|l|d|c|o|l|u|m|n|=|2| |f|o|l|d|m|e|t|h|o|d|=|s|y|n|t|a|x| +0#0000000&@4 -| +0#0000e05#a8a8a8255@1|/+0&#ffffff0@1| |V|I|M|_|T|E|S|T|_|S|E|T|U|P| |l|e|t| |g|:|j|a|v|a|_|m|a|r|k|_|b|r|a|c|e|s|_|i|n|_|p|a|r|e|n|s|_|a|s|_|e|r@1|o|r|s| |=| |1| +0#0000000&@8 +| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@72 | +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@72 |++0#0000e05#a8a8a8255| >+|-@1| |1|6| |l|i|n|e|s|:| |@|S|u|p@1|r|e|s@1|W|a|r|n|i|n|g|s|(|{|-@39 | @1|c+0#00e0003#ffffff0|l|a|s@1| +0#0000000&|F|o|l|d|i|n|g|T|e|s|t|s| |{| @52 @@ -8,13 +8,13 @@ | @1| +0#0000000#ffffff0@72 |++0#0000e05#a8a8a8255| |+|-@1| |1|9| |l|i|n|e|s|:| |s|t|a|t|i|c| |{|-@50 | @1| +0#0000000#ffffff0@72 -| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@3|{| |O|b|j|e|c|t| |b@1| |=| |(@1|O|b|j|e|c|t|)| |n+0#af5f00255&|e|w| +0#0000000&|b+0#00e0003&|y|t|e|[+0#0000000&|]|{+0#ffffff16#ff404010|}|)+0#0000000#ffffff0|;| |}| @28 +| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@3|{| |O|b|j|e|c|t| |b@1| |=| |(@1|O|b|j|e|c|t|)| |n+0#af5f00255&|e|w| +0#0000000&|b+0#00e0003&|y|t|e|[+0#0000000&|]|{|}|)|;| |}| @28 |++0#0000e05#a8a8a8255| |+|-@1| @1|8| |l|i|n|e|s|:| |{|-@57 -| @1| +0#0000000#ffffff0@72 +| @1|/+0&#ffffff0|*|\@2|*|/| +0#0000000&|{| @63 +|++0#0000e05#a8a8a8255| |+|-@1| @1|5| |l|i|n|e|s|:| |(|n|e|w| |j|a|v|a|.|u|t|i|l|.|f|u|n|c|t|i|o|n|.|F|u|n|c|t|i|o|n|<|O|b|j|e|c|t|,| |O|b|j|e|c|t|>|(|)| |{|-@6 +|+| |+|-@1| @1|5| |l|i|n|e|s|:| |(|n|e|w| |j|a|v|a|.|u|t|i|l|.|f|u|n|c|t|i|o|n|.|F|u|n|c|t|i|o|n|<|O|b|j|e|c|t|,| |O|b|j|e|c|t|>|(|)| |{|-@6 +| @1| +0#0000000#ffffff0@3|}| @67 +| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@72 |++0#0000e05#a8a8a8255| |+|-@1| @1|3| |l|i|n|e|s|:| @2|*| |N|o| |o|p|e|r|a|t|i|o|n|.|-@41 | @1| +0#0000000#ffffff0@3|v+0#00e0003&|o|i|d| +0#0000000&|n|o|O|p|1|(|)| |{| |}| @52 -| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@3|/+0#0000e05&|*@1| +0#e000e06&|N|o| |o|p|e|r|a|t|i|o|n|.| +0#0000e05&|*|/| +0#0000000&@48 -| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@3|v+0#00e0003&|o|i|d| +0#0000000&|n|o|O|p|2|(|)| @56 -|++0#0000e05#a8a8a8255| |+|-@1| @1|2| |l|i|n|e|s|:| |{|-@57 -| @1| +0#0000000#ffffff0@3|/+0#0000e05&|*@1| +0#e000e06&|N|o| |o|p|e|r|a|t|i|o|n|.| +0#0000e05&|*|/| +0#0000000&@48 @57|1|9|,|1| @9|T|o|p|
--- a/runtime/syntax/testdir/dumps/java_enfoldment_02.dump +++ b/runtime/syntax/testdir/dumps/java_enfoldment_02.dump @@ -5,16 +5,16 @@ | @1| +0#0000000#ffffff0@72 |++0#0000e05#a8a8a8255| >+|-@1| |1|9| |l|i|n|e|s|:| |s|t|a|t|i|c| |{|-@50 | @1| +0#0000000#ffffff0@72 -| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@3|{| |O|b|j|e|c|t| |b@1| |=| |(@1|O|b|j|e|c|t|)| |n+0#af5f00255&|e|w| +0#0000000&|b+0#00e0003&|y|t|e|[+0#0000000&|]|{+0#ffffff16#ff404010|}|)+0#0000000#ffffff0|;| |}| @28 +| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@3|{| |O|b|j|e|c|t| |b@1| |=| |(@1|O|b|j|e|c|t|)| |n+0#af5f00255&|e|w| +0#0000000&|b+0#00e0003&|y|t|e|[+0#0000000&|]|{|}|)|;| |}| @28 |++0#0000e05#a8a8a8255| |+|-@1| @1|8| |l|i|n|e|s|:| |{|-@57 -| @1| +0#0000000#ffffff0@72 +| @1|/+0&#ffffff0|*|\@2|*|/| +0#0000000&|{| @63 +|++0#0000e05#a8a8a8255| |+|-@1| @1|5| |l|i|n|e|s|:| |(|n|e|w| |j|a|v|a|.|u|t|i|l|.|f|u|n|c|t|i|o|n|.|F|u|n|c|t|i|o|n|<|O|b|j|e|c|t|,| |O|b|j|e|c|t|>|(|)| |{|-@6 +|+| |+|-@1| @1|5| |l|i|n|e|s|:| |(|n|e|w| |j|a|v|a|.|u|t|i|l|.|f|u|n|c|t|i|o|n|.|F|u|n|c|t|i|o|n|<|O|b|j|e|c|t|,| |O|b|j|e|c|t|>|(|)| |{|-@6 +| @1| +0#0000000#ffffff0@3|}| @67 +| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@72 |++0#0000e05#a8a8a8255| |+|-@1| @1|3| |l|i|n|e|s|:| @2|*| |N|o| |o|p|e|r|a|t|i|o|n|.|-@41 | @1| +0#0000000#ffffff0@3|v+0#00e0003&|o|i|d| +0#0000000&|n|o|O|p|1|(|)| |{| |}| @52 | +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@3|/+0#0000e05&|*@1| +0#e000e06&|N|o| |o|p|e|r|a|t|i|o|n|.| +0#0000e05&|*|/| +0#0000000&@48 | +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@3|v+0#00e0003&|o|i|d| +0#0000000&|n|o|O|p|2|(|)| @56 |++0#0000e05#a8a8a8255| |+|-@1| @1|2| |l|i|n|e|s|:| |{|-@57 -| @1| +0#0000000#ffffff0@3|/+0#0000e05&|*@1| +0#e000e06&|N|o| |o|p|e|r|a|t|i|o|n|.| +0#0000e05&|*|/| +0#0000000&@48 -|++0#0000e05#a8a8a8255| |+|-@1| @1|2| |l|i|n|e|s|:| |v|o|i|d| |n|o|O|p|3|(|)| |{|-@44 -| @1| +0#0000000#ffffff0@3|/+0#0000e05&|*@1| +0#e000e06&|N|o| |o|p|e|r|a|t|i|o|n|.| +0#0000e05&|*|/| +0#0000000&@48 -|++0#0000e05#a8a8a8255| |+|-@1| @1|2| |l|i|n|e|s|:| |v|o|i|d| |n|o|O|p|4|(|)| |{|-@44 -| +0#0000000#ffffff0@56|3|7|,|4|-|1| @7|1|4|%| +| +0#0000000#ffffff0@56|3|7|,|4|-|1| @7|1@1|%|
--- a/runtime/syntax/testdir/dumps/java_enfoldment_03.dump +++ b/runtime/syntax/testdir/dumps/java_enfoldment_03.dump @@ -1,9 +1,13 @@ |++0#0000e05#a8a8a8255| |+|-@1| |1|9| |l|i|n|e|s|:| |s|t|a|t|i|c| |{|-@50 | @1| +0#0000000#ffffff0@72 -| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@3|{| |O|b|j|e|c|t| |b@1| |=| |(@1|O|b|j|e|c|t|)| |n+0#af5f00255&|e|w| +0#0000000&|b+0#00e0003&|y|t|e|[+0#0000000&|]|{+0#ffffff16#ff404010|}|)+0#0000000#ffffff0|;| |}| @28 +| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@3|{| |O|b|j|e|c|t| |b@1| |=| |(@1|O|b|j|e|c|t|)| |n+0#af5f00255&|e|w| +0#0000000&|b+0#00e0003&|y|t|e|[+0#0000000&|]|{|}|)|;| |}| @28 |++0#0000e05#a8a8a8255| |+|-@1| @1|8| |l|i|n|e|s|:| |{|-@57 -| @1| +0#0000000#ffffff0@72 -|++0#0000e05#a8a8a8255| >+|-@1| @1|3| |l|i|n|e|s|:| @2|*| |N|o| |o|p|e|r|a|t|i|o|n|.|-@41 +| @1|/+0&#ffffff0|*|\@2|*|/| +0#0000000&|{| @63 +|++0#0000e05#a8a8a8255| >+|-@1| @1|5| |l|i|n|e|s|:| |(|n|e|w| |j|a|v|a|.|u|t|i|l|.|f|u|n|c|t|i|o|n|.|F|u|n|c|t|i|o|n|<|O|b|j|e|c|t|,| |O|b|j|e|c|t|>|(|)| |{|-@6 +|+| |+|-@1| @1|5| |l|i|n|e|s|:| |(|n|e|w| |j|a|v|a|.|u|t|i|l|.|f|u|n|c|t|i|o|n|.|F|u|n|c|t|i|o|n|<|O|b|j|e|c|t|,| |O|b|j|e|c|t|>|(|)| |{|-@6 +| @1| +0#0000000#ffffff0@3|}| @67 +| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@72 +|++0#0000e05#a8a8a8255| |+|-@1| @1|3| |l|i|n|e|s|:| @2|*| |N|o| |o|p|e|r|a|t|i|o|n|.|-@41 | @1| +0#0000000#ffffff0@3|v+0#00e0003&|o|i|d| +0#0000000&|n|o|O|p|1|(|)| |{| |}| @52 | +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@3|/+0#0000e05&|*@1| +0#e000e06&|N|o| |o|p|e|r|a|t|i|o|n|.| +0#0000e05&|*|/| +0#0000000&@48 | +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@3|v+0#00e0003&|o|i|d| +0#0000000&|n|o|O|p|2|(|)| @56 @@ -13,8 +17,4 @@ | @1| +0#0000000#ffffff0@3|/+0#0000e05&|*@1| +0#e000e06&|N|o| |o|p|e|r|a|t|i|o|n|.| +0#0000e05&|*|/| +0#0000000&@48 |++0#0000e05#a8a8a8255| |+|-@1| @1|2| |l|i|n|e|s|:| |v|o|i|d| |n|o|O|p|4|(|)| |{|-@44 | @1|}+0#0000000#ffffff0| @71 -| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@72 -|++0#0000e05#a8a8a8255| |+|-@1| @1|5| |l|i|n|e|s|:| @1|*| |S|o|m|e| |n|o|t|e|.|-@45 -|+| |+|-@1| @1|5| |l|i|n|e|s|:| @1|*| |A| |s|u|m@1|a|r|y|.|-@45 -| @1|/+0&#ffffff0@1| +0#0000000&@70 -@57|5@1|,|2|-|1| @7|8|2|%| +@57|5@1|,|3|-|1| @7|5|8|%|
--- a/runtime/syntax/testdir/dumps/java_enfoldment_04.dump +++ b/runtime/syntax/testdir/dumps/java_enfoldment_04.dump @@ -1,20 +1,20 @@ +| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@72 +|++0#0000e05#a8a8a8255| |+|-@1| @1|3| |l|i|n|e|s|:| @2|*| |N|o| |o|p|e|r|a|t|i|o|n|.|-@41 +| @1| +0#0000000#ffffff0@3|v+0#00e0003&|o|i|d| +0#0000000&|n|o|O|p|1|(|)| |{| |}| @52 +| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@3|/+0#0000e05&|*@1| +0#e000e06&|N|o| |o|p|e|r|a|t|i|o|n|.| +0#0000e05&|*|/| +0#0000000&@48 +| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@3|v+0#00e0003&|o|i|d| +0#0000000&|n|o|O|p|2|(|)| @56 +|++0#0000e05#a8a8a8255| >+|-@1| @1|2| |l|i|n|e|s|:| |{|-@57 +| @1| +0#0000000#ffffff0@3|/+0#0000e05&|*@1| +0#e000e06&|N|o| |o|p|e|r|a|t|i|o|n|.| +0#0000e05&|*|/| +0#0000000&@48 |++0#0000e05#a8a8a8255| |+|-@1| @1|2| |l|i|n|e|s|:| |v|o|i|d| |n|o|O|p|3|(|)| |{|-@44 | @1| +0#0000000#ffffff0@3|/+0#0000e05&|*@1| +0#e000e06&|N|o| |o|p|e|r|a|t|i|o|n|.| +0#0000e05&|*|/| +0#0000000&@48 |++0#0000e05#a8a8a8255| |+|-@1| @1|2| |l|i|n|e|s|:| |v|o|i|d| |n|o|O|p|4|(|)| |{|-@44 | @1|}+0#0000000#ffffff0| @71 | +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@72 -|++0#0000e05#a8a8a8255| >+|-@1| @1|5| |l|i|n|e|s|:| @1|*| |S|o|m|e| |n|o|t|e|.|-@45 +|++0#0000e05#a8a8a8255| |+|-@1| @1|5| |l|i|n|e|s|:| @1|*| |S|o|m|e| |n|o|t|e|.|-@45 |+| |+|-@1| @1|5| |l|i|n|e|s|:| @1|*| |A| |s|u|m@1|a|r|y|.|-@45 | @1|/+0&#ffffff0@1| +0#0000000&@70 | +0#0000e05#a8a8a8255@1|/+0&#ffffff0@1| |{| +0#0000000&@68 | +0#0000e05#a8a8a8255@1|/+0&#ffffff0@1| |}| +0#0000000&@68 | +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@72 |++0#0000e05#a8a8a8255| |+|-@1| @1|2| |l|i|n|e|s|:| |1|2@1|||.@54 -|~+0#4040ff13#ffffff0| @73 -|~| @73 -|~| @73 -|~| @73 -|~| @73 -|~| @73 -|~| @73 -| +0#0000000&@56|7|3|,|2|-|1| @7|B|o|t| +| +0#0000000#ffffff0@56|7|3|,|2|-|1| @7|B|o|t|
new file mode 100644 --- /dev/null +++ b/runtime/syntax/testdir/dumps/java_enfoldment_05.dump @@ -0,0 +1,20 @@ +| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@3|/+0#0000e05&|*@1| +0#e000e06&|N|o| |o|p|e|r|a|t|i|o|n|.| +0#0000e05&|*|/| +0#0000000&@48 +|++0#0000e05#a8a8a8255| |+|-@1| @1|2| |l|i|n|e|s|:| |v|o|i|d| |n|o|O|p|4|(|)| |{|-@44 +| @1|}+0#0000000#ffffff0| @71 +| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@72 +|++0#0000e05#a8a8a8255| |+|-@1| @1|5| |l|i|n|e|s|:| @1|*| |S|o|m|e| |n|o|t|e|.|-@45 +|+| >+|-@1| @1|5| |l|i|n|e|s|:| @1|*| |A| |s|u|m@1|a|r|y|.|-@45 +| @1|/+0&#ffffff0@1| +0#0000000&@70 +| +0#0000e05#a8a8a8255@1|/+0&#ffffff0@1| |{| +0#0000000&@68 +| +0#0000e05#a8a8a8255@1|/+0&#ffffff0@1| |}| +0#0000000&@68 +| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@72 +|++0#0000e05#a8a8a8255| |+|-@1| @1|2| |l|i|n|e|s|:| |1|2@1|||.@54 +|~+0#4040ff13#ffffff0| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +| +0#0000000&@56|9|1|,|2|-|1| @7|B|o|t|
--- a/runtime/syntax/testdir/dumps/java_enfoldment_99.dump +++ b/runtime/syntax/testdir/dumps/java_enfoldment_99.dump @@ -17,4 +17,4 @@ | +0#0000e05#a8a8a8255@1|/+0&#ffffff0@1| |}| +0#0000000&@68 | +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@72 |++0#0000e05#a8a8a8255| >+|-@1| @1|2| |l|i|n|e|s|:| |1|2@1|||.@54 -| +0#0000000#ffffff0@56|8|6|,|1| @9|B|o|t| +| +0#0000000#ffffff0@56|9|8|,|1| @9|B|o|t|
--- a/runtime/syntax/testdir/dumps/java_unfoldment_01.dump +++ b/runtime/syntax/testdir/dumps/java_unfoldment_01.dump @@ -17,4 +17,4 @@ @24|n+0#af5f00255&|e|w| +0#0000000&|O|b|j|e|c|t|(|)| |{@2|}@2|;| @30 @20|}@2|;| @50 @16|}| @57 -@57|1|9|,|1| @9|1|9|%| +@57|1|9|,|1| @9|1|6|%|
--- a/runtime/syntax/testdir/dumps/java_unfoldment_02.dump +++ b/runtime/syntax/testdir/dumps/java_unfoldment_02.dump @@ -17,4 +17,4 @@ @8|d+0#af5f00255&|o| +0#0000000&|{| @62 @12|i+0#af5f00255&|f| +0#0000000&|(|t+0#e000002&|r|u|e|)+0#0000000&| @53 @16|b+0#af5f00255&|r|e|a|k| +0#0000000&|o+0#af5f00255&|u|t|;+0#0000000&| @48 -@57|3|7|,|4|-|1|3| @6|4|6|%| +@57|3|7|,|4|-|1|3| @6|3|9|%|
--- a/runtime/syntax/testdir/dumps/java_unfoldment_03.dump +++ b/runtime/syntax/testdir/dumps/java_unfoldment_03.dump @@ -2,19 +2,19 @@ @8|}| |w+0#af5f00255&|h|i|l|e| +0#0000000&|(|f+0#e000002&|a|l|s|e|)+0#0000000&|;| @50 |}| @73 @4|}| @69 +|/+0#0000e05&|*|\@2|*|/| +0#0000000&|{| @65 +@8>(|n+0#af5f00255&|e|w| +0#0000000&|j|a|v|a|.|u|t|i|l|.|f|u|n|c|t|i|o|n|.|F|u|n|c|t|i|o|n|<|O|b|j|e|c|t|,| |O|b|j|e|c|t|>|(|)| |{+0#ffffff16#ff404010| +0#0000000#ffffff0@14 +@12|/+0#0000e05&|*@1| +0#0000000&@59 +| +0#0000e05&@12|*| +0#e000e06&|{|@|i|n|h|e|r|i|t|D|o|c|}| |*+0#0000e05&|/| +0#0000000&@43 +@12|p+0#00e0003&|u|b|l|i|c| +0#0000000&|O|b|j|e|c|t| |a|p@1|l|y|(|O|b|j|e|c|t| |o|)| |{+0#ffffff16#ff404010| +0#0000000#ffffff0|r+0#af5f00255&|e|t|u|r|n| +0#0000000&|o|;| |}+0#ffffff16#ff404010|;+0#0000000#ffffff0| @18 +@8|}+0#ffffff16#ff404010|)+0#0000000#ffffff0|.|a|p@1|l|y|(| @57 +@8|(|n+0#af5f00255&|e|w| +0#0000000&|j|a|v|a|.|u|t|i|l|.|f|u|n|c|t|i|o|n|.|F|u|n|c|t|i|o|n|<|O|b|j|e|c|t|,| |O|b|j|e|c|t|>|(|)| |{+0#ffffff16#ff404010| +0#0000000#ffffff0@14 +@12|/+0#0000e05&|*@1| +0#e000e06&|{|@|i|n|h|e|r|i|t|D|o|c|}| +0#0000000&@45 +| +0#e000e06&@12|*+0#0000e05&|/| +0#0000000&@59 +@12|p+0#00e0003&|u|b|l|i|c| +0#0000000&|O|b|j|e|c|t| |a|p@1|l|y|(|O|b|j|e|c|t| |o|)| |{+0#ffffff16#ff404010| +0#0000000#ffffff0|r+0#af5f00255&|e|t|u|r|n| +0#0000000&|o|;| |}+0#ffffff16#ff404010|;+0#0000000#ffffff0| @18 +@8|}+0#ffffff16#ff404010|)+0#0000000#ffffff0@1|;| @62 +@4|}| @69 @75 -@4>/+0#0000e05&|*@1| +0#0000000&@67 +@4|/+0#0000e05&|*@1| +0#0000000&@67 | +0#0000e05&@4|*| +0#e000e06&|N|o| |o|p|e|r|a|t|i|o|n|.| +0#0000000&@54 -| +0#0000e05&@4|*|/| +0#0000000&@67 -@4|v+0#00e0003&|o|i|d| +0#0000000&|n|o|O|p|1|(|)| |{| |}| @54 -@4|/+0#0000e05&|*@1| +0#e000e06&|N|o| |o|p|e|r|a|t|i|o|n|.| +0#0000e05&|*|/| +0#0000000&@50 -@4|v+0#00e0003&|o|i|d| +0#0000000&|n|o|O|p|2|(|)| @58 -@4|{| @69 -@4|}| @69 -@4|/+0#0000e05&|*@1| +0#e000e06&|N|o| |o|p|e|r|a|t|i|o|n|.| +0#0000e05&|*|/| +0#0000000&@50 -@4|v+0#00e0003&|o|i|d| +0#0000000&|n|o|O|p|3|(|)| |{| @56 -@4|}| @69 -@4|/+0#0000e05&|*@1| +0#e000e06&|N|o| |o|p|e|r|a|t|i|o|n|.| +0#0000e05&|*|/| +0#0000000&@50 -@4|v+0#00e0003&|o|i|d| +0#0000000&|n|o|O|p|4|(|)| |{| @56 -@4|/+0#0000e05&|*|/|\|/|\|/|\|*|/| +0#0000000&|;| |}| @56 -@57|5@1|,|2|-|5| @7|7|3|%| +@57|5@1|,|3|-|9| @7|6|2|%|
--- a/runtime/syntax/testdir/dumps/java_unfoldment_04.dump +++ b/runtime/syntax/testdir/dumps/java_unfoldment_04.dump @@ -1,20 +1,20 @@ -| +0&#ffffff0@3|/+0#0000e05&|*|/|\|/|\|/|\|*|/| +0#0000000&|;| |}| @56 +| +0#0000e05#ffffff0@4|*| +0#e000e06&|N|o| |o|p|e|r|a|t|i|o|n|.| +0#0000000&@54 +| +0#0000e05&@4|*|/| +0#0000000&@67 +@4|v+0#00e0003&|o|i|d| +0#0000000&|n|o|O|p|1|(|)| |{| |}| @54 +@4|/+0#0000e05&|*@1| +0#e000e06&|N|o| |o|p|e|r|a|t|i|o|n|.| +0#0000e05&|*|/| +0#0000000&@50 +@4|v+0#00e0003&|o|i|d| +0#0000000&|n|o|O|p|2|(|)| @58 +@4>{| @69 +@4|}| @69 +@4|/+0#0000e05&|*@1| +0#e000e06&|N|o| |o|p|e|r|a|t|i|o|n|.| +0#0000e05&|*|/| +0#0000000&@50 +@4|v+0#00e0003&|o|i|d| +0#0000000&|n|o|O|p|3|(|)| |{| @56 +@4|}| @69 +@4|/+0#0000e05&|*@1| +0#e000e06&|N|o| |o|p|e|r|a|t|i|o|n|.| +0#0000e05&|*|/| +0#0000000&@50 +@4|v+0#00e0003&|o|i|d| +0#0000000&|n|o|O|p|4|(|)| |{| @56 +@4|/+0#0000e05&|*|/|\|/|\|/|\|*|/| +0#0000000&|;| |}| @56 |}| @73 @75 |/+0#0000e05&|*| +0#0000000&@72 | +0#0000e05&|*| |S|o|m|e| |n|o|t|e|.| +0#0000000&@61 -| +0#0000e05&>*| |{| +0#0000000&@70 -| +0#0000e05&|*| |}| +0#0000000&@70 -| +0#0000e05&|*|/| +0#0000000&@71 -|/+0#0000e05&|*@1| +0#0000000&@71 -| +0#0000e05&|*| +0#e000e06&|A| |s|u|m@1|a|r|y|.| +0#0000000&@61 | +0#0000e05&|*| |{| +0#0000000&@70 | +0#0000e05&|*| |}| +0#0000000&@70 -| +0#0000e05&|*|/| +0#0000000&@71 -|/+0#0000e05&@1| +0#0000000&@72 -|/+0#0000e05&@1| |{| +0#0000000&@70 -|/+0#0000e05&@1| |}| +0#0000000&@70 -@75 -|/+0#0000e05&|*| |1|2@1|||.@67 -@20|*|/| +0#0000000&|i+0#00e0003&|n|t|e|r|f|a|c|e| +0#0000000&|U|n|f|o|l|d|e|n|a|b|l|e| |{| @27 -@57|7|3|,|2| @9|9|8|%| +@57|7|3|,|2|-|5| @7|8|4|%|
new file mode 100644 --- /dev/null +++ b/runtime/syntax/testdir/dumps/java_unfoldment_05.dump @@ -0,0 +1,20 @@ +| +0#0000e05#ffffff0|*| |}| +0#0000000&@70 +| +0#0000e05&|*|/| +0#0000000&@71 +|/+0#0000e05&|*@1| +0#0000000&@71 +| +0#0000e05&|*| +0#e000e06&|A| |s|u|m@1|a|r|y|.| +0#0000000&@61 +| +0#0000e05&|*| |{| +0#0000000&@70 +| +0#0000e05&>*| |}| +0#0000000&@70 +| +0#0000e05&|*|/| +0#0000000&@71 +|/+0#0000e05&@1| +0#0000000&@72 +|/+0#0000e05&@1| |{| +0#0000000&@70 +|/+0#0000e05&@1| |}| +0#0000000&@70 +@75 +|/+0#0000e05&|*| |1|2@1|||.@67 +@20|*|/| +0#0000000&|i+0#00e0003&|n|t|e|r|f|a|c|e| +0#0000000&|U|n|f|o|l|d|e|n|a|b|l|e| |{| @27 +|}| @73 +|~+0#4040ff13&| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +| +0#0000000&@56|9|1|,|2| @9|B|o|t|
--- a/runtime/syntax/testdir/dumps/java_unfoldment_99.dump +++ b/runtime/syntax/testdir/dumps/java_unfoldment_99.dump @@ -17,4 +17,4 @@ |/+0#0000e05&|*| |1|2@1|||.@67 @20|*|/| +0#0000000&|i+0#00e0003&|n|t|e|r|f|a|c|e| +0#0000000&|U|n|f|o|l|d|e|n|a|b|l|e| |{| @27 >}| @73 -@57|8|6|,|1| @9|B|o|t| +@57|9|8|,|1| @9|B|o|t|
--- a/runtime/syntax/testdir/input/java_enfoldment.java +++ b/runtime/syntax/testdir/input/java_enfoldment.java @@ -1,5 +1,5 @@ // VIM_TEST_SETUP setlocal foldenable foldcolumn=2 foldmethod=syntax -// VIM_TEST_SETUP let g:java_mark_braces_in_parens_as_errors = 1 + @SuppressWarnings({ """ @@ -51,6 +51,18 @@ out: { } while (false); } } +/*\\\*/ { + (new java.util.function.Function<Object, Object>() { + /** + * {@inheritDoc} */ + public Object apply(Object o) { return o; }; + }).apply( + (new java.util.function.Function<Object, Object>() { + /** {@inheritDoc} + */ + public Object apply(Object o) { return o; }; + })); + } /** * No operation.
--- a/runtime/syntax/testdir/input/java_unfoldment.java +++ b/runtime/syntax/testdir/input/java_unfoldment.java @@ -51,6 +51,18 @@ out: { } while (false); } } +/*\\\*/ { + (new java.util.function.Function<Object, Object>() { + /** + * {@inheritDoc} */ + public Object apply(Object o) { return o; }; + }).apply( + (new java.util.function.Function<Object, Object>() { + /** {@inheritDoc} + */ + public Object apply(Object o) { return o; }; + })); + } /** * No operation.