-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
A module system was added to Java-9 with a number of a new keywords.
However prism.js doesn't recognize this keywords and as result they are not highlighted. Please find below some of the possible combinations: module com.js.prism { exports java.net.http; exports jdk.internal.editor.spi to jdk.jshell; requires java.base; requires transitive java.xml; uses java.net.ContentHandlerFactory; opens java.time.DateTime; opens java.time.LocalDateTime to java.logging; provides com.modules.hello.HelloInterface with com.modules.hello.HelloModules; }
- Loading branch information
1 parent
8b1bb46
commit a680e32
Showing
4 changed files
with
168 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,158 @@ | ||
module com.js.prism { | ||
exports java.net.http; | ||
exports jdk.internal.editor.spi to jdk.jshell; | ||
|
||
requires java.base; | ||
requires transitive java.xml; | ||
|
||
uses java.net.ContentHandlerFactory; | ||
|
||
opens java.time.DateTime; | ||
opens java.time.LocalDateTime to java.logging; | ||
|
||
provides com.modules.hello.HelloInterface with com.modules.hello.HelloModules; | ||
|
||
} | ||
|
||
|
||
---------------------------------------------------- | ||
[ | ||
["keyword", "module"], | ||
["namespace", | ||
["com", | ||
["punctuation", "."], | ||
"js", | ||
["punctuation", "."], | ||
"prism" | ||
] | ||
], | ||
["punctuation", "{"], | ||
|
||
["keyword", "exports"], | ||
["namespace", | ||
[ | ||
"java", | ||
["punctuation", "."], | ||
"net", | ||
["punctuation", "."], | ||
"http" | ||
] | ||
], | ||
["punctuation", ";"], | ||
|
||
["keyword", "exports"], | ||
["namespace", | ||
[ | ||
"jdk", | ||
["punctuation", "."], | ||
"internal", | ||
["punctuation", "."], | ||
"editor", | ||
["punctuation", "."], | ||
"spi" | ||
] | ||
], | ||
["keyword", "to"], | ||
["namespace", | ||
[ | ||
"jdk", | ||
["punctuation", "."], | ||
"jshell" | ||
] | ||
], | ||
["punctuation", ";"], | ||
|
||
["keyword", "requires"], | ||
["namespace", | ||
[ | ||
"java", | ||
["punctuation", "."], | ||
"base" | ||
] | ||
], | ||
["punctuation", ";"], | ||
|
||
["keyword", "requires"], | ||
["keyword", "transitive"], | ||
["namespace", | ||
[ | ||
"java", | ||
["punctuation", "."], | ||
"xml" | ||
] | ||
], | ||
["punctuation", ";"], | ||
|
||
["keyword", "uses"], | ||
["namespace", | ||
[ | ||
"java", | ||
["punctuation", "."], | ||
"net" | ||
] | ||
], | ||
["punctuation", "."], | ||
["class-name", "ContentHandlerFactory"], | ||
["punctuation", ";"], | ||
|
||
["keyword", "opens"], | ||
["namespace", | ||
[ | ||
"java", | ||
["punctuation", "."], | ||
"time" | ||
] | ||
], | ||
["punctuation", "."], | ||
["class-name", "DateTime"], | ||
["punctuation", ";"], | ||
["keyword", "opens"], | ||
["namespace", | ||
[ | ||
"java", | ||
["punctuation", "."], | ||
"time" | ||
] | ||
], | ||
["punctuation", "."], | ||
["class-name", "LocalDateTime"], | ||
["keyword", "to"], | ||
["namespace", | ||
[ | ||
"java", | ||
["punctuation", "."], | ||
"logging" | ||
] | ||
], | ||
["punctuation", ";"], | ||
["keyword", "provides"], | ||
["namespace", | ||
[ | ||
"com", | ||
["punctuation", "."], | ||
"modules", | ||
["punctuation", "."], | ||
"hello" | ||
] | ||
], | ||
["punctuation", "."], | ||
["class-name", "HelloInterface"], | ||
["keyword", "with"], | ||
["namespace", | ||
[ | ||
"com", | ||
["punctuation", "."], | ||
"modules", | ||
["punctuation", "."], | ||
"hello" | ||
] | ||
], | ||
["punctuation", "."], | ||
["class-name", "HelloModules"], | ||
["punctuation", ";"], | ||
["punctuation", "}"] | ||
] | ||
|
||
---------------------------------------------------- | ||
|
||
Checks for module definition. |