Do not join two words like "finaldouble" or numbers like "3double", "double3", "34", (3 and 4 are different tokens) etc...
(Token prevToken, Token curToken)
| 498 | * "double3", "34", (3 and 4 are different tokens) etc... |
| 499 | */ |
| 500 | public static boolean cannotJoin(Token prevToken, Token curToken) { |
| 501 | String prevTokenText = prevToken.getText(); |
| 502 | char prevLastChar = prevTokenText.charAt(prevTokenText.length()-1); |
| 503 | String curTokenText = curToken.getText(); |
| 504 | char curFirstChar = curTokenText.charAt(0); |
| 505 | return Character.isLetterOrDigit(prevLastChar) && Character.isLetterOrDigit(curFirstChar); |
| 506 | } |
| 507 | |
| 508 | public static void wipeCharPositionInfoAndWhitespaceTokens(CodeBuffTokenStream tokens) { |
| 509 | tokens.fill(); |
no test coverage detected