diff options
author | Aliaksei Budavei <32549825+zzzyxwvut@users.noreply.github.com> | 2024-06-16 09:42:55 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-16 08:42:55 +0200 |
commit | 371bab05947b32f26d1b32922e5dc38343a875bc (patch) | |
tree | 88b6d95b94f7a004c4075dfeeebd146882ec249a /runtime/syntax | |
parent | f127dce1889a80280c16ef1163307f4086434182 (diff) |
runtime(java): Fold multi-line comments with the syntax kind of &fdm (#15016)
Also:
- Restore the capability to mark as an error braces nested
in parens with g:javaInParen.
- Try not to fold top-level-type bodies. (Defining multiple
package-private top level types in a single source file is
not recommended as it can impose order among compilation
units; so it is assumed that only one such top level type
is usually defined.)
- Compose ‘method header’ highlighting and block braces
folding.
- Do not highlight block braces whenever ‘method header’
highlighting is requested.
This bundling of ‘method headers’ and block braces for
highlighting can be traced back to Vim v5.0; however, no
comment or documentation entry conveys any justification.
For example, it is hard to discover the connection between
block braces for "while", "if", etc., statements and method
body block braces. The former behaviour can be attained in,
e.g. ~/.vim/after/syntax/java.vim:
------------------------------------------------------------
if exists("g:java_highlight_functions")
syn clear javaBlock javaInParen
syn match javaBlockOther "[{}]"
syn region javaBlock transparent matchgroup=javaBlockStart
\ start="\%(^\|^\S[^:]\+\)\@120<!{" end="}" fold
hi def link javaBlockStart javaFuncDef
hi def link javaBlockOther javaBlockStart
if exists("g:java_mark_braces_in_parens_as_errors")
syn match javaInParen contained "[{}]"
endif
endif
------------------------------------------------------------
Note: Read ‘a method header omitting a _throws_ clause’ for
every ‘method header’ appellation used above.
Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Diffstat (limited to 'runtime/syntax')
53 files changed, 685 insertions, 245 deletions
diff --git a/runtime/syntax/java.vim b/runtime/syntax/java.vim index 1f71f9e4ee..6f64bdc4ed 100644 --- 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 10 +" Last Change: 2024 Jun 15 " Please check :help java.vim for comments on some of the options available. @@ -14,7 +14,6 @@ if !exists("main_syntax") endif " we define it here so that included files can test for it let main_syntax='java' - syn region javaFold start="{" end="}" transparent fold endif let s:cpo_save = &cpo @@ -40,6 +39,18 @@ else endfunction endif +function! JavaSyntaxFoldTextExpr() abort + return getline(v:foldstart) !~ '/\*\+\s*$' + \ ? foldtext() + \ : printf('+-%s%3d lines: ', + \ v:folddashes, + \ (v:foldend - v:foldstart + 1)) . + \ getline(v:foldstart + 1) +endfunction + +" E120 for "fdt=s:JavaSyntaxFoldTextExpr()" before v8.2.3900. +setlocal foldtext=JavaSyntaxFoldTextExpr() + " Admit the ASCII dollar sign to keyword characters (JLS-17, §3.8): try exec 'syntax iskeyword ' . &l:iskeyword . ',$' @@ -99,7 +110,7 @@ syn match javaClassDecl "\<record\>\%(\s*(\)\@!" syn match javaClassDecl "^class\>" syn match javaClassDecl "[^.]\s*\<class\>"ms=s+1 syn match javaAnnotation "@\%(\K\k*\.\)*\K\k*\>" -syn region javaAnnotation transparent matchgroup=javaAnnotationStart start=/@\%(\K\k*\.\)*\K\k*(/ end=/)/ skip=/\/\*.\{-}\*\/\|\/\/.*$/ contains=javaAnnotation,javaParenT,javaBraces,javaString,javaBoolean,javaNumber,javaTypedef,javaComment,javaLineComment +syn region javaAnnotation transparent matchgroup=javaAnnotationStart start=/@\%(\K\k*\.\)*\K\k*(/ end=/)/ skip=/\/\*.\{-}\*\/\|\/\/.*$/ contains=javaAnnotation,javaParenT,javaBlock,javaString,javaBoolean,javaNumber,javaTypedef,javaComment,javaLineComment syn match javaClassDecl "@interface\>" syn keyword javaBranch break continue nextgroup=javaUserLabelRef skipwhite syn match javaUserLabelRef "\k\+" contained @@ -238,7 +249,7 @@ if exists("java_comment_strings") syn cluster javaCommentSpecial2 add=javaComment2String,javaCommentCharacter,javaNumber,javaStrTempl endif -syn region javaComment matchgroup=javaCommentStart start="/\*" end="\*/" contains=@javaCommentSpecial,javaTodo,javaCommentError,javaSpaceError,@Spell +syn region javaComment matchgroup=javaCommentStart start="/\*" end="\*/" contains=@javaCommentSpecial,javaTodo,javaCommentError,javaSpaceError,@Spell fold syn match javaCommentStar contained "^\s*\*[^/]"me=e-1 syn match javaCommentStar contained "^\s*\*$" syn match javaLineComment "//.*" contains=@javaCommentSpecial2,javaTodo,javaCommentMarkupTag,javaSpaceError,@Spell @@ -269,7 +280,7 @@ if !exists("java_ignore_javadoc") && main_syntax != 'jsp' call s:ReportOnce(v:exception) endtry - syn region javaDocComment start="/\*\*" end="\*/" keepend contains=javaCommentTitle,@javaHtml,javaDocTags,javaDocSeeTag,javaDocCodeTag,javaDocSnippetTag,javaTodo,javaCommentError,javaSpaceError,@Spell + syn region javaDocComment start="/\*\*" end="\*/" keepend contains=javaCommentTitle,@javaHtml,javaDocTags,javaDocSeeTag,javaDocCodeTag,javaDocSnippetTag,javaTodo,javaCommentError,javaSpaceError,@Spell fold exec 'syn region javaCommentTitle contained matchgroup=javaDocComment start="/\*\*" matchgroup=javaCommentTitle end="\.$" end="\.[ \t\r]\@=" end="\%(^\s*\**\s*\)\@' . s:ff.Peek('80', '') . '<=@"me=s-2,he=s-1 end="\*/"me=s-1,he=s-1 contains=@javaHtml,javaCommentStar,javaTodo,javaCommentError,javaSpaceError,@Spell,javaDocTags,javaDocSeeTag,javaDocCodeTag,javaDocSnippetTag' syn region javaCommentTitle contained matchgroup=javaDocComment start="/\*\*\s*\r\=\n\=\s*\**\s*\%({@return\>\)\@=" matchgroup=javaCommentTitle end="}\%(\s*\.*\)*" contains=@javaHtml,javaCommentStar,javaTodo,javaCommentError,javaSpaceError,@Spell,javaDocTags,javaDocSeeTag,javaDocCodeTag,javaDocSnippetTag syn region javaDocTags contained start="{@\%(li\%(teral\|nk\%(plain\)\=\)\|inherit[Dd]oc\|doc[rR]oot\|value\)\>" end="}" @@ -348,8 +359,6 @@ if exists("java_highlight_functions") " Match: [@ɐ] [abstract] [<α, β>] Τʬ[<γ>][[][]] μʭʭ(/* ... */); exec 'syn region javaFuncDef start=/' . s:ff.Engine('\%#=2', '') . '^\s\+\%(\%(@\%(\K\k*\.\)*\K\k*\>\)\s\+\)*\%(p\%(ublic\|rotected\|rivate\)\s\+\)\=\%(\%(abstract\|default\)\s\+\|\%(\%(final\|\%(native\|strictfp\)\|s\%(tatic\|ynchronized\)\)\s\+\)*\)\=\%(<.*[[:space:]-]\@' . s:ff.Peek('1', '') . '<!>\s\+\)\=\%(void\|\%(b\%(oolean\|yte\)\|char\|short\|int\|long\|float\|double\|\%(\<\K\k*\>\.\)*\<' . s:ff.UpperCase('[$_[:upper:]]', '[^a-z0-9]') . '\k*\>\%(<[^(){}]*[[:space:]-]\@' . s:ff.Peek('1', '') . '<!>\)\=\)\%(\[\]\)*\)\s\+\<' . s:ff.LowerCase('[$_[:lower:]]', '[^A-Z0-9]') . '\k*\>\s*(/ end=/)/ skip=/\/\*.\{-}\*\/\|\/\/.*$/ contains=@javaFuncParams' endif - - syn match javaBraces "[{}]" endif if exists("java_highlight_debug") @@ -404,14 +413,18 @@ if exists("java_highlight_debug") endif if exists("java_mark_braces_in_parens_as_errors") - syn match javaInParen contained "[{}]" - hi def link javaInParen javaError + 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,javaParenT1 -syn region javaParenT1 transparent matchgroup=javaParen1 start="(" end=")" contains=@javaTop,javaParenT2 contained -syn region javaParenT2 transparent matchgroup=javaParen2 start="(" end=")" contains=@javaTop,javaParenT contained +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 +syn region javaParenT2 transparent matchgroup=javaParen2 start="(" end=")" contains=@javaTop,javaInParen,javaParenT contained syn match javaParenError ")" " catch errors caused by wrong square parenthesis syn region javaParenT transparent matchgroup=javaParen start="\[" end="\]" contains=@javaTop,javaParenT1 @@ -445,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,javaFold,javaParenError,javaParenT +syn cluster javaTop contains=TOP,javaDocComment,javaBlock,javaParenError,javaParenT if !exists("java_minlines") let java_minlines = 10 @@ -463,7 +476,6 @@ exec "syn sync ccomment javaComment minlines=" . java_minlines hi def link javaLambdaDef Function hi def link javaFuncDef Function hi def link javaVarArg Function -hi def link javaBraces Function hi def link javaBranch Conditional hi def link javaUserLabelRef javaUserLabel hi def link javaLabel Label @@ -533,4 +545,20 @@ let b:spell_options = "contained" let &cpo = s:cpo_save unlet s:module_info_cur_buf s:ff s:cpo_save +" See ":help vim9-mix". +if !has("vim9script") + finish +endif + +def! s:JavaSyntaxFoldTextExpr(): string + return getline(v:foldstart) !~ '/\*\+\s*$' + ? foldtext() + : printf('+-%s%3d lines: ', + v:folddashes, + (v:foldend - v:foldstart + 1)) .. + getline(v:foldstart + 1) +enddef + +setlocal foldtext=s:JavaSyntaxFoldTextExpr() +delfunction! g:JavaSyntaxFoldTextExpr " vim: sw=2 ts=8 noet sta diff --git a/runtime/syntax/testdir/dumps/java_annotations_00.dump b/runtime/syntax/testdir/dumps/java_annotations_00.dump index d9139c804f..cb77259f49 100644 --- a/runtime/syntax/testdir/dumps/java_annotations_00.dump +++ b/runtime/syntax/testdir/dumps/java_annotations_00.dump @@ -5,16 +5,16 @@ |i+0#e000e06&|m|p|o|r|t| +0#0000000&|j|a|v|a|.|l|a|n|g|.|a|n@1|o|t|a|t|i|o|n|.|T|a|r|g|e|t|;| @39 @75 |c+0#00e0003&|l|a|s@1| +0#0000000&|A|n@1|o|t|a|t|i|o|n|s|T|e|s|t|s| @52 -|{+0#00e0e07&| +0#0000000&@73 +|{| @73 @4|@+0#e000e06&|T|a|r|g|e|t|(|E+0#0000000&|l|e|m|e|n|t|T|y|p|e|.|T|Y|P|E|_|U|S|E|)+0#e000e06&| +0#0000000&@41 @4|@+0#00e0003&|i|n|t|e|r|f|a|c|e| +0#0000000&|T|a|g| @56 -@4|{+0#00e0e07&| +0#0000000&@69 +@4|{| @69 | +0#00e0e07&@7|S|t|r|i|n|g| |v|a|l|u|e|(|)| +0#0000000&|d+0#4040ff13&|e|f|a|u|l|t| +0#0000000&|"+0#e000002&@1|;+0#0000000&| @40 | +0#00e0e07&@7|S|t|r|i|n|g| |k|i|n|d|(|)| +0#0000000&|d+0#4040ff13&|e|f|a|u|l|t| +0#0000000&|"+0#e000002&@1|;+0#0000000&| @41 -@4|}+0#00e0e07&| +0#0000000&@69 +@4|}| @69 @75 @4|@+0#e000e06&|T|a|r|g|e|t|(|E+0#0000000&|l|e|m|e|n|t|T|y|p|e|.|T|Y|P|E|_|U|S|E|)+0#e000e06&| +0#0000000&@41 @4|@+0#00e0003&|i|n|t|e|r|f|a|c|e| +0#0000000&|T|e|x|t| @55 -@4|{+0#00e0e07&| +0#0000000&@69 -| +0#00e0e07&@7|S|t|r|i|n|g|[|]| |v|a|l|u|e|(|)| +0#0000000&|d+0#4040ff13&|e|f|a|u|l|t| +0#0000000&|{+0#00e0e07&|"+0#e000002&@1|}+0#00e0e07&|;+0#0000000&| @36 +@4|{| @69 +| +0#00e0e07&@7|S|t|r|i|n|g|[|]| |v|a|l|u|e|(|)| +0#0000000&|d+0#4040ff13&|e|f|a|u|l|t| +0#0000000&|{|"+0#e000002&@1|}+0#0000000&|;| @36 @57|1|,|1| @10|T|o|p| diff --git a/runtime/syntax/testdir/dumps/java_annotations_01.dump b/runtime/syntax/testdir/dumps/java_annotations_01.dump index 7459bde71c..a9810e8a33 100644 --- a/runtime/syntax/testdir/dumps/java_annotations_01.dump +++ b/runtime/syntax/testdir/dumps/java_annotations_01.dump @@ -1,20 +1,20 @@ -| +0&#ffffff0@3|}+0#00e0e07&| +0#0000000&@69 +| +0&#ffffff0@3|}| @69 @75 @4|@+0#e000e06&|T|a|r|g|e|t|(|E+0#0000000&|l|e|m|e|n|t|T|y|p|e|.|T|Y|P|E|_|U|S|E|)+0#e000e06&| +0#0000000&@41 @4|@+0#00e0003&|i|n|t|e|r|f|a|c|e| +0#0000000&|T|e|x|t| @55 -@4|{+0#00e0e07&| +0#0000000&@69 -| +0#00e0e07&@7>S|t|r|i|n|g|[|]| |v|a|l|u|e|(|)| +0#0000000&|d+0#4040ff13&|e|f|a|u|l|t| +0#0000000&|{+0#00e0e07&|"+0#e000002&@1|}+0#00e0e07&|;+0#0000000&| @36 -@4|}+0#00e0e07&| +0#0000000&@69 +@4|{| @69 +| +0#00e0e07&@7>S|t|r|i|n|g|[|]| |v|a|l|u|e|(|)| +0#0000000&|d+0#4040ff13&|e|f|a|u|l|t| +0#0000000&|{|"+0#e000002&@1|}+0#0000000&|;| @36 +@4|}| @69 @75 -@4|@+0#e000e06&|T|a|r|g|e|t|(|{+0#00e0e07&| +0#0000000&@61 +@4|@+0#e000e06&|T|a|r|g|e|t|(|{+0#0000000&| @61 @8|E|l|e|m|e|n|t|T|y|p|e|.|M|E|T|H|O|D|,| @47 @8|E|l|e|m|e|n|t|T|y|p|e|.|P|A|R|A|M|E|T|E|R|,| @44 @8|E|l|e|m|e|n|t|T|y|p|e|.|T|Y|P|E|,| @49 -@4|}+0#00e0e07&|)+0#e000e06&| +0#0000000&@68 +@4|}|)+0#e000e06&| +0#0000000&@68 @4|@+0#00e0003&|i|n|t|e|r|f|a|c|e| +0#0000000&|L|a|b|e|l|s| @53 -@4|{+0#00e0e07&| +0#0000000&@69 +@4|{| @69 | +0#00e0e07&@7|L|a|b|e|l|[|]| |v|a|l|u|e|(|)|;+0#0000000&| @50 -@4|}+0#00e0e07&| +0#0000000&@69 +@4|}| @69 @75 -@4|@+0#e000e06&|j|a|v|a|.|l|a|n|g|.|a|n@1|o|t|a|t|i|o|n|.|T|a|r|g|e|t|(|{+0#00e0e07&| +0#0000000&@40 +@4|@+0#e000e06&|j|a|v|a|.|l|a|n|g|.|a|n@1|o|t|a|t|i|o|n|.|T|a|r|g|e|t|(|{+0#0000000&| @40 @57|1|9|,|3|-|9| @7|2@1|%| diff --git a/runtime/syntax/testdir/dumps/java_annotations_02.dump b/runtime/syntax/testdir/dumps/java_annotations_02.dump index 3ec6933520..e6eebf1838 100644 --- a/runtime/syntax/testdir/dumps/java_annotations_02.dump +++ b/runtime/syntax/testdir/dumps/java_annotations_02.dump @@ -1,20 +1,20 @@ -| +0&#ffffff0@3|@+0#e000e06&|j|a|v|a|.|l|a|n|g|.|a|n@1|o|t|a|t|i|o|n|.|T|a|r|g|e|t|(|{+0#00e0e07&| +0#0000000&@40 +| +0&#ffffff0@3|@+0#e000e06&|j|a|v|a|.|l|a|n|g|.|a|n@1|o|t|a|t|i|o|n|.|T|a|r|g|e|t|(|{+0#0000000&| @40 @8|j|a|v|a|.|l|a|n|g|.|a|n@1|o|t|a|t|i|o|n|.|E|l|e|m|e|n|t|T|y|p|e|.|M|E|T|H|O|D|,| @26 @8|j|a|v|a|.|l|a|n|g|.|a|n@1|o|t|a|t|i|o|n|.|E|l|e|m|e|n|t|T|y|p|e|.|P|A|R|A|M|E|T|E|R|,| @23 @8|j|a|v|a|.|l|a|n|g|.|a|n@1|o|t|a|t|i|o|n|.|E|l|e|m|e|n|t|T|y|p|e|.|T|Y|P|E|,| @28 -@4|}+0#00e0e07&|)+0#e000e06&| +0#0000000&@68 +@4|}|)+0#e000e06&| +0#0000000&@68 @4>@+0#e000e06&|j|a|v|a|.|l|a|n|g|.|a|n@1|o|t|a|t|i|o|n|.|R|e|p|e|a|t|a|b|l|e|(|L+0#0000000&|a|b|e|l|s|.|c+0#00e0003&|l|a|s@1|)+0#e000e06&| +0#0000000&@24 @4|@+0#00e0003&|i|n|t|e|r|f|a|c|e| +0#0000000&|L|a|b|e|l| @54 -@4|{+0#00e0e07&| +0#0000000&@69 +@4|{| @69 | +0#00e0e07&@7|S|t|r|i|n|g| |v|a|l|u|e|(|)| +0#0000000&|d+0#4040ff13&|e|f|a|u|l|t| +0#0000000&|"+0#e000002&@1|;+0#0000000&| @40 | +0#00e0e07&@7|C|l|a|s@1|<|?|>| |t|y|p|e|(|)| +0#0000000&|d+0#4040ff13&|e|f|a|u|l|t| +0#0000000&|L|a|b|e|l|.|c+0#00e0003&|l|a|s@1|;+0#0000000&| @30 | +0#00e0e07&@7|b+0#00e0003&|o@1|l|e|a|n| +0#00e0e07&|r|e|d|u|n|d|a|n|t|(|)| +0#0000000&|d+0#4040ff13&|e|f|a|u|l|t| +0#0000000&|t+0#e000002&|r|u|e|;+0#0000000&| @33 | +0#00e0e07&@7|T|e|x|t| |t|e|x|t|(|)| +0#0000000&|d+0#4040ff13&|e|f|a|u|l|t| +0#0000000&|@+0#e000e06&|T|e|x|t|;+0#0000000&| @40 | +0#00e0e07&@7|T|a|g| |h|e|a|d|(|)| +0#0000000&|d+0#4040ff13&|e|f|a|u|l|t| +0#0000000&|@+0#e000e06&|T|a|g|(|)|;+0#0000000&| @40 | +0#00e0e07&@7|T|a|g| |t|a|i|l|(|)| +0#0000000&|d+0#4040ff13&|e|f|a|u|l|t| +0#0000000&|@+0#e000e06&|T|a|g|(|v+0#0000000&|a|l|u|e| |=| |"+0#e000002&@1|,+0#0000000&| |k|i|n|d| |=| |"+0#e000002&@1|)+0#e000e06&|;+0#0000000&| @19 -@4|}+0#00e0e07&| +0#0000000&@69 +@4|}| @69 @75 @4|/+0#0000e05&|*| |U|s|e| |i|d|e|n|t|i|t|y| |c|a|s|t| |e|x|p|r|e|s@1|i|o|n|s| |t|o| |n|e|s|t| |T|Y|P|E|_|U|S|E| |a|n@1|o|t|a|t|i|o|n|s|.| |*|/| +0#0000000&@5 @32|@+0#e000e06&|L|a|b|e|l|(| +0#0000000&@35 -@28|(|@+0#e000e06&|T|e|x|t|(|{+0#00e0e07&| +0#0000000&@38 +@28|(|@+0#e000e06&|T|e|x|t|(|{+0#0000000&| @38 @57|3|7|,|2|-|5| @7|5|2|%| diff --git a/runtime/syntax/testdir/dumps/java_annotations_03.dump b/runtime/syntax/testdir/dumps/java_annotations_03.dump index 92fe6672c9..0e7a0b812d 100644 --- a/runtime/syntax/testdir/dumps/java_annotations_03.dump +++ b/runtime/syntax/testdir/dumps/java_annotations_03.dump @@ -1,10 +1,10 @@ -| +0&#ffffff0@27|(|@+0#e000e06&|T|e|x|t|(|{+0#00e0e07&| +0#0000000&@38 -@8|(|@+0#e000e06&|T|e|x|t|(|{+0#00e0e07&| +0#0000000&|"+0#e000002&|a|"|,+0#0000000&| |"+0#e000002&|a@1|"|,+0#0000000&| |"+0#e000002&|a@2|"|,+0#0000000&| |"+0#e000002&|a@3|"|,+0#0000000&| |}+0#00e0e07&|)+0#e000e06&| +0#0000000&|S|t|r|i|n|g|)| |"+0#e000002&|a|s|"|,+0#0000000&| @15 -@8|(|@+0#e000e06&|T|e|x|t|(|{+0#00e0e07&| +0#0000000&|"+0#e000002&|b|"|,+0#0000000&| |"+0#e000002&|b@1|"|,+0#0000000&| |"+0#e000002&|b@2|"|,+0#0000000&| |"+0#e000002&|b@3|"|,+0#0000000&| |}+0#00e0e07&|)+0#e000e06&| +0#0000000&|S|t|r|i|n|g|)| |"+0#e000002&|b|s|"|,+0#0000000&| @15 -@8|(|@+0#e000e06&|T|e|x|t|(|{+0#00e0e07&| +0#0000000&|"+0#e000002&|c|"|,+0#0000000&| |"+0#e000002&|c@1|"|,+0#0000000&| |"+0#e000002&|c@2|"|,+0#0000000&| |"+0#e000002&|c@3|"|,+0#0000000&| |}+0#00e0e07&|)+0#e000e06&| +0#0000000&|S|t|r|i|n|g|)| |"+0#e000002&|c|s|"|,+0#0000000&| @15 -@8|(|@+0#e000e06&|T|e|x|t|(|{+0#00e0e07&| +0#0000000&|"+0#e000002&|d|"|,+0#0000000&| |"+0#e000002&|d@1|"|,+0#0000000&| |"+0#e000002&|d@2|"|,+0#0000000&| |"+0#e000002&|d@3|"|,+0#0000000&| |}+0#00e0e07&|)+0#e000e06&| +0#0000000&|S|t|r|i|n|g|)| |"+0#e000002&|d|s|"|,+0#0000000&| @15 -@28>}+0#00e0e07&|)+0#e000e06&| +0#0000000&|S|t|r|i|n|g|)| |"+0#e000002&|a|b|c|d|"|)+0#e000e06&| +0#0000000&@28 -@4|i+0#00e0003&|n|t|e|r|f|a|c|e| +0#0000000&|P|r|i|m|e|r| |{+0#00e0e07&| +0#0000000&|}+0#00e0e07&| +0#0000000&@50 +| +0&#ffffff0@27|(|@+0#e000e06&|T|e|x|t|(|{+0#0000000&| @38 +@8|(|@+0#e000e06&|T|e|x|t|(|{+0#0000000&| |"+0#e000002&|a|"|,+0#0000000&| |"+0#e000002&|a@1|"|,+0#0000000&| |"+0#e000002&|a@2|"|,+0#0000000&| |"+0#e000002&|a@3|"|,+0#0000000&| |}|)+0#e000e06&| +0#0000000&|S|t|r|i|n|g|)| |"+0#e000002&|a|s|"|,+0#0000000&| @15 +@8|(|@+0#e000e06&|T|e|x|t|(|{+0#0000000&| |"+0#e000002&|b|"|,+0#0000000&| |"+0#e000002&|b@1|"|,+0#0000000&| |"+0#e000002&|b@2|"|,+0#0000000&| |"+0#e000002&|b@3|"|,+0#0000000&| |}|)+0#e000e06&| +0#0000000&|S|t|r|i|n|g|)| |"+0#e000002&|b|s|"|,+0#0000000&| @15 +@8|(|@+0#e000e06&|T|e|x|t|(|{+0#0000000&| |"+0#e000002&|c|"|,+0#0000000&| |"+0#e000002&|c@1|"|,+0#0000000&| |"+0#e000002&|c@2|"|,+0#0000000&| |"+0#e000002&|c@3|"|,+0#0000000&| |}|)+0#e000e06&| +0#0000000&|S|t|r|i|n|g|)| |"+0#e000002&|c|s|"|,+0#0000000&| @15 +@8|(|@+0#e000e06&|T|e|x|t|(|{+0#0000000&| |"+0#e000002&|d|"|,+0#0000000&| |"+0#e000002&|d@1|"|,+0#0000000&| |"+0#e000002&|d@2|"|,+0#0000000&| |"+0#e000002&|d@3|"|,+0#0000000&| |}|)+0#e000e06&| +0#0000000&|S|t|r|i|n|g|)| |"+0#e000002&|d|s|"|,+0#0000000&| @15 +@28>}|)+0#e000e06&| +0#0000000&|S|t|r|i|n|g|)| |"+0#e000002&|a|b|c|d|"|)+0#e000e06&| +0#0000000&@28 +@4|i+0#00e0003&|n|t|e|r|f|a|c|e| +0#0000000&|P|r|i|m|e|r| |{| |}| @50 @75 @4|@+0#e000e06&|L|a|b|e|l| +0#0000000&|@+0#e000e06&|L|a|b|e|l|(|)| +0#0000000&|@+0#e000e06&|L|a|b|e|l|(|"+0#0000000&@2| @44 | +0#e000002&@3|n|\| +0#0000000&@68 @@ -16,5 +16,5 @@ @8|t|y|p|e| |=| |A|n@1|o|t|a|t|i|o|n|s|T|e|s|t|s|.|c+0#00e0003&|l|a|s@1|,+0#0000000&| @36 @8|r|e|d|u|n|d|a|n|t| |=| |!@2|(|1+0#e000002&| +0#0000000&|!|=| |1+0#e000002&|)+0#0000000&|,| @42 @8|h|e|a|d| |=| |@+0#e000e06&|T|a|g|(|v+0#0000000&|a|l|u|e| |=| |"+0#e000002&|@|L|a|b|e|l|"|)+0#e000e06&|,+0#0000000&| @36 -@8|t|e|x|t| |=| |@+0#e000e06&|T|e|x|t|(|{+0#00e0e07&| +0#0000000&|"+0#e000002&|}|)|"|,+0#0000000&| |"+0#e000002&|(|{|"| +0#0000000&|}+0#00e0e07&|)+0#e000e06&@1| +0#0000000&@37 +@8|t|e|x|t| |=| |@+0#e000e06&|T|e|x|t|(|{+0#0000000&| |"+0#e000002&|}|)|"|,+0#0000000&| |"+0#e000002&|(|{|"| +0#0000000&|}|)+0#e000e06&@1| +0#0000000&@37 @57|5@1|,|8|-|2|9| @6|8|3|%| diff --git a/runtime/syntax/testdir/dumps/java_annotations_04.dump b/runtime/syntax/testdir/dumps/java_annotations_04.dump index b5661d6b09..edd008bf43 100644 --- a/runtime/syntax/testdir/dumps/java_annotations_04.dump +++ b/runtime/syntax/testdir/dumps/java_annotations_04.dump @@ -1,4 +1,4 @@ -| +0&#ffffff0@7|t|e|x|t| |=| |@+0#e000e06&|T|e|x|t|(|{+0#00e0e07&| +0#0000000&|"+0#e000002&|}|)|"|,+0#0000000&| |"+0#e000002&|(|{|"| +0#0000000&|}+0#00e0e07&|)+0#e000e06&@1| +0#0000000&@37 +| +0&#ffffff0@7|t|e|x|t| |=| |@+0#e000e06&|T|e|x|t|(|{+0#0000000&| |"+0#e000002&|}|)|"|,+0#0000000&| |"+0#e000002&|(|{|"| +0#0000000&|}|)+0#e000e06&@1| +0#0000000&@37 | +0#00e0e07&@3|s+0#00e0003&|t|a|t|i|c| +0#00e0e07&|v+0#00e0003&|o|i|d| +0#00e0e07&|n|o|O|p|(|@+0#e000e06&|L|a|b|e|l| +0#00e0e07&|@+0#e000e06&|L|a|b|e|l|(|)| +0#00e0e07&|@+0#e000e06&|L|a|b|e|l|(|"+0#e000002&|d|u|m@1|y|"|)+0#e000e06&| +0#0000000&@22 | +0#00e0e07&@7|@+0#e000e06&|L|a|b|e|l|(|h+0#00e0e07&|e|a|d| |=| |@+0#e000e06&|T|a|g|(|/+0#0000e05&|*|v|a|l|u|e| |=| |"|@|L|a|b|e|l|"|,|*|/| +0#00e0e07&|k|i|n|d| |=| |"+0#e000002&|n|a|m|e|"|)+0#e000e06&@1| +0#0000000&@10 | +0#00e0e07&@7|@+0#e000e06&|L|a|b|e|l|(|/+0#0000e05&@1| |v|a|l|u|e| |=| |"|P|a|r|a|m|e|t|e|r|"|,| +0#0000000&@36 @@ -6,9 +6,9 @@ | +0#00e0e07&@11>h|e|a|d| |=| |@+0#e000e06&|T|a|g|(|v+0#00e0e07&|a|l|u|e| |=| |"+0#e000002&|@|L|a|b|e|l|"|)+0#e000e06&|,+0#00e0e07&| +0#0000000&@32 | +0#00e0e07&@11|t|e|x|t| |=| |@+0#e000e06&|T|e|x|t|(|{+0#00e0e07&| |"+0#e000002&|)|{|"|,+0#00e0e07&| |"+0#e000002&|}|(|"| +0#00e0e07&|}|)+0#e000e06&@1| +0#0000000&@33 | +0#00e0e07&@7|O|b|j|e|c|t| |d|u|m@1|y|)| +0#0000000&@53 -@4|{+0#00e0e07&| +0#0000000&@69 -@4|}+0#00e0e07&| +0#0000000&@69 -|}+0#00e0e07&| +0#0000000&@73 +@4|{| @69 +@4|}| @69 +|}| @73 |~+0#4040ff13&| @73 |~| @73 |~| @73 diff --git a/runtime/syntax/testdir/dumps/java_annotations_99.dump b/runtime/syntax/testdir/dumps/java_annotations_99.dump index c9ad106d1a..7d158f2f70 100644 --- a/runtime/syntax/testdir/dumps/java_annotations_99.dump +++ b/runtime/syntax/testdir/dumps/java_annotations_99.dump @@ -6,7 +6,7 @@ @8|t|y|p|e| |=| |A|n@1|o|t|a|t|i|o|n|s|T|e|s|t|s|.|c+0#00e0003&|l|a|s@1|,+0#0000000&| @36 @8|r|e|d|u|n|d|a|n|t| |=| |!@2|(|1+0#e000002&| +0#0000000&|!|=| |1+0#e000002&|)+0#0000000&|,| @42 @8|h|e|a|d| |=| |@+0#e000e06&|T|a|g|(|v+0#0000000&|a|l|u|e| |=| |"+0#e000002&|@|L|a|b|e|l|"|)+0#e000e06&|,+0#0000000&| @36 -@8|t|e|x|t| |=| |@+0#e000e06&|T|e|x|t|(|{+0#00e0e07&| +0#0000000&|"+0#e000002&|}|)|"|,+0#0000000&| |"+0#e000002&|(|{|"| +0#0000000&|}+0#00e0e07&|)+0#e000e06&@1| +0#0000000&@37 +@8|t|e|x|t| |=| |@+0#e000e06&|T|e|x|t|(|{+0#0000000&| |"+0#e000002&|}|)|"|,+0#0000000&| |"+0#e000002&|(|{|"| +0#0000000&|}|)+0#e000e06&@1| +0#0000000&@37 | +0#00e0e07&@3|s+0#00e0003&|t|a|t|i|c| +0#00e0e07&|v+0#00e0003&|o|i|d| +0#00e0e07&|n|o|O|p|(|@+0#e000e06&|L|a|b|e|l| +0#00e0e07&|@+0#e000e06&|L|a|b|e|l|(|)| +0#00e0e07&|@+0#e000e06&|L|a|b|e|l|(|"+0#e000002&|d|u|m@1|y|"|)+0#e000e06&| +0#0000000&@22 | +0#00e0e07&@7|@+0#e000e06&|L|a|b|e|l|(|h+0#00e0e07&|e|a|d| |=| |@+0#e000e06&|T|a|g|(|/+0#0000e05&|*|v|a|l|u|e| |=| |"|@|L|a|b|e|l|"|,|*|/| +0#00e0e07&|k|i|n|d| |=| |"+0#e000002&|n|a|m|e|"|)+0#e000e06&@1| +0#0000000&@10 | +0#00e0e07&@7|@+0#e000e06&|L|a|b|e|l|(|/+0#0000e05&@1| |v|a|l|u|e| |=| |"|P|a|r|a|m|e|t|e|r|"|,| +0#0000000&@36 @@ -14,7 +14,7 @@ | +0#00e0e07&@11|h|e|a|d| |=| |@+0#e000e06&|T|a|g|(|v+0#00e0e07&|a|l|u|e| |=| |"+0#e000002&|@|L|a|b|e|l|"|)+0#e000e06&|,+0#00e0e07&| +0#0000000&@32 | +0#00e0e07&@11|t|e|x|t| |=| |@+0#e000e06&|T|e|x|t|(|{+0#00e0e07&| |"+0#e000002&|)|{|"|,+0#00e0e07&| |"+0#e000002&|}|(|"| +0#00e0e07&|}|)+0#e000e06&@1| +0#0000000&@33 | +0#00e0e07&@7|O|b|j|e|c|t| |d|u|m@1|y|)| +0#0000000&@53 -@4|{+0#00e0e07&| +0#0000000&@69 -@4|}+0#00e0e07&| +0#0000000&@69 ->}+0#00e0e07&| +0#0000000&@73 +@4|{| @69 +@4|}| @69 +>}| @73 @57|7|8|,|1| @9|B|o|t| diff --git a/runtime/syntax/testdir/dumps/java_enfoldment_00.dump b/runtime/syntax/testdir/dumps/java_enfoldment_00.dump new file mode 100644 index 0000000000..959686949c --- /dev/null +++ b/runtime/syntax/testdir/dumps/java_enfoldment_00.dump @@ -0,0 +1,20 @@ +| + |