(List<Token> hiddenTokensToLeft)
| 391 | } |
| 392 | |
| 393 | public static boolean hasCommentToken(List<Token> hiddenTokensToLeft) { |
| 394 | boolean hasComment = false; |
| 395 | for (Token hidden : hiddenTokensToLeft) { |
| 396 | String hiddenText = hidden.getText(); |
| 397 | if ( !hiddenText.matches("\\s+") ) { |
| 398 | hasComment = true; |
| 399 | break; |
| 400 | } |
| 401 | } |
| 402 | return hasComment; |
| 403 | } |
| 404 | |
| 405 | /** Return first ancestor of p that is not an only child including p. |
| 406 | * So if p.getParent().getChildCount()>1, this returns p. If we |
no test coverage detected