Check whether comments exist between the given 2 tokens.
@param {Token} left The left token to check.
@param {Token} right The right token to check.
@returns {boolean} `true` if comments exist between the given 2 tokens.
974283
function commentsExistBetween(left, right) {
            return sourceCode.getFirstTokenBetween(
                left,
                right,
                {
                    includeComments: true,
                    filter: astUtils.isCommentToken
                }
            ) !== null;
        }
480609
function isPaddingBetweenTokens(first, second) {
            const comments = sourceCode.getCommentsBefore(second);
            const len = comments.length;

            // If there is no comments
            if (len === 0) {
                const linesBetweenFstAndSnd = second.loc.start.line - first.loc.end.line - 1;

                return linesBetweenFstAndSnd >= 1;
            }


            // If there are comments
            let sumOfCommentLines = 0; // the numbers of lines of comments
            let prevCommentLineNum = -1; // line number of the end of the previous comment

            for (let i = 0; i < len; i++) {
                const commentLinesOfThisComment = comments[i].loc.end.line - comments[i].loc.start.line + 1;

                sumOfCommentLines += commentLinesOfThisComment;

                /*
                 * If this comment and the previous comment are in the same line,
                 * the count of comment lines is duplicated. So decrement sumOfCommentLines.
                 */
                if (prevCommentLineNum === comments[i].loc.start.line) {
                    sumOfCommentLines -= 1;
                }

                prevCommentLineNum = comments[i].loc.end.line;
            }

            /*
             * If the first block and the first comment are in the same line,
             * the count of comment lines is duplicated. So decrement sumOfCommentLines.
             */
            if (first.loc.end.line === comments[0].loc.start.line) {
                sumOfCommentLines -= 1;
            }

            /*
             * If the last comment and the second block are in the same line,
             * the count of comment lines is duplicated. So decrement sumOfCommentLines.
             */
            if (comments[len - 1].loc.end.line === second.loc.start.line) {
                sumOfCommentLines -= 1;
            }

            const linesBetweenFstAndSnd = second.loc.start.line - first.loc.end.line - 1;

            return linesBetweenFstAndSnd - sumOfCommentLines >= 1;
        }
507369
static int compareShared(Span left, Span right) {
    // If either are shared put it last
    boolean leftShared = Boolean.TRUE.equals(left.shared());
    boolean rightShared = Boolean.TRUE.equals(right.shared());
    if (leftShared && rightShared) return 0; // both are shared, so skip out
    if (leftShared) return 1;
    if (rightShared) return -1;

    // neither are shared, put the client spans first
    boolean leftClient = Span.Kind.CLIENT.equals(left.kind());
    boolean rightClient = Span.Kind.CLIENT.equals(right.kind());
    if (leftClient && rightClient) return 0;
    if (leftClient) return -1;
    if (rightClient) return 1;
    return 0; // neither are client spans
  }
1121199
function one_space(left, right) {
        left = left || token;
        right = right || next_token;
        if (right.id !== '(end)' && !option.white &&
                (token.line !== right.line ||
                token.thru + 1 !== right.from)) {
            warn('expected_space_a_b', right, artifact(token), artifact(right));
        }
    }
1274642
function checkInclude(i) {
  let l;

  if (i >= tokensLength) return 0;

  if (l = checkInclude1(i)) tokens[i].include_type = 1;
  else if (l = checkInclude2(i)) tokens[i].include_type = 2;

  return l;
}
1178233
function checkPseudoClass2(i) {
  const start = i;
  let l;

  // Skip `:`.
  i++;

  if (i >= tokensLength) return 0;

  if (l = checkIdentOrInterpolation(i)) i += l;
  else return 0;

  if (i >= tokensLength ||
      tokens[i].type !== TokenType.LeftParenthesis) return 0;

  const right = tokens[i].right;

  // Skip `(`.
  i++;

  if (l = checkSC(i)) i += l;

  if (l = checkIdentOrInterpolation(i)) i += l;
  else return 0;

  if (l = checkSC(i)) i += l;

  if (i !== right) return 0;

  // Skip `)`.
  i++;

  return i - start;
}
394224
function hasStringLiteral(node) {
    if (isConcatenation(node)) {

        // `left` is deeper than `right` normally.
        return hasStringLiteral(node.right) || hasStringLiteral(node.left);
    }
    return astUtils.isStringLiteral(node);
}
622896
function isCommentLine (line) {
  var isCmnt = commentRE.test(line);
  if (isCmnt) {
    debug('removing comment: %s', line);
  }
  return !isCmnt;
}
603507
function isSameLine (left, right) {
      return left.loc.start.line === right.loc.start.line
    }
