redhat-developer / redhat-developer/vscode-java
Square brackets not recognized in syntax highlighting grammar
未关闭
@hopehadfield 已经在做这个了。
开始于 2024年3月13日。
bug
highlighting
- 主要语言
- TypeScript
- 星标
- 2.3k
- 派生
- 546
- 平均合并
- 20 小时 1 分钟
- 30 天内合并 PR
- 11
描述
In some cases, square brackets are not recognized as square brackets by the syntax highlighting grammar.
Environment
- Operating System: N/A
- JDK version: N/A
- Visual Studio Code version: 1.87 and 1.88 insiders
- Java extension version: Latest commit from main
Steps To Reproduce
- Create a plain text file with the following content:
public class App {
public static void main( String[] args ) {
// ↓
int val1 = new int[]{ 1, 2 }[0];
// ↓
System.out.println("val1=" + val1);
int[] arr = new int[]{ 1, 2 };
// ↓ ↓
int val2 = arr[0] + arr[1];
}
}
-
Select the Language Mode to Java (java).
-
You can see that there are several places where the syntax highlighting is incorrect for the down arrows(↓). You can verify this by opening the Command Center and entering the following command:
>Developer: Inspect Editor Tokens and Scopes
(See images below.)
Current Result
Expected Result
Additional Informations
Originally from @tzengshinfu in https://github.com/microsoft/vscode/issues/206975
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
评估
这个 Issue 还没有评估数据。