Codebase list jd-gui / 9fbddd5
Improve Java 9 modules syntax highlighting emmanue1 4 years ago
1 changed file(s) with 3 addition(s) and 3 deletion(s). Raw diff Collapse all Expand all
122122 switch (currentTokenType) {
123123 case Token.NULL:
124124 currentTokenStart = i; // Starting a new token here.
125 if (RSyntaxUtilities.isLetter(c) || c=='_') {
125 if (RSyntaxUtilities.isLetter(c) || (c == '_')) {
126126 currentTokenType = Token.IDENTIFIER;
127127 } else {
128128 currentTokenType = Token.WHITESPACE;
130130 break;
131131 default: // Should never happen
132132 case Token.WHITESPACE:
133 if (RSyntaxUtilities.isLetterOrDigit(c) || c=='_') {
133 if (RSyntaxUtilities.isLetter(c) || (c == '_')) {
134134 addToken(text, currentTokenStart, i-1, Token.WHITESPACE, newStartOffset+currentTokenStart);
135135 currentTokenStart = i;
136136 currentTokenType = Token.IDENTIFIER;
137137 }
138138 break;
139139 case Token.IDENTIFIER:
140 if (!RSyntaxUtilities.isLetterOrDigit(c) && c!='_') {
140 if (!RSyntaxUtilities.isLetterOrDigit(c) && (c != '_') && (c != '.')) {
141141 addToken(text, currentTokenStart, i-1, Token.IDENTIFIER, newStartOffset+currentTokenStart);
142142 currentTokenStart = i;
143143 currentTokenType = Token.WHITESPACE;