ASTokenFormatter: && should be || when checking for comments
diff --git a/formatter/src/main/java/org/apache/royale/formatter/ASTokenFormatter.java b/formatter/src/main/java/org/apache/royale/formatter/ASTokenFormatter.java
index 4fad031..701f919 100644
--- a/formatter/src/main/java/org/apache/royale/formatter/ASTokenFormatter.java
+++ b/formatter/src/main/java/org/apache/royale/formatter/ASTokenFormatter.java
@@ -1038,8 +1038,8 @@
continue;
}
if (skipComments && (token.getType() == ASTokenTypes.HIDDEN_TOKEN_SINGLE_LINE_COMMENT
- && token.getType() == ASTokenTypes.HIDDEN_TOKEN_MULTI_LINE_COMMENT
- && token.getType() == ASTokenTypes.TOKEN_ASDOC_COMMENT)) {
+ || token.getType() == ASTokenTypes.HIDDEN_TOKEN_MULTI_LINE_COMMENT
+ || token.getType() == ASTokenTypes.TOKEN_ASDOC_COMMENT)) {
continue;
}
if (current == offset) {
@@ -1058,8 +1058,8 @@
continue;
}
if (skipComments && (token.getType() == ASTokenTypes.HIDDEN_TOKEN_SINGLE_LINE_COMMENT
- && token.getType() == ASTokenTypes.HIDDEN_TOKEN_MULTI_LINE_COMMENT
- && token.getType() == ASTokenTypes.TOKEN_ASDOC_COMMENT)) {
+ || token.getType() == ASTokenTypes.HIDDEN_TOKEN_MULTI_LINE_COMMENT
+ || token.getType() == ASTokenTypes.TOKEN_ASDOC_COMMENT)) {
continue;
}
if (current == offset) {