632151
public static Boolean or(Object left, Object right) {
        return (Boolean) InfixOpNode.or(left, right, null);
    }
1240485
public static boolean adOrOver(Bound<?> left, Bound<?> right) {
        boolean isValueEqual = left.getValue().equals(right.getValue());
        boolean isBothOpen = left.getBoundaryType() == RangeBoundary.OPEN && right.getBoundaryType() == RangeBoundary.OPEN;
        return isValueEqual && !isBothOpen;
    }
132788
function isIgnores(leftToken, leftIndex, rightToken) {
            const tokensAndComments = sourceCode.tokensAndComments
            const leftTemplateTag = getTemplateTagByToken(leftToken)
            const rightTemplateTag = getTemplateTagByToken(rightToken)
            if (!leftTemplateTag || !rightTemplateTag) {
                return true
            }

            // Ignore if token is the first token of the template tag script
            if (
                !sourceCode.text
                    .slice(
                        rightTemplateTag.expressionStart.range[1],
                        rightToken.range[0]
                    )
                    .trim()
            ) {
                return true
            }

            // Ignore comments that are the last token on their line if `ignoreEOLComments` is active.
            if (
                ignoreEOLComments &&
                isCommentToken(rightToken) &&
                (leftIndex === tokensAndComments.length - 2 ||
                    rightToken.loc.end.line <
                        tokensAndComments[leftIndex + 2].loc.start.line)
            ) {
                return true
            }

            // Ignore tokens that are in a node in the "exceptions" object
            if (hasExceptions) {
                const parentNode = sourceCode.getNodeByRangeIndex(
                    rightToken.range[0] - 1
                )

                if (parentNode && exceptions[parentNode.type]) {
                    return true
                }
            }
            return false
        }
321568
function hasCommentInsideNonSpecifiers(node, sourceCode) {
  const tokens = sourceCode.getTokens(node)
  const openBraceIndex = tokens.findIndex(token => isPunctuator(token, '{'))
  const closeBraceIndex = tokens.findIndex(token => isPunctuator(token, '}'))
  // Slice away the first token, since we're no looking for comments _before_
  // `node` (only inside). If there's a `{...}` part, look for comments before
  // the `{`, but not before the `}` (hence the `+1`s).
  const someTokens = openBraceIndex >= 0 && closeBraceIndex >= 0
    ? tokens.slice(1, openBraceIndex + 1).concat(tokens.slice(closeBraceIndex + 1))
    : tokens.slice(1)
  return someTokens.some(token => sourceCode.getCommentsBefore(token).length > 0)
}
1026885
function _checkRight(targetOffset, tooltipLayerStyleLeft, tooltipOffset, windowSize, tooltipLayer) {
    if (targetOffset.left + tooltipLayerStyleLeft + tooltipOffset.width > windowSize.width) {
        // off the right side of the window
        tooltipLayer.style.left = windowSize.width - tooltipOffset.width - targetOffset.left + 'px';
        return false;
    }
    tooltipLayer.style.left = tooltipLayerStyleLeft + 'px';
    return true;
}
332033
function codeAroundComment(token) {
            let currentToken = token;

            do {
                currentToken = sourceCode.getTokenBefore(currentToken, { includeComments: true });
            } while (currentToken && astUtils.isCommentToken(currentToken));

            if (currentToken && astUtils.isTokenOnSameLine(currentToken, token)) {
                return true;
            }

            currentToken = token;
            do {
                currentToken = sourceCode.getTokenAfter(currentToken, { includeComments: true });
            } while (currentToken && astUtils.isCommentToken(currentToken));

            if (currentToken && astUtils.isTokenOnSameLine(token, currentToken)) {
                return true;
            }

            return false;
        }
278426
function either(cont, left, right) {
    right = right || of

    return function continuable(callback) {
        cont(function (err, value) {
            if (!err) {
                return right(value)(callback)
            }

            // the left function takes either a callback or
            // it returns a continuable. Both are valid
            var cont = left(err, callback)

            if (cont) {
                cont(callback)
            }
        })
    }
}
781389
private static boolean isEqualOrNull(String left, String right) {
        return (left != null && left.equals(right)) || (left == null && right == null);
    }