Skip to content

Commit

Permalink
runtime(java): Improve the recognition of the "indent" method declara…
Browse files Browse the repository at this point in the history
…tions (#14659)

There is a flaw in the current implementation that has been
exacerbated around v5.2.  It lies in the recognition of all
three indentation styles simultaneously: a tab, two space,
and eight space character(s).  With it, it is not uncommon
to misidentify various constructs as method declarations
when they belong to two-space indented members and other
blocks of a type and are offset at eight space characters or
a tab from the start of the line.

For example,

------------------------------------------------------------
class Test
{
  static String hello() { return "hello"; }

  public static void main(String[] args)
  {
    try {
      if (args.length > 0) {
        // FIXME: eight spaces.
        System.out.println(args[0]);
      } else {
        // FIXME: a tab.
	System.out.println(hello());
      }
    } catch (Exception e) {
      throw new Error(e);
    }
  }
}
------------------------------------------------------------

------------------------------------------------------------
:let g:java_highlight_functions = 'indent'
:doautocmd Syntax
------------------------------------------------------------

A better approach is to pick an only indentation style out
of all supported styles (so either two spaces _or_ eight
spaces _or_ a tab).  Note that tabs and spaces can still be
mixed, only the leading tab or the leading run of spaces
matters for the recognition.  And there is no reason to not
complement the set of valid styles with any number of spaces
from 1 to 8, inclusively.

Please proceed with the necessary change as follows:

- rename from "indent" to "indent2" for a 2-space run;
- rename from "indent" to "indent8" for an 8-space run;
- continue to have "indent" for a tab run;
- define an "indent" variable with a suffix number denoting
  the preferred amount of indentation for any other run of
  spaces [1-8].

As before, this alternative style of recognition of method
declarations still does not prescribe naming conventions and
still cannot recognise method declarations in nested types
that are conventionally indented.

The proposed changes also follow suit of "style" in stopping
the claiming of constructor and enum constant declarations.


Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
  • Loading branch information
zzzyxwvut committed Apr 29, 2024
1 parent 04e1aaa commit c4d0c8c
Show file tree
Hide file tree
Showing 36 changed files with 746 additions and 221 deletions.
24 changes: 17 additions & 7 deletions runtime/doc/syntax.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*syntax.txt* For Vim version 9.1. Last change: 2024 Apr 26
*syntax.txt* For Vim version 9.1. Last change: 2024 Apr 28


VIM REFERENCE MANUAL by Bram Moolenaar
Expand Down Expand Up @@ -2014,15 +2014,25 @@ Function names are not highlighted, as the way to find functions depends on
how you write Java code. The syntax file knows two possible ways to highlight
functions:

If you write function declarations that are always indented by either
a tab, 8 spaces or 2 spaces you may want to set >
If you write function declarations that are consistently indented by either
a tab, or a space . . . or eight space character(s), you may want to set >
:let java_highlight_functions="indent"
:let java_highlight_functions="indent1"
:let java_highlight_functions="indent2"
:let java_highlight_functions="indent3"
:let java_highlight_functions="indent4"
:let java_highlight_functions="indent5"
:let java_highlight_functions="indent6"
:let java_highlight_functions="indent7"
:let java_highlight_functions="indent8"
Note that in terms of 'shiftwidth', this is the leftmost step of indentation.
However, if you follow the Java guidelines about how functions and classes are
supposed to be named (with respect to upper and lowercase), use >
supposed to be named (with respect to upper- and lowercase) and there is any
amount of indentation, you may want to set >
:let java_highlight_functions="style"
If both options do not work for you, but you would still want function
declarations to be highlighted create your own definitions by changing the
definitions in java.vim or by creating your own java.vim which includes the
If neither setting does work for you, but you would still want function
declarations to be highlighted, create your own definitions by changing the
definitions in java.vim or by creating your own java.vim that includes the
original one and then adds the code to highlight functions.

In Java 1.1 the functions System.out.println() and System.err.println() should
Expand Down
21 changes: 17 additions & 4 deletions runtime/syntax/java.vim
Original file line number Diff line number Diff line change
Expand Up @@ -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 Apr 22
" Last Change: 2024 Apr 28

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

Expand Down Expand Up @@ -292,10 +292,23 @@ syn cluster javaTop add=javaString,javaStrTempl,javaCharacter,javaNumber,javaSpe
if exists("java_highlight_functions")
syn cluster javaFuncParams contains=javaAnnotation,@javaClasses,javaType,javaVarArg,javaComment,javaLineComment

if java_highlight_functions == "indent"
if java_highlight_functions =~# '^indent[1-8]\=$'
let s:last = java_highlight_functions[-1 :]
let s:indent = s:last != 't' ? repeat("\x20", s:last) : "\t"
syn cluster javaFuncParams add=javaScopeDecl,javaConceptKind,javaStorageClass,javaExternal
syn match javaFuncDef "^\%(\t\| \%( \{6\}\)\=\)\K\%(\k\|[ .,<>\[\]]\)*([^-+*/]*)" contains=@javaFuncParams
syn region javaFuncDef start=+^\%(\t\| \%( \{6\}\)\=\)\K\%(\k\|[ .,<>\[\]]\)*([^-+*/]*,\s*+ end=+)+ contains=@javaFuncParams
" Try to not match other type members, initialiser blocks, enum
" constants (JLS-17, §8.9.1), and constructors (JLS-17, §8.1.7):
" at any _conventional_ indentation, skip over all fields with
" "[^=]*", all records with "\<record\s", and let the "*Skip*"
" definitions take care of constructor declarations and enum
" constants (with no support for @Foo(value = "bar")).
exec 'syn region javaFuncDef start=+^' . s:indent . '\%(<[^>]\+>\+\s\+\|\%(\%(@\%(\K\k*\.\)*\K\k*\>\)\s\+\)\+\)\=\%(\<\K\k*\>\.\)*\K\k*\>[^=]*\%(\<record\)\@6<!\s\K\k*\s*(+ end=+)+ contains=@javaFuncParams'
" As long as package-private constructors cannot be matched with
" javaFuncDef, do not look with javaConstructorSkipDeclarator for
" them.
exec 'syn match javaConstructorSkipDeclarator transparent +^' . s:indent . '\%(\%(@\%(\K\k*\.\)*\K\k*\>\)\s\+\)*p\%(ublic\|rotected\|rivate\)\s\+\%(<[^>]\+>\+\s\+\)\=\K\k*\s*\ze(+ contains=javaAnnotation,javaScopeDecl'
exec 'syn match javaEnumSkipArgumentativeConstant transparent +^' . s:indent . '\%(\%(@\%(\K\k*\.\)*\K\k*\>\)\s\+\)*\K\k*\s*\ze(+ contains=javaAnnotation'
unlet s:indent s:last
else
" This is the "style" variant (:help ft-java-syntax).
syn cluster javaFuncParams add=javaScopeDecl,javaConceptKind,javaStorageClass,javaExternal
Expand Down
20 changes: 20 additions & 0 deletions runtime/syntax/testdir/dumps/java_methods_indent2_00.dump
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
>/+0#0000e05#ffffff0@1| |V|I|M|_|T|E|S|T|_|S|E|T|U|P| |l|e|t| |g|:|j|a|v|a|_|h|i|g|h|l|i|g|h|t|_|f|u|n|c|t|i|o|n|s| |=| |'|i|n|d|e|n|t|2|'| +0#0000000&@14
@75
@75
|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|.|E|l|e|m|e|n|t|T|y|p|e|;| @34
|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
|a+0#4040ff13&|b|s|t|r|a|c|t| +0#0000000&|c+0#00e0003&|l|a|s@1| +0#0000000&|I|n|d|e|n|t|2|M|e|t|h|o|d|s|T|e|s|t|s| @40
|{+0#00e0e07&| +0#0000000&|/+0#0000e05&@1| |D|O| |N|O|T| |r|e|t|a|b|!| |T|H|I|S| |F|I|L|E|;| |R|E|M|E|M|B|E|R| |A|B|O|U|T| |t|e|s|t|d|i|r|/|f|t|p|l|u|g|i|n|.| +0#0000000&@12
@2|/+0#0000e05&@1| |T|Y|P|E|S|.| +0#0000000&@63
@2|r+0#00e0003&|e|c|o|r|d| +0#0000000&|Τ|ʬ|<|α|>|(|α| |a|)| |{+0#00e0e07&| +0#0000000&|}+0#00e0e07&| +0#0000000&@51
@75
@2|e+0#00e0003&|n|u|m| +0#0000000&|𝓔| @66
@2|{+0#00e0e07&| +0#0000000&@71
@4|A|(|"+0#e000002&|𝕬|"|)+0#0000000&|,| |B|(|"+0#e000002&|𝕭|"|)+0#0000000&|,| |C|(|"+0#e000002&|𝕮|"|)+0#0000000&|,| |D|(|"+0#e000002&|𝕯|"|)+0#0000000&|,| @39
@4|E|(|"+0#e000002&|𝕰|"|)+0#0000000&|,| |F|(|"+0#e000002&|𝕱|"|)+0#0000000&|,| |G|(|"+0#e000002&|𝕲|"|)+0#0000000&|,| |H|(|"+0#e000002&|𝕳|"|)+0#0000000&|;| @39
@4|f+0#4040ff13&|i|n|a|l| +0#0000000&|S|t|r|i|n|g| |𝐬|;| @55
@4|p+0#00e0003&|r|i|v|a|t|e| +0#0000000&|𝓔|(|S|t|r|i|n|g| |𝐬|)| |{+0#00e0e07&| +0#0000000&|t+0#00e0003&|h|i|s|.+0#0000000&|𝐬| |=| |𝐬|;| |}+0#00e0e07&| +0#0000000&@35
@2|}+0#00e0e07&| +0#0000000&@71
@75
@57|1|,|1| @10|T|o|p|
20 changes: 20 additions & 0 deletions runtime/syntax/testdir/dumps/java_methods_indent2_01.dump
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
| +0&#ffffff0@3|A|(|"+0#e000002&|𝕬|"|)+0#0000000&|,| |B|(|"+0#e000002&|𝕭|"|)+0#0000000&|,| |C|(|"+0#e000002&|𝕮|"|)+0#0000000&|,| |D|(|"+0#e000002&|𝕯|"|)+0#0000000&|,| @39
@4|E|(|"+0#e000002&|𝕰|"|)+0#0000000&|,| |F|(|"+0#e000002&|𝕱|"|)+0#0000000&|,| |G|(|"+0#e000002&|𝕲|"|)+0#0000000&|,| |H|(|"+0#e000002&|𝕳|"|)+0#0000000&|;| @39
@4|f+0#4040ff13&|i|n|a|l| +0#0000000&|S|t|r|i|n|g| |𝐬|;| @55
@4|p+0#00e0003&|r|i|v|a|t|e| +0#0000000&|𝓔|(|S|t|r|i|n|g| |𝐬|)| |{+0#00e0e07&| +0#0000000&|t+0#00e0003&|h|i|s|.+0#0000000&|𝐬| |=| |𝐬|;| |}+0#00e0e07&| +0#0000000&@35
@2|}+0#00e0e07&| +0#0000000&@71
> @74
@2|@+0#e000e06&|T|a|r|g|e|t|(+0#0000000&|{+0#00e0e07&|E+0#0000000&|l|e|m|e|n|t|T|y|p|e|.|M|E|T|H|O|D|,| |E|l|e|m|e|n|t|T|y|p|e|.|C|O|N|S|T|R|U|C|T|O|R|}+0#00e0e07&|)+0#0000000&| @18
@2|@+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|(+0#0000000&|T|ɐ|g@1|a|b|l|ɘ|s|.|c+0#00e0003&|l|a|s@1|)+0#0000000&| @23
@2|@+0#00e0003&|i|n|t|e|r|f|a|c|e| +0#0000000&|T|ɐ|g@1|a|b|l|ɘ| @53
@2|{+0#00e0e07&| +0#0000000&@71
@4|S|t|r|i|n|g|[|]| |v|a|l|u|e|(|)| |d+0#4040ff13&|e|f|a|u|l|t| +0#0000000&|"+0#e000002&@1|;+0#0000000&| @42
@2|}+0#00e0e07&| +0#0000000&@71
@75
@2|@+0#e000e06&|T|a|r|g|e|t|(+0#0000000&|{+0#00e0e07&|E+0#0000000&|l|e|m|e|n|t|T|y|p|e|.|M|E|T|H|O|D|,| |E|l|e|m|e|n|t|T|y|p|e|.|C|O|N|S|T|R|U|C|T|O|R|}+0#00e0e07&|)+0#0000000&| @18
@2|@+0#00e0003&|i|n|t|e|r|f|a|c|e| +0#0000000&|T|ɐ|g@1|a|b|l|ɘ|s| @52
@2|{+0#00e0e07&| +0#0000000&@71
@4|T|ɐ|g@1|a|b|l|ɘ|[|]| |v|a|l|u|e|(|)|;| @51
@2|}+0#00e0e07&| +0#0000000&@71
@75
@57|1|9|,|0|-|1| @7|1|7|%|
20 changes: 20 additions & 0 deletions runtime/syntax/testdir/dumps/java_methods_indent2_02.dump
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
| +0&#ffffff0@74
@2|i+0#00e0003&|n|t|e|r|f|a|c|e| +0#0000000&|S|t|y|l|a|b|l|e|<|Α|>| @51
@2|{+0#00e0e07&| +0#0000000&@71
@4|d+0#4040ff13&|e|f|a|u|l|t| +0#0000000&|v+0#00e0003&|o|i|d| +0#0000000&|a|s|c|i@1|$|0|_|(|)| |{+0#00e0e07&| +0#0000000&|}+0#00e0e07&| +0#0000000&@43
@4|d+0#4040ff13&|e|f|a|u|l|t| +0#0000000&|Α| |μ|ʭ@1|$|0|_|(|)| |{+0#00e0e07&| +0#0000000&|r+0#af5f00255&|e|t|u|r|n| +0#0000000&|n+0#e000002&|u|l@1|;+0#0000000&| |}+0#00e0e07&| +0#0000000&@35
@2>}+0#00e0e07&| +0#0000000&@71
@75
@2|/+0#0000e05&@1| |F|I|E|L|D|S|.| +0#0000000&@62
@2|p+0#00e0003&|r|i|v|a|t|e| +0#0000000&|s+0#00e0003&|t|a|t|i|c| +0#0000000&|f+0#4040ff13&|i|n|a|l| +0#0000000&|C|l|a|s@1|<|?|>| |C|L|A|S@1|_|L|O|C|K| |=| |c|l|a|s@1|L|o|c|k|(|)|;| @17
@75
@2|p+0#00e0003&|r|i|v|a|t|e| +0#0000000&|f+0#4040ff13&|i|n|a|l| +0#0000000&|O|b|j|e|c|t| |i|n|s|t|a|n|c|e|L|o|c|k| |=| |n+0#af5f00255&|e|w| +0#0000000&|O|b|j|e|c|t|(|)|;| @23
@75
@2|/+0#0000e05&@1| |C|O|N|S|T|R|U|C|T|O|R|S|.| +0#0000000&@56
@2|@+0#e000e06&|T|ɐ|g@1|a|b|l|ɘ| +0#0000000&|@+0#e000e06&|T|ɐ|g@1|a|b|l|ɘ| +0#0000000&|p+0#00e0003&|r|o|t|e|c|t|e|d| +0#0000000&|I|n|d|e|n|t|2|M|e|t|h|o|d|s|T|e|s|t|s|(|)| |{+0#00e0e07&| +0#0000000&|}+0#00e0e07&| +0#0000000&@17
@2|<|T| |e+0#00e0003&|x|t|e|n|d|s| +0#0000000&|C|o|m|p|a|r|a|b|l|e|<|T|>@1| |I|n|d|e|n|t|2|M|e|t|h|o|d|s|T|e|s|t|s|(|T| |t|,| |V|o|i|d| |v|)| |{+0#00e0e07&| +0#0000000&|}+0#00e0e07&| +0#0000000&@10
@2|p+0#00e0003&|r|i|v|a|t|e| +0#0000000&|<|T| |e|x|t|e|n|d|s| |C|o|m|p|a|r|a|b|l|e|<|T|>@1| |I|n|d|e|n|t|2|M|e|t|h|o|d|s|T|e|s|t|s|(|T| |t|)| |{+0#00e0e07&| +0#0000000&|}+0#00e0e07&| +0#0000000&@10
@75
@2|/+0#0000e05&@1| |M|E|T|H|O|D|S|.| +0#0000000&@61
| +0#00e0e07&@1|@+0#e000e06&|T|ɐ|g@1|a|b|l|ɘ| +0#00e0e07&|@+0#e000e06&|T|ɐ|g@1|a|b|l|ɘ| +0#00e0e07&|a+0#4040ff13&|b|s|t|r|a|c|t| +0#00e0e07&|v+0#00e0003&|o|i|d| +0#00e0e07&|a|s|c|i@1|$|0|_|(|/+0#0000e05&@15| +0#0000000&@13
@57|3|7|,|3| @9|4|2|%|
20 changes: 20 additions & 0 deletions runtime/syntax/testdir/dumps/java_methods_indent2_03.dump
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
| +0#00e0e07#ffffff0@1|@+0#e000e06&|T|ɐ|g@1|a|b|l|ɘ| +0#00e0e07&|@+0#e000e06&|T|ɐ|g@1|a|b|l|ɘ| +0#00e0e07&|a+0#4040ff13&|b|s|t|r|a|c|t| +0#00e0e07&|v+0#00e0003&|o|i|d| +0#00e0e07&|a|s|c|i@1|$|0|_|(|/+0#0000e05&@15| +0#0000000&@13
| +0#00e0e07&@63|)|;+0#0000000&| @8
| +0#00e0e07&@1|@+0#e000e06&|T|ɐ|g@1|a|b|l|ɘ| +0#00e0e07&|@+0#e000e06&|T|ɐ|g@1|a|b|l|ɘ| +0#00e0e07&|a+0#4040ff13&|b|s|t|r|a|c|t| +0#00e0e07&|<|α|,| |β|>| |Τ|ʬ|<|α|>| |μ|ʭ@1|$|0|_|(| +0#0000000&@23
| +0#00e0e07&@23|/+0#0000e05&|*| |T+0#0000001#ffff4012|O|D|O|:+0#0000e05#ffffff0| |@|S|u|p@1|r|e|s@1|W|a|r|n|i|n|g|s|(|"|b|e|s|p|o|k|e|"|)|*|/| +0#00e0e07&|β| |𝛽|)|;+0#0000000&| @5
@75
| +0#00e0e07&@1>@+0#e000e06&|T|ɐ|g@1|a|b|l|ɘ| +0#00e0e07&|p+0#00e0003&|r|i|v|a|t|e| +0#00e0e07&|n+0#e000e06&|a|t|i|v|e| +0#00e0e07&|v+0#00e0003&|o|i|d| +0#00e0e07&|a|s|c|i@1|$|1|_|(|/+0#0000e05&|*|/@10|/+0#ffffff16#ff404010|*+0#0000e05#ffffff0|/|)+0#00e0e07&|;+0#0000000&| @15
| +0#00e0e07&@1|@+0#e000e06&|T|ɐ|g@1|a|b|l|ɘ| +0#00e0e07&|p+0#00e0003&|r|i|v|a|t|e| +0#00e0e07&|n+0#e000e06&|a|t|i|v|e| +0#00e0e07&|<|α|,| |β|>| |Τ|ʬ|<|α|>|[|]| |μ|ʭ@1|$|1|_|(| +0#0000000&@25
| +0#00e0e07&@23|j|a|v|a|.|u|t|i|l|.|f|u|n|c|t|i|o|n|.|F|u|n|c|t|i|o|n|<|β|,| |Τ|ʬ|<|α|>|[|]|>| |ƒ|)|;+0#0000000&| @7
@75
| +0#00e0e07&@1|v+0#00e0003&|o|i|d| +0#00e0e07&|A|s|c|i@1|$|2|_|(|)| +0#0000000&|{+0#00e0e07&| +0#0000000&|}+0#00e0e07&| +0#0000000&@53
| +0#00e0e07&@1|<|T|,| |U| |e|x|t|e|n|d|s| |S|t|y|l|a|b|l|e|<|T|>@1| |v+0#00e0003&|o|i|d| +0#00e0e07&|Μ|ʭ@1|$|2|_|(|U| |u|)| +0#0000000&|{+0#00e0e07&| +0#0000000&|}+0#00e0e07&| +0#0000000&@25
@75
| +0#00e0e07&@1|s+0#00e0003&|t|a|t|i|c| +0#00e0e07&|f+0#4040ff13&|i|n|a|l| +0#00e0e07&|n+0#e000e06&|a|t|i|v|e| +0#00e0e07&|s+0#00e0003&|y|n|c|h|r|o|n|i|z|e|d| +0#00e0e07&|v+0#00e0003&|o|i|d| +0#00e0e07&|a|s|c|i@1|$|9|8|_|(|)|;+0#0000000&| @22
| +0#00e0e07&@1|s+0#00e0003&|t|a|t|i|c| +0#00e0e07&|f+0#4040ff13&|i|n|a|l| +0#00e0e07&|n+0#e000e06&|a|t|i|v|e| +0#00e0e07&|s+0#00e0003&|y|n|c|h|r|o|n|i|z|e|d| +0#00e0e07&|<|α|,| |β|>| |Τ|ʬ|<|α|>|[|]|[|]| |μ|ʭ@1|$|9|8|_|(| +0#0000000&@14
| +0#00e0e07&@23|j|a|v|a|.|u|t|i|l|.|f|u|n|c|t|i|o|n|.|F|u|n|c|t|i|o|n|<|β|,| |Τ|ʬ|<|α|>|[|]|[|]|>| |ƒ|)|;+0#0000000&| @5
@75
@2|@+0#e000e06&|S|u|p@1|r|e|s@1|W|a|r|n|i|n|g|s|(+0#0000000&|"+0#e000002&|s|t|r|i|c|t|f|p|"|)+0#0000000&| @43
| +0#00e0e07&@1|p+0#00e0003&|r|o|t|e|c|t|e|d| +0#00e0e07&|s+0#00e0003&|t|a|t|i|c| +0#00e0e07&|f+0#4040ff13&|i|n|a|l| +0#00e0e07&|s+0#00e0003&|y|n|c|h|r|o|n|i|z|e|d| +0#00e0e07&|s+0#00e0003&|t|r|i|c|t|f|p| +0#00e0e07&|v+0#00e0003&|o|i|d| +0#00e0e07&|a|s|c|i@1|$|9@1|_|(|)| +0#0000000&@11
@2|{+0#00e0e07&| +0#0000000&|a|s|c|i@1|$|9|8|_|(|)|;| |}+0#00e0e07&| +0#0000000&@56
@57|5@1|,|3| @9|6|7|%|
20 changes: 20 additions & 0 deletions runtime/syntax/testdir/dumps/java_methods_indent2_04.dump
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
| +0&#ffffff0@1|{+0#00e0e07&| +0#0000000&|a|s|c|i@1|$|9|8|_|(|)|;| |}+0#00e0e07&| +0#0000000&@56
@75
@2|@+0#e000e06&|S|u|p@1|r|e|s@1|W|a|r|n|i|n|g|s|(+0#0000000&|"+0#e000002&|s|t|r|i|c|t|f|p|"|)+0#0000000&| @43
| +0#00e0e07&@1|p+0#00e0003&|r|o|t|e|c|t|e|d| +0#00e0e07&|s+0#00e0003&|t|a|t|i|c| +0#00e0e07&|f+0#4040ff13&|i|n|a|l| +0#00e0e07&|s+0#00e0003&|y|n|c|h|r|o|n|i|z|e|d| +0#00e0e07&|s+0#00e0003&|t|r|i|c|t|f|p| +0#00e0e07&|<|α|,| |β|>| |Τ|ʬ|<|α|>|[|]| |μ|ʭ@1|$|9@1|_|(| +0#0000000&@4
| +0#00e0e07&@23|j|a|v|a|.|u|t|i|l|.|f|u|n|c|t|i|o|n|.|F|u|n|c|t|i|o|n|<|β|,| |Τ|ʬ|<|α|>|[|]|[|]|>| |ƒ|)| +0#0000000&@6
@2>{+0#00e0e07&| +0#0000000&@71
@4|r+0#af5f00255&|e|t|u|r|n| +0#0000000&@64
@2|I|n|d|e|n|t|2|M|e|t|h|o|d|s|T|e|s|t|s|.|<|α|,| |β|>|μ|ʭ@1|$|9|8|_|(|ƒ|)|[|0+0#e000002&|]+0#0000000&|;| @32
@2|}+0#00e0e07&| +0#0000000&@71
@75
| +0#00e0e07&@1|p+0#00e0003&|u|b|l|i|c| +0#00e0e07&|s+0#00e0003&|t|a|t|i|c| +0#00e0e07&|C|l|a|s@1|<|?|>| |c|l|a|s@1|L|o|c|k|(|)| +0#0000000&|{+0#00e0e07&| +0#0000000&|r+0#af5f00255&|e|t|u|r|n| +0#0000000&|I|n|d|e|n|t|2|M|e|t|h|o|d|s|T|e|s|t|s|.|c+0#00e0003&|l|a|s@1|;+0#0000000&| |}+0#00e0e07&| +0#0000000&
@75
@2|@+0#e000e06&|O|v|e|r@1|i|d|e| +0#0000000&|@+0#e000e06&|S|u|p@1|r|e|s@1|W|a|r|n|i|n|g|s|(+0#0000000&|"+0#e000002&|c|a|s|t|"|)+0#0000000&| @37
| +0#00e0e07&@1|p+0#00e0003&|u|b|l|i|c| +0#00e0e07&|S|t|r|i|n|g| |t|o|S|t|r|i|n|g|(|)| +0#0000000&|{+0#00e0e07&| +0#0000000&|r+0#af5f00255&|e|t|u|r|n| +0#0000000&|(|S|t|r|i|n|g|)| |"+0#e000002&|I|n|d|e|n|t|2|M|e|t|h|o|d|s|T|e|s|t|s|"|;+0#0000000&| |}+0#00e0e07&| +0#0000000&@5
|}+0#00e0e07&| +0#0000000&@73
@75
|e+0#00e0003&|n|u|m| +0#0000000&|𝓔| @68
|{+0#00e0e07&| +0#0000000&@73
@2|@+0#e000e06&|S|u|p@1|r|e|s@1|W|a|r|n|i|n|g|s|(+0#0000000&|"+0#e000002&|b|e|s|p|o|k|e|"|)+0#0000000&| |A|(|"+0#e000002&|𝗔|"|)+0#0000000&|,| @36
@57|7|3|,|3| @9|9|1|%|
20 changes: 20 additions & 0 deletions runtime/syntax/testdir/dumps/java_methods_indent2_99.dump
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
| +0&#ffffff0@3|r+0#af5f00255&|e|t|u|r|n| +0#0000000&@64
@2|I|n|d|e|n|t|2|M|e|t|h|o|d|s|T|e|s|t|s|.|<|α|,| |β|>|μ|ʭ@1|$|9|8|_|(|ƒ|)|[|0+0#e000002&|]+0#0000000&|;| @32
@2|}+0#00e0e07&| +0#0000000&@71
@75
| +0#00e0e07&@1|p+0#00e0003&|u|b|l|i|c| +0#00e0e07&|s+0#00e0003&|t|a|t|i|c| +0#00e0e07&|C|l|a|s@1|<|?|>| |c|l|a|s@1|L|o|c|k|(|)| +0#0000000&|{+0#00e0e07&| +0#0000000&|r+0#af5f00255&|e|t|u|r|n| +0#0000000&|I|n|d|e|n|t|2|M|e|t|h|o|d|s|T|e|s|t|s|.|c+0#00e0003&|l|a|s@1|;+0#0000000&| |}+0#00e0e07&| +0#0000000&
@75
@2|@+0#e000e06&|O|v|e|r@1|i|d|e| +0#0000000&|@+0#e000e06&|S|u|p@1|r|e|s@1|W|a|r|n|i|n|g|s|(+0#0000000&|"+0#e000002&|c|a|s|t|"|)+0#0000000&| @37
| +0#00e0e07&@1|p+0#00e0003&|u|b|l|i|c| +0#00e0e07&|S|t|r|i|n|g| |t|o|S|t|r|i|n|g|(|)| +0#0000000&|{+0#00e0e07&| +0#0000000&|r+0#af5f00255&|e|t|u|r|n| +0#0000000&|(|S|t|r|i|n|g|)| |"+0#e000002&|I|n|d|e|n|t|2|M|e|t|h|o|d|s|T|e|s|t|s|"|;+0#0000000&| |}+0#00e0e07&| +0#0000000&@5
|}+0#00e0e07&| +0#0000000&@73
@75
|e+0#00e0003&|n|u|m| +0#0000000&|𝓔| @68
|{+0#00e0e07&| +0#0000000&@73
@2|@+0#e000e06&|S|u|p@1|r|e|s@1|W|a|r|n|i|n|g|s|(+0#0000000&|"+0#e000002&|b|e|s|p|o|k|e|"|)+0#0000000&| |A|(|"+0#e000002&|𝗔|"|)+0#0000000&|,| @36
@2|B|(|"+0#e000002&|𝗕|"|)+0#0000000&|,| @65
@2|C|(|"+0#e000002&|𝗖|"|)+0#0000000&|,| |D|(|"+0#e000002&|𝗗|"|)+0#0000000&|,| @57
@2|E|(|"+0#e000002&|𝗘|"|)+0#0000000&|,| |F|(|"+0#e000002&|𝗙|"|)+0#0000000&|,| |G|(|"+0#e000002&|𝗚|"|)+0#0000000&|,| |H|(|"+0#e000002&|𝗛|"|)+0#0000000&|;| @41
@2|f+0#4040ff13&|i|n|a|l| +0#0000000&|S|t|r|i|n|g| |𝐬|;| @57
@2|p+0#00e0003&|r|i|v|a|t|e| +0#0000000&|𝓔|(|S|t|r|i|n|g| |𝐬|)| |{+0#00e0e07&| +0#0000000&|t+0#00e0003&|h|i|s|.+0#0000000&|𝐬| |=| |𝐬|;| |}+0#00e0e07&| +0#0000000&@37
>}+0#00e0e07&| +0#0000000&@73
@57|9|2|,|1| @9|B|o|t|
20 changes: 20 additions & 0 deletions runtime/syntax/testdir/dumps/java_methods_indent4_00.dump
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
>/+0#0000e05#ffffff0@1| |V|I|M|_|T|E|S|T|_|S|E|T|U|P| |l|e|t| |g|:|j|a|v|a|_|h|i|g|h|l|i|g|h|t|_|f|u|n|c|t|i|o|n|s| |=| |'|i|n|d|e|n|t|4|'| +0#0000000&@14
@75
@75
|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|.|E|l|e|m|e|n|t|T|y|p|e|;| @34
|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
|a+0#4040ff13&|b|s|t|r|a|c|t| +0#0000000&|c+0#00e0003&|l|a|s@1| +0#0000000&|I|n|d|e|n|t|4|M|e|t|h|o|d|s|T|e|s|t|s| @40
|{+0#00e0e07&| +0#0000000&|/+0#0000e05&@1| |D|O| |N|O|T| |r|e|t|a|b|!| |T|H|I|S| |F|I|L|E|;| |R|E|M|E|M|B|E|R| |A|B|O|U|T| |t|e|s|t|d|i|r|/|f|t|p|l|u|g|i|n|.| +0#0000000&@12
@4|/+0#0000e05&@1| |T|Y|P|E|S|.| +0#0000000&@61
@4|r+0#00e0003&|e|c|o|r|d| +0#0000000&|Τ|ʬ|<|α|>|(|α| |a|)| |{+0#00e0e07&| +0#0000000&|}+0#00e0e07&| +0#0000000&@49
@75
@4|e+0#00e0003&|n|u|m| +0#0000000&|𝓔| @64
@4|{+0#00e0e07&| +0#0000000&@69
@8|A|(|"+0#e000002&|𝕬|"|)+0#0000000&|,| |B|(|"+0#e000002&|𝕭|"|)+0#0000000&|,| |C|(|"+0#e000002&|𝕮|"|)+0#0000000&|,| |D|(|"+0#e000002&|𝕯|"|)+0#0000000&|,| @35
@8|E|(|"+0#e000002&|𝕰|"|)+0#0000000&|,| |F|(|"+0#e000002&|𝕱|"|)+0#0000000&|,| |G|(|"+0#e000002&|𝕲|"|)+0#0000000&|,| |H|(|"+0#e000002&|𝕳|"|)+0#0000000&|;| @35
@8|f+0#4040ff13&|i|n|a|l| +0#0000000&|S|t|r|i|n|g| |𝐬|;| @51
@8|p+0#00e0003&|r|i|v|a|t|e| +0#0000000&|𝓔|(|S|t|r|i|n|g| |𝐬|)| |{+0#00e0e07&| +0#0000000&|t+0#00e0003&|h|i|s|.+0#0000000&|𝐬| |=| |𝐬|;| |}+0#00e0e07&| +0#0000000&@31
@4|}+0#00e0e07&| +0#0000000&@69
@75
@57|1|,|1| @10|T|o|p|
20 changes: 20 additions & 0 deletions runtime/syntax/testdir/dumps/java_methods_indent4_01.dump
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
| +0&#ffffff0@7|A|(|"+0#e000002&|𝕬|"|)+0#0000000&|,| |B|(|"+0#e000002&|𝕭|"|)+0#0000000&|,| |C|(|"+0#e000002&|𝕮|"|)+0#0000000&|,| |D|(|"+0#e000002&|𝕯|"|)+0#0000000&|,| @35
@8|E|(|"+0#e000002&|𝕰|"|)+0#0000000&|,| |F|(|"+0#e000002&|𝕱|"|)+0#0000000&|,| |G|(|"+0#e000002&|𝕲|"|)+0#0000000&|,| |H|(|"+0#e000002&|𝕳|"|)+0#0000000&|;| @35
@8|f+0#4040ff13&|i|n|a|l| +0#0000000&|S|t|r|i|n|g| |𝐬|;| @51
@8|p+0#00e0003&|r|i|v|a|t|e| +0#0000000&|𝓔|(|S|t|r|i|n|g| |𝐬|)| |{+0#00e0e07&| +0#0000000&|t+0#00e0003&|h|i|s|.+0#0000000&|𝐬| |=| |𝐬|;| |}+0#00e0e07&| +0#0000000&@31
@4|}+0#00e0e07&| +0#0000000&@69
> @74
@4|@+0#e000e06&|T|a|r|g|e|t|(+0#0000000&|{+0#00e0e07&|E+0#0000000&|l|e|m|e|n|t|T|y|p|e|.|M|E|T|H|O|D|,| |E|l|e|m|e|n|t|T|y|p|e|.|C|O|N|S|T|R|U|C|T|O|R|}+0#00e0e07&|)+0#0000000&| @16
@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|(+0#0000000&|T|ɐ|g@1|a|b|l|ɘ|s|.|c+0#00e0003&|l|a|s@1|)+0#0000000&| @21
@4|@+0#00e0003&|i|n|t|e|r|f|a|c|e| +0#0000000&|T|ɐ|g@1|a|b|l|ɘ| @51
@4|{+0#00e0e07&| +0#0000000&@69
@8|S|t|r|i|n|g|[|]| |v|a|l|u|e|(|)| |d+0#4040ff13&|e|f|a|u|l|t| +0#0000000&|"+0#e000002&@1|;+0#0000000&| @38
@4|}+0#00e0e07&| +0#0000000&@69
@75
@4|@+0#e000e06&|T|a|r|g|e|t|(+0#0000000&|{+0#00e0e07&|E+0#0000000&|l|e|m|e|n|t|T|y|p|e|.|M|E|T|H|O|D|,| |E|l|e|m|e|n|t|T|y|p|e|.|C|O|N|S|T|R|U|C|T|O|R|}+0#00e0e07&|)+0#0000000&| @16
@4|@+0#00e0003&|i|n|t|e|r|f|a|c|e| +0#0000000&|T|ɐ|g@1|a|b|l|ɘ|s| @50
@4|{+0#00e0e07&| +0#0000000&@69
@8|T|ɐ|g@1|a|b|l|ɘ|[|]| |v|a|l|u|e|(|)|;| @47
@4|}+0#00e0e07&| +0#0000000&@69
@75
@57|1|9|,|0|-|1| @7|1|7|%|

0 comments on commit c4d0c8c

Please sign in to comment.