Skip to content

Commit 73f81c8

Browse files
Java: Added Java 15 keywords (#2567)
1 parent 38808e6 commit 73f81c8

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

components/prism-java.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
(function (Prism) {
22

3-
var keywords = /\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|null|open|opens|package|private|protected|provides|public|record|requires|return|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/;
3+
var keywords = /\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/;
44

55
// based on the java naming conventions
66
var className = /\b[A-Z](?:\w*[a-z]\w*)?\b/;

components/prism-java.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/languages/java/keyword_feature.test

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ module requires transitive
2424
exports uses open
2525
opens with to provides
2626
yield
27+
sealed non-sealed permits
2728

2829
----------------------------------------------------
2930

@@ -53,7 +54,8 @@ yield
5354
["keyword", "module"], ["keyword", "requires"], ["keyword", "transitive"],
5455
["keyword", "exports"], ["keyword", "uses"], ["keyword", "open"],
5556
["keyword", "opens"], ["keyword", "with"], ["keyword", "to"], ["keyword", "provides"],
56-
["keyword", "yield"]
57+
["keyword", "yield"],
58+
["keyword", "sealed"], ["keyword", "non-sealed"], ["keyword", "permits"]
5759
]
5860

5961
----------------------------------------------------

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy