1
0
forked from aniani/vim
vim/runtime/syntax/testdir/dumps/java_generics_04.dump
Aliaksei Budavei beb02ed674
runtime(java): Optionally highlight parameterised types
In the presence of parameterised types whose names begin
with a capital letter and end with a less-than sign "<" that
introduces a type argument or a list of comma-separated type
arguments, followed by a greater-than sign ">", a variable
"g:java_highlight_generics" can be defined to have some
components of such types uniformly coloured (by picking
highlight groups for javaGenericsC{1,2}, javaWildcardBound).

For example,
------------------------------------------------------------
java.io.InputStream stream = java.io.InputStream.nullInputStream();
java.util.function.Function<String,
    java.util.function.BiFunction<String, String, String>> updater =
	property -> (oldValue, newValue) -> oldValue;
java.util.logging.LogManager.getLogManager()
    .updateConfiguration(stream, updater);
------------------------------------------------------------

Note that the diamond form and explicit type arguments do
not qualify for this kind of recognition.

For example,
------------------------------------------------------------
new java.util.HashSet<>().<String>toArray(new String[0]);
------------------------------------------------------------

References:
https://docs.oracle.com/javase/specs/jls/se21/html/jls-4.html#jls-4.5
https://docs.oracle.com/javase/specs/jls/se21/html/jls-15.html#jls-15.9
https://docs.oracle.com/javase/specs/jls/se21/html/jls-15.html#jls-15.12.2.1

closes: #15050

Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-20 21:00:53 +02:00

21 lines
2.2 KiB
Plaintext

| +0&#ffffff0@3|r+0#00e0003&|e|c|o|r|d| +0#0000000&|B+0#0000001#ffff4012|i|n|<|N+0#0000000#ffffff0| |e+0#00e0003&|x|t|e|n|d|s| +0#0000000&|N|u|m|b|e|r|>+0#0000001#ffff4012|(+0#0000000#ffffff0|N| |v|a|l|u|e|)| |i+0#00e0003&|m|p|l|e|m|e|n|t|s| +0#0000000&|N+0#0000001#ffff4012|u|m|<|N+0#0000000#ffffff0|>+0#0000001#ffff4012| +0#0000000#ffffff0@15
@4|{| @69
| +0#00e0e07&@7|p+0#00e0003&|u|b|l|i|c| +0#00e0e07&|i+0#00e0003&|n|t| +0#00e0e07&|r|a|d|i|x|(|)| +0#0000000&|{| |r+0#af5f00255&|e|t|u|r|n| +0#0000000&|2+0#e000002&|;+0#0000000&| |}| @34
@4|}| @69
@75
@4>r+0#00e0003&|e|c|o|r|d| +0#0000000&|D+0#0000001#ffff4012|e|c|<|N+0#0000000#ffffff0| |e+0#00e0003&|x|t|e|n|d|s| +0#0000000&|N|u|m|b|e|r|>+0#0000001#ffff4012|(+0#0000000#ffffff0|N| |v|a|l|u|e|)| |i+0#00e0003&|m|p|l|e|m|e|n|t|s| +0#0000000&|N+0#0000001#ffff4012|u|m|<|N+0#0000000#ffffff0|>+0#0000001#ffff4012| +0#0000000#ffffff0@15
@4|{| @69
| +0#00e0e07&@7|p+0#00e0003&|u|b|l|i|c| +0#00e0e07&|i+0#00e0003&|n|t| +0#00e0e07&|r|a|d|i|x|(|)| +0#0000000&|{| |r+0#af5f00255&|e|t|u|r|n| +0#0000000&|1+0#e000002&|0|;+0#0000000&| |}| @33
@4|}| @69
@75
@4|r+0#00e0003&|e|c|o|r|d| +0#0000000&|H+0#0000001#ffff4012|e|x|<|N+0#0000000#ffffff0| |e+0#00e0003&|x|t|e|n|d|s| +0#0000000&|N|u|m|b|e|r|>+0#0000001#ffff4012|(+0#0000000#ffffff0|N| |v|a|l|u|e|)| |i+0#00e0003&|m|p|l|e|m|e|n|t|s| +0#0000000&|N+0#0000001#ffff4012|u|m|<|N+0#0000000#ffffff0|>+0#0000001#ffff4012| +0#0000000#ffffff0@15
@4|{| @69
| +0#00e0e07&@7|p+0#00e0003&|u|b|l|i|c| +0#00e0e07&|i+0#00e0003&|n|t| +0#00e0e07&|r|a|d|i|x|(|)| +0#0000000&|{| |r+0#af5f00255&|e|t|u|r|n| +0#0000000&|1+0#e000002&|6|;+0#0000000&| |}| @33
@4|}| @69
@75
@4|r+0#00e0003&|e|c|o|r|d| +0#0000000&|O+0#0000001#ffff4012|c|t|<|N+0#0000000#ffffff0| |e+0#00e0003&|x|t|e|n|d|s| +0#0000000&|N|u|m|b|e|r|>+0#0000001#ffff4012|(+0#0000000#ffffff0|N| |v|a|l|u|e|)| |i+0#00e0003&|m|p|l|e|m|e|n|t|s| +0#0000000&|N+0#0000001#ffff4012|u|m|<|N+0#0000000#ffffff0|>+0#0000001#ffff4012| +0#0000000#ffffff0@15
@4|{| @69
| +0#00e0e07&@7|p+0#00e0003&|u|b|l|i|c| +0#00e0e07&|i+0#00e0003&|n|t| +0#00e0e07&|r|a|d|i|x|(|)| +0#0000000&|{| |r+0#af5f00255&|e|t|u|r|n| +0#0000000&|8+0#e000002&|;+0#0000000&| |}| @34
@4|}| @69
@57|7|3|,|2|-|5| @7|5@1|%|