Skip to content

Commit 9fbddd5

Browse files
author
emmanue1
committed
Improve Java 9 modules syntax highlighting
1 parent 40e0960 commit 9fbddd5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

services/src/main/java/org/jd/gui/view/component/ModuleInfoFilePage.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,22 +123,22 @@ public Token getTokenList(Segment text, int startTokenType, int startOffset) {
123123
switch (currentTokenType) {
124124
case Token.NULL:
125125
currentTokenStart = i; // Starting a new token here.
126-
if (RSyntaxUtilities.isLetter(c) || c=='_') {
126+
if (RSyntaxUtilities.isLetter(c) || (c == '_')) {
127127
currentTokenType = Token.IDENTIFIER;
128128
} else {
129129
currentTokenType = Token.WHITESPACE;
130130
}
131131
break;
132132
default: // Should never happen
133133
case Token.WHITESPACE:
134-
if (RSyntaxUtilities.isLetterOrDigit(c) || c=='_') {
134+
if (RSyntaxUtilities.isLetter(c) || (c == '_')) {
135135
addToken(text, currentTokenStart, i-1, Token.WHITESPACE, newStartOffset+currentTokenStart);
136136
currentTokenStart = i;
137137
currentTokenType = Token.IDENTIFIER;
138138
}
139139
break;
140140
case Token.IDENTIFIER:
141-
if (!RSyntaxUtilities.isLetterOrDigit(c) && c!='_') {
141+
if (!RSyntaxUtilities.isLetterOrDigit(c) && (c != '_') && (c != '.')) {
142142
addToken(text, currentTokenStart, i-1, Token.IDENTIFIER, newStartOffset+currentTokenStart);
143143
currentTokenStart = i;
144144
currentTokenType = Token.WHITESPACE;

0 commit comments

Comments
 (0)