view runtime/syntax/testdir/dumps/java_methods_indent_02.dump @ 35039:fbdb6aeca2e2

runtime(java): Improve the recognition of the "style" method declarations Commit: https://github.com/vim/vim/commit/a4c085a3e607bd01d34e1db600b6460fc35fb0a3 Author: Aliaksei Budavei <0x000c70@gmail.com> Date: Wed Apr 24 21:04:25 2024 +0200 runtime(java): Improve the recognition of the "style" method declarations - Request the new regexp engine (v7.3.970) for [:upper:] and [:lower:]. - Recognise declarations of in-line annotated methods. - Recognise declarations of _strictfp_ methods. - Establish partial order for method modifiers as shown in the MethodModifier production; namely, _public_ and friends should be written the leftmost, possibly followed by _abstract_ or _default_, or possibly followed by other modifiers. - Stop looking for parameterisable primitive types (void<?>, int<Object>, etc., are malformed). - Stop looking for arrays of _void_. - Acknowledge the prevailing convention for method names to begin with a small letter and for class/interface names to begin with a capital letter; and, therefore, desist from claiming declarations of enum constants and constructors with javaFuncDef. Rationale: + Constructor is distinct from method: * its (overloaded) name is not arbitrary; * its return type is implicit; * its _throws_ clause depends on indirect vagaries of instance (variable) initialisers; * its invocation makes other constructors of its type hierarchy invoked one by one, concluding with the primordial constructor; * its explicit invocation, via _this_ or _super_, can only appear as the first statement in a constructor (not anymore, see JEP 447); else, its _super_ call cannot appear in constructors of _record_ or _enum_; and neither invocation is allowed for the primordial constructor; * it is not a member of its class, like initialisers, and is never inherited; * it is never _abstract_ or _native_. + Constructor declarations tend to be few in number and merit visual recognition from method declarations. + Enum constants define a fixed set of type instances and more resemble class variable initialisers. Note that the code duplicated for @javaFuncParams is written keeping in mind for g:java_highlight_functions a pending 3rd variant, which would require none of the :syn-cluster added groups. closes: #14620 Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
author Christian Brabandt <cb@256bit.org>
date Wed, 24 Apr 2024 21:15:02 +0200
parents
children
line wrap: on
line source

| +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
| +0#00e0e07&@7|d+0#4040ff13&|e|f|a|u|l|t| +0#00e0e07&|v+0#00e0003&|o|i|d| +0#00e0e07&|a|s|c|i@1|$|0|_|(|)| +0#0000000&|{+0#00e0e07&| +0#0000000&|}+0#00e0e07&| +0#0000000&@39
| +0#00e0e07&@7|d+0#4040ff13&|e|f|a|u|l|t| +0#00e0e07&|Α| |μ|ʭ@1|$|0|_|(|)| +0#0000000&|{+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&@31
@2>}+0#00e0e07&| +0#0000000&@71
@75
@2|@+0#e000e06&|T|ɐ|g@1|a|b|l|ɘ| +0#0000000&|@+0#e000e06&|T|ɐ|g@1|a|b|l|ɘ| +0#0000000&@53
| +0#00e0e07&@1|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#0000000&| @47
@75
@2|@+0#e000e06&|T|ɐ|g@1|a|b|l|ɘ| +0#0000000&|@+0#e000e06&|T|ɐ|g@1|a|b|l|ɘ| +0#0000000&@53
| +0#00e0e07&@1|a+0#4040ff13&|b|s|t|r|a|c|t| +0#00e0e07&|<|α|,| |β|>| |Τ|ʬ|<|α|>| |μ|ʭ@1|$|0|_|(|β| |𝛽|)|;+0#0000000&| @38
@75
@2|@+0#e000e06&|T|ɐ|g@1|a|b|l|ɘ| +0#0000000&@63
| +0#00e0e07&@1|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#0000000&| @41
@75
@2|@+0#e000e06&|T|ɐ|g@1|a|b|l|ɘ| +0#0000000&@63
@2|p+0#00e0003&|r|i|v|a|t|e| +0#0000000&|n+0#e000e06&|a|t|i|v|e| +0#0000000&|<|α|,| |β|>| |Τ|ʬ|<|α|>|[|]| |μ|ʭ@1|$|1|_|(| @35
@24|j|a|v|a|.|u|t|i|l|.|f|u|n|c|t|i|o|n|.|F|u|n|c|t|i|o|n|<|β|,| |Τ|ʬ|<|α|>|[|]|>| |ƒ|)|;| @7
@57|3|7|,|3| @9|6|0|%|