Mercurial > vim
view runtime/syntax/testdir/input/java_enfoldment.java @ 35781:c020fc9af07f
runtime(java): Optionally highlight the :: token for method references
Commit: https://github.com/vim/vim/commit/e73e5b889b52675a9ea58cf154235c7f25d107d5
Author: Aliaksei Budavei <0x000c70@gmail.com>
Date: Wed Jul 24 20:15:15 2024 +0200
runtime(java): Optionally highlight the :: token for method references
This token will be highlighted, similar to the arrow of
lambda expressions, whenever "g:java_highlight_functions" is
defined.
Also:
- Improve the recognition of _switch-case_ labels
(D-Cysteine).
- Remove insignificant empty statements in syntax test
files.
closes: #15322
References:
https://docs.oracle.com/javase/specs/jls/se21/html/jls-15.html#jls-15.13
https://github.com/fleiner/vim/pull/1
Co-authored-by: D-Cysteine <54219287+D-Cysteine@users.noreply.github.com>
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 Jul 2024 20:30:04 +0200 |
parents | 6a29a07451c7 |
children | d3d3de56faab |
line wrap: on
line source
// VIM_TEST_SETUP setlocal foldenable foldcolumn=2 foldmethod=syntax @SuppressWarnings({ """ bespoke /* * */ /** * */ // // // { } """ }) class FoldingTests { interface Foldenable { } static { new Object() { { { new Object() {{{ new Object() {{{}}}; }}}; } } }; switch (0) { case 0: case 1: { break; } default: ; } } { Object bb = ((Object) new byte[]{}); } { out: { do { if (true) break 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. */ void noOp1() { } /** No operation. */ void noOp2() { } /** No operation. */ void noOp3() { } /** No operation. */ void noOp4() { /*/\/\/\*/ ; } } /* * Some note. * { * } */ /** * A summary. * { * } */ // // { // } /* 122|..........................................................................................*/ interface Foldenable { }