Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Java - maybe new keywords? #38

Closed
0xflotus opened this issue Apr 29, 2020 · 3 comments
Closed

Java - maybe new keywords? #38

0xflotus opened this issue Apr 29, 2020 · 3 comments
Labels

Comments

@0xflotus
Copy link
Contributor

The current Java Language Specification says:

Bildschirmfoto 2020-04-29 um 21 57 31

Bildschirmfoto 2020-04-29 um 21 58 10

What do you think about adding this commonly used restricted identifiers var and yield and the ten restricted keywords to shiki?

@0xflotus
Copy link
Contributor Author

Additional to that since Java 14, JEP 359 introduced record types as new kind of type declaration

@octref
Copy link
Collaborator

octref commented Jul 30, 2020

7f071ad should have got most of these covered.

Do you want to open Java grammar issues here? https://github.com/atom/language-java

VS Code pulls from there, and I pull from VS Code: https://github.com/microsoft/vscode/blob/master/extensions/java/syntaxes/java.tmLanguage.json

I don't think the current tmLanguage is fully following the spec. I didn't find var, yield, open, etc.

@octref
Copy link
Collaborator

octref commented Aug 21, 2020

Fixed as part of #72 when I'm pulling upstream grammars.

"patterns": [
{
"begin": "{",
"beginCaptures": {
"0": {
"name": "punctuation.section.module.begin.bracket.curly.java"
}
},
"end": "(?=})",
"contentName": "meta.module.body.java",
"patterns": [
{
"match": "\\b(requires|transitive|exports|opens|to|uses|provides|with)\\b",
"name": "keyword.module.java"
}
]
}
]
},

@octref octref closed this as completed Aug 21, 2020
antfu pushed a commit that referenced this issue Jan 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants