Comments (1)
The problem is infact caused by the overly restricted rules specified in syntax file
Currently, the enum syntax will try to match three patterns:
- pure enum's constant field
- constant field with constructor
- constant field with code overrides
But when constructor and code overrides are applied on a field at the same time, the pattern matching fails, just as follows:
Worth noting that a new line also breaks current syntax:
from language-java.
Related Issues (20)
- Inconsistency of variable and new-variable method call
- Inconsistency of type highlighting in new expression
- Catch parameter not correctly highlighted when declared in new line or with a comment in between HOT 4
- Scope variables in expressions HOT 3
- Custom color for arguments used in method body
- Java 14's new record keyword is not highlighted properly HOT 5
- Field has different pattern if "this" is omitted HOT 1
- Syntax highlighting is broken with array syntax HOT 1
- Wrong highlighting on 'new' keyword on inner classes HOT 6
- Variable camelCase name is incorrectly highlighted in a statement with "instanceof" HOT 2
- Highlight 'yield' keyword in switch statement
- Highlight keyword 'sealed' for Java 15 HOT 2
- Tree-sitter compatibility work
- Add support for `non-sealed` keyword HOT 4
- Java tree-sitter syntax highlighting does not parse annotations correctly HOT 1
- Java tree-sitter grammar does not consistently highlight constants
- @link highlighting broken when linking to class HOT 1
- module name and comments not highlighted in module-info.java HOT 4
- <unknown> is deprecated. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from language-java